SearchGetReverseGeocodingBatch200Response interface
Reverse Geocoding Batch API
Applies to: see pricing tiers.
The Reverse Geocoding Batch API sends batches of queries to Reverse Geocoding API using just a single API call. The API allows caller to batch up to 100 queries.
Submit Synchronous Batch Request
The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to 100 for this API.
POST https://atlas.microsoft.com/reverseGeocode:batch?api-version=2023-06-01
POST Body for Batch Request
To send the reverse geocoding queries you will use a POST
request where the request body will contain the batchItems
array in json
format and the Content-Type
header will be set to application/json
. Here's a sample request body containing 2 reverse geocoding queries:
{
"batchItems": [
{
"coordinates": [-122.128275, 47.639429],
"resultTypes": ["Address", "PopulatedPlace"]
},
{
"coordinates": [-122.341979399674, 47.6095253501216]
}
]
}
A reverse geocoding batchItem object can accept any of the supported reverse geocoding URI parameters.
The batch should contain at least 1 query.
Batch Response Model
The batch response contains a summary
component that indicates the totalRequests
that were part of the original batch request and successfulRequests
i.e. queries which were executed successfully. The batch response also includes a batchItems
array which contains a response for each and every query in the batch request. The batchItems
will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:
GeocodingResponse
- If the query completed successfully.Error
- If the query failed. The response will contain acode
and amessage
in this case.
- Extends
Properties
body | |
status |
Inherited Properties
headers | The HTTP response headers. |
request | The request that generated this response. |
Property Details
body
status
status: "200"
Property Value
"200"
Inherited Property Details
headers
The HTTP response headers.
headers: RawHttpHeaders
Property Value
Inherited From HttpResponse.headers
request
The request that generated this response.
request: PipelineRequest
Property Value
Inherited From HttpResponse.request
Azure SDK for JavaScript