javascriptajaxbashsearchbing

Bing Images search URL with disabled safe search


I'm trying to retrieve the web page content of Bing Images for a specific query.

I'm currently communicating with Bing through the following URL (in case of a sample foo search), from curl command line tool:

curl http://www.bing.com/images/search?q=foo

Since the safe search filter is enabled by default, I'd need to disable it.

How can I do that? I know that direct API access would be preferable, but I need to bypass them and retrieve the entire web page.

I saw that from the web page, the safe search is disabled through Ajax calls. What URL should I contact to make a search with safe search disabled?


Solution

  • The correct solution is to use the query parameter safeSearch=off, like

    curl http://www.bing.com/images/search?q=foo&safeSearch=off
    

    This is not documented anywhere I could find.