News SourceType (Bing, Version 2.0)
Bing
This SourceType provides:
-
News specific to a topic, such as Entertainment
-
News specific to a location, such as Missoula or Missouri
-
Breaking news (if any) as the first result.
-
Top news stories. To receive top news stories, send a request with the Query parameter without a value - that is, send an empty query. For more information, see the next section.
About News Results
-
News results are presented on the basis of the presence or absence of the following optional request parameters:
-
NewsRequest.LocationOverride (Bing, Version 2.0)
-
NewsRequest.Category (Bing, Version 2.0)
-
NewsRequest.SortBy (Bing, Version 2.0)
LocationOverride, Category, and SortBy are mutually exclusive. Specifically:
-
If LocationOverride is specified, then Category and SortBy, if specified, are ignored, and LocationOverride is used.
-
If LocationOverride is not specified, and Category is specified, the SortBy, if specified, is ignored, and Category is used.
-
If neither LocationOverride nor Category is specified, and SortBy is specified, then SortBy is used.
The Empty Query Scenario
To view top news stories, send a request with the query parameter empty. (That is, Query=)
Request Parameters
Required Parameters
The following parameters are required for all requests:
-
SearchRequest.AppId Property (Bing, Version 2.0)
-
SearchRequest.Query Property (Bing, Version 2.0)
-
SearchRequest.Sources Property (Bing, Version 2.0)
Note |
|---|
| To get results from a given SourceType, you must specify it in a SearchRequest.Sources statement. |
Optional Parameters
The following optional parameters are applicable to this SourceType.
-
SearchRequest.Market Property (Bing, Version 2.0)
-
SearchRequest.Version Property (Bing, Version 2.x)
-
SearchRequest.Options Property (Bing, Version 2.0)
-
NewsRequest.Count Property (Bing, Version 2.0)
-
NewsRequest.Offset (Bing, Version 2.0)
Note |
|---|
| This parameter is not applicable to the Empty Query Scenario. For more information, see the section of this name in this topic. |
-
NewsRequest.LocationOverride (Bing, Version 2.0)
-
NewsRequest.Category (Bing, Version 2.0)
-
NewsRequest.SortBy (Bing, Version 2.0)
Note |
|---|
| This parameter is not applicable to the Empty Query Scenario. For more information, see the section of this name in this topic. |
Response Fields
The following response fields are common to all source types:
-
SearchResponse.Version Property (Bing, Version 2.0)
-
Query.AlterationOverrideQuery Property (Bing, Version 2.0)
-
Query.SearchTerms Property (Bing, Version 2.0)
The following response fields are specific to the News SourceType:
-
NewsResponse.Offset (Bing, Version 2.0)
-
NewsResponse.Results (Bing, Version 2.0)
-
NewsResponse.Total (Bing, Version 2.0)
-
NewsResponse.RelatedSearches (Bing, Version 2.0)
-
NewsRelatedSearch.Url (Bing, Version 2.0)
-
NewsRelatedSearch.Title (Bing, Version 2.0)
-
NewsResult.Url (Bing, Version 2.0)
-
NewsResult.BreakingNews (Bing, Version 2.0)
-
NewsResult.Date (Bing, Version 2.0)
-
NewsResult.NewsCollections (Bing, Version 2.0)
-
NewsResult.Snippet (Bing, Version 2.0)
-
NewsResult.Source (Bing, Version 2.0)
-
NewsResult.Title (Bing, Version 2.0)
-
NewsCollection.NewsArticles (Bing, Version 2.0)
-
NewsCollection.Name (Bing, Version 2.0)
-
NewsArticle.Date (Bing, Version 2.0)
-
NewsArticle.Url (Bing, Version 2.0)
-
NewsArticle.Snippet (Bing, Version 2.0)
-
NewsArticle.Source (Bing, Version 2.0)
-
NewsArticle.Title (Bing, Version 2.0)
Request and Response Examples
For examples of requests and responses for this SourceType specific to a given protocol, see:
Code Samples
For examples of code that sends a request that specifies this SourceType and parses the response, see News SourceType Code Samples.
See Also
Show:
Note