This article explains how to migrate the Bing Maps Geocode Dataflow API to Azure Maps Geocoding Batch and Reverse Geocoding Batch API. Azure Maps Geocoding Batch API is used to get latitude and longitude coordinates of a street address or name of a place in batch mode with a single API call. Azure Maps Geocoding Batch API is an HTTP POST request that sends batches of queries to the Azure Maps Geocoding API in a single request. Azure Maps Reverse Geocoding Batch API is used to translate latitude and longitude coordinates into a human understandable street address. Azure Maps Reverse Geocoding Batch API is an HTTP POST request that sends batches of queries to the Azure Maps Get Reverse Geocoding API in a single request.
Bing Maps Geocode Dataflow API supports forward and reverse batch geocoding within the same API. Azure Maps has separate API for forward and reverse geocoding.
Bing Maps Geocode Dataflow API requires uploading your location data as an XML or text (csv, pipe, or tab delimited) data file. Azure Maps Geocoding Batch and Reverse Geocoding Batch API don’t use a data file upload approach, but rather an HTTP POST request with location data in GeoJSON format in the body of the request.
Bing Maps Geocode Dataflow API supports up to 200,000 entities per upload. The Azure Maps Geocoding Batch and Reverse Geocoding Batch API supports up to 100 batched queries in a synchronous request, and up to 200,000 in an asynchronous request.
Bing Maps Geocode Dataflow API requires a series of API calls following the initial data upload to get the status and download results. The Azure Maps Geocoding Batch and Reverse Geocoding Batch API synchronous request don’t require additional API calls. The asynchronous request does require additional calls to get the batch process status and download results.
Bing Maps Geocode Dataflow coordinates are in latitude/longitude format. Azure Maps Geocoding Batch and Reverse Geocoding Batch API coordinates are in longitude/latitude format (due to being in GeoJSON format).
Unlike Bing Maps for Enterprise, Azure Maps is a global service that supports specifying a geographic scope, which allows you to limit data residency to the European (EU) or United States (US) geographic areas (geos). All requests (including input data) are processed exclusively in the specified geographic area. For more information, see Azure Maps service geographic scope.
The following table lists the Bing Maps Geocode Dataflow request parameters and the Azure Maps equivalent:
Bing Maps Parameter
Azure Maps Parameter
Description
dataLocation
Not needed
input
Not needed
Bing Maps Geocode Dataflow API supports XML and Text (csv, tab, and pipe delimited) format for the batch geocoding input data file. Azure Maps supports JSON format for the batch geocoding input data in the HTTP POST request.
output
Not needed
Bing Maps Geocode Dataflow API supports JSON and XML for the batch geocode output data. Azure Maps supports JSON format for the batch geocoding output data.
For more information about the Azure Maps URI parameters and request body, see the Azure Maps Geocoding Batch and Reverse Geocoding Batch documentation.
Bing Maps Data Schema 2.0 input and output comparison to Azure Maps Geocode Batch and Reverse Geocode Batch API:
In Azure Maps, the maximum number of responses that are returned. Default is 5, minimum is 1, and maximum is 20.
Name
Geocode Response
Not supported
Not supported
Point.Latitude, Point.Longitude
Geocode Response
coordinates
number[]
Bing Maps returns the coordinates in latitude/longitude format. Azure Maps returns coordinates in longitude/latitude format (due to being in GeoJSON format).
Query
Geocode Request
query
string
QueryParseValue
Geocode Response
Not supported
Not supported
ReverseGeocodeRequest
XML container
Not needed
Not needed
Azure Maps has separate APIs for forward geocoding and reverse geocoding.
StatusCode
Geocode Response
Not supported
Not supported
StrictMatch
Geocode Request
Not supported
Not supported
TraceId
Geocode Response
Not supported
Not supported
Version
Not needed
Not needed
For more information about the Azure Maps Geocoding Batch response fields, see the response Definitions.
POST https://atlas.microsoft.com/geocode:batch?api-version=2023-06-01&subscription-key={Your-Azure-Maps-Subscription-key}
To send the geocoding queries, use an HTTP POST request where the body of the request contains the batchItems array in JSON format and the Content-Type header set to application/json.
The following JSON shows a sample request containing two geocoding queries, with one location in unstructured format and one location in structured format:
Sample Azure Maps Reverse Geocoding Batch API request:
HTTP
POST https://atlas.microsoft.com/reverseGeocode:batch?api-version=2023-06-01&subscription-key={Your-Azure-Maps-Subscription-key}
To send the reverse geocoding queries, use an HTTP POST request where the body of the request contains a batchItems array in JSON format and the Content-Type header is set to application/json.
The following JSON shows a sample request containing two reverse geocoding queries:
A URL to download the geocode job results is provided when the Bing Maps Geocode Dataflow batch job processes successfully, as shown by the completed job status. For an example of a successful Bing Maps Geocode Dataflow output, see Geocode Dataflow Sample Input and Output Data Version 2.0 in the Bing Maps documentation.
The following sample shows what is returned in the body of the HTTP response when executing an Azure Maps Geocoding Batch API request:
Similar to Bing Maps Geocode Dataflow API, Azure Maps Geocoding Batch and Reverse Geocoding Batch APIs log one billable transaction per geocoded item. For example, 100 locations geocoded in the batch request results in 100 billable transactions. For more information on Azure Maps transactions, see Understanding Azure Maps Transactions.
Additional information
More Azure Maps Geocoding APIs
Get Geocoding: Use to get latitude and longitude coordinates of a street address or name of a place.
Get Reverse Geocoding: Use to get a street address and location info from latitude and longitude coordinates.
Azure HPC is a purpose-built cloud capability for HPC & AI workload, using leading-edge processors and HPC-class InfiniBand interconnect, to deliver the best application performance, scalability, and value. Azure HPC enables users to unlock innovation, productivity, and business agility, through a highly available range of HPC & AI technologies that can be dynamically allocated as your business and technical needs change. This learning path is a series of modules that help you get started on Azure HPC - you
Demonstrate understanding of common data engineering tasks to implement and manage data engineering workloads on Microsoft Azure, using a number of Azure services.
The overview page for the Geocode Dataflow API, which uses REST URLs to geocode and reverse-geocode large sets of spatial data, with information on what you need to do in order to use these API along with links to articles that describe the data schema, how to create and check on jobs, download results, sample input/output files, sample code and a walkthrough.