Working with Multiple SourceTypes (Bing, Version 2.0)
You can include more than one SourceType in a request. In fact, you can include all SourceTypes listed in Working with SourceTypes (Bing, Version 2). As an example of working with multiple SourceTypes, this section documents how to make a request to the Web and Spell SourceTypes.
Request Parameters
This section includes required and optional parameters for a multiple-SourceType request.
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 multiple SourceTypes in a single request, specify each SourceType in a SearchRequest.Sources statement. |
Optional Parameters
For optional parameters applicable to a given SourceType, see the "Optional Parameters" section in the topic for that SourceType. For example, for the Web and Spell SourceTypes, refer to:
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)
For response fields specific to a given SourceType, see the "Response Fields" section in the topic for that SourceType. For example, for the Web and Spell SourceTypes, refer to:
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 the Web and Spell SourceTypes and parses the response, see Multiple-SourceType Code Samples.
Error Handling
For information about error messages, see Error Handling (Bing, Version 2.0).
Note