Safe search set to 'strict'

Ionut V 1 Reputation point
2021-08-31T11:52:18.963+00:00

Hello,

I've been reading the Cognitive services documentation and experimenting with the Web search API in particular.
Looking at the Safe search parameter and its values (none, moderate, and strict) I see I can control what the Bing search returns in regard to sexual content for example.

On the same note, looking at bing.com, if I set safesearch=strict, then any search term that would otherwise return non-explicit sexual results, will show the user a message asking the user to change the settings to see results.

Now, with the API and safe search set to strict, the above behavior is not achievable. Explicit content on web results is filtered of explicit results (as per the sefesearch setting), however, I couldn't tell that on the client just by looking at the response.
My only option to block results based on that criteria would be to parse the query string, which might be more easily achievalbe via safe search, especially if the backend is aware of the fact that the results were filtered.

Thanks.

Bing Web Search
Bing Web Search
A Bing service that gives you enhanced search details from billions of web documents.
126 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,303 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,736 Reputation points Microsoft Employee
    2021-09-01T11:54:26.78+00:00

    @Ionut V With the API you can set the safeSearch to strict but the results blocked due to this setting will not be available. I think bing.com allows users to change the settings if required with a message but I don't think this is available directly from the API search result.

    0 comments No comments