Skip to content

Commit 4cbc397

Browse files
committed
Add paragraph and example: how to exclude response types using minus '-' sign.
1 parent 5e5ede5 commit 4cbc397

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

articles/cognitive-services/Bing-Web-Search/filter-answers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ The following shows the response to the previous query. As you can see Bing didn
7676
}
7777
```
7878

79+
If you want to exclude specific types of content, such as images, from the response, you can exclude them with the hyphen (minus) prefix to the responseFilter parameter:
80+
81+
```
82+
&responseFilter-images
83+
```
84+
7985
Although Bing did not return video and news results in the previous response, it does not mean that video and news content does not exist. It simply means that the page didn't include them. However, if you [page](./paging-webpages.md) through more results, the subsequent pages would likely include them. Also, if you call the [Video Search API](../bing-video-search/search-the-web.md) and [News Search API](../bing-news-search/search-the-web.md) endpoints directly, the response would likely contain results.
8086

8187
You are discouraged from using `responseFilter` to get results from a single API. If you want content from a single Bing API, call that API directly. For example, to receive only images, send a request to the Image Search API endpoint, `https://api.cognitive.microsoft.com/bing/v7.0/images/search` or one of the other [Images](https://docs.microsoft.com/rest/api/cognitiveservices/bing-images-api-v7-reference#endpoints) endpoints. Calling the single API is important not only for performance reasons but because the content-specific APIs offer richer results. For example, you can use filters that are not available to the Web Search API to filter the results.

0 commit comments

Comments
 (0)