But if you set answerCount to 2, Bing returns the top two ranked answers, which are webpages and images. For example, if the top ranked answers that Bing returns for a query are webpages, images, videos, and relatedSearches, the response would include those answers. Set promote to a comma-delimited list of answer names that you want the response to include regardless of their ranking. To include answers that Bing would otherwise exclude because of ranking, use the promote query parameter. For example, if you set responseFilter to webpages and news and answerCount to 2, the response contains only webpages since news is not ranked. If the request includes the responseFilter and answerCount query parameters, both apply. For example, if Bing ranks the answers as webpages, images, videos, and relatedSearches, the response includes only webpages and images. Bing chooses the answers based on ranking. To limit the number of answers in the response to the top two ranked answers, set the answerCount query parameter to 2. ![]() Returning the top n answersĪ response may include any number of answer types. The results may include webpages that fall outside the specified period if the number of webpages that Bing finds that matches your criteria is less than the number of webpages you requested (or the default number that Bing returns). To limit the results to a single date, set the freshness parameter to the specific date in the form, YYYY-MM-DD. You may also set this parameter to a custom date range in the form, YYYY-MM-DD.YYYY-MM-DD. The following example filters the webpage results to those that Bing discovered in the last seven days: freshness=week Month - Return webpages that Bing discovered within the last 30 days.Week - Return webpages that Bing discovered within the last 7 days.Day - Return webpages that Bing discovered within the last 24 hours. ![]() You may set the parameter to one of the following time periods: The Webpage object's datePublished field tells you when Bing originally discovered the page. Freshness refers to the date that Bing originally discovered the webpage, not when the publisher published the webpage. If you want to ensure the freshness of the content that Bing returns, use the freshness query parameter. It’s possible that Bing will return content that’s older than 30 days. ![]() You should use site: only if you are aware of the content on the site and your scenario supports the possibility of adult content. q=sailing+dinghies+site%ĭepending on the query, if you use the site: query operator, there is the chance that the response may contain adult content regardless of the safeSearch setting. The response may contain results from other sites depending on the number of relevant results found on the specified site. To get search results from a specific domain, use Bing's site: operator in the query string. The Image Search API offers filters that are not available to the Web Search API. For example, to receive only images, send the request using Image Search API. Instead, you should use the answer-specific endpoint to get richer results and better performance. In theory, you could use responseFilter to filter for a single answer like only images or news but you're strongly discouraged from doing so. To exclude specific answers from the response, prefix a minus sign (-) to the answer's name. But if you page through more results, they may include videos and news content. ![]() For example, if you filter the response for images, videos, and news but Bing doesn't find relevant videos and news results that rank high enough for the first page, the response includes only images. Remember that you need to URL-encode all query parameters, so the parameter actually looks like: &responseFilter=webpages%2Cnewsīing includes the answers you request only if it finds relevant content that ranks high enough for the page of results you requested. To include only the webpage and news answers, specify responseFilter as: &responseFilter=webpages,news You can specify the answers to include in the response or those that you want to exclude from the response, or not both. But what if you're only interested in webpages and news how can you tell Bing you're not interested in any other answers? You use the responseFilter query parameter. This could include webpages, images, news, videos, and more. When you query the Web, Bing returns all relevant content that it finds.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |