Jaa


Query API

Note

Bing Maps Spatial Data Service Query API retirement

Bing Maps Spatial Data Service Query API is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps Spatial Data Service Query API until June 30th, 2025. Enterprise account customers can continue to use Bing Maps Spatial Data Service Query API until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps Spatial Data Service Query API will need to be updated to use Azure Maps Search POI API (for public POI search) or an alternative solution (for custom POI search), by the retirement date that applies to your Bing Maps for Enterprise account type. For more information, see Migrate Bing Maps Data Source Management and Query API.

Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.

The Query API is a component of the Bing Spatial Data Services. You can use the Query API to query a data source for information about entities in that data source. For example, if the data source contains restaurant entities, you can query for French restaurants nearby or you can get information about a specific restaurant. Each query response can return a maximum number of 250 results.

Below are some ways you could use the Query API to search a data source that contains information about a set of restaurants.

  • Use Query by Area to search for all movie theaters within 20 kilometers.
  • Use Query Near a Route to search for all restaurants along a route.
  • Use Query by Property to search for all restaurants within 20 miles that have more than 20 employees.
  • Use Query by ID to search for the restaurant entity that has an entity ID of "410".

For information about creating and updating data sources, see the Load Data Source Dataflow.

In this Section

Resource Description
Query by Area Describes how to query a data source for entities that are in a specified geographical area.
Query by Property Describes how to query a data source for entities that satisfy a set of property value conditions.
Query Near a Route Describes how to query a data source for entities near a route.
Query by ID Describes how to query a data source for one or more entities by specifying entity IDs.
Query Options Describes query options, such as the options to filter and order results and to user wildcard searches.
Response Data Describes the response returned for queries.
C# Sample Code Provides sample C# code that uses the Query API.
VB Sample Code Provides sample Visual Basic code that uses the Query API.