POST/v1/reverse/batch
Reverse geocode up to 10,000 points
One unit is metered per point. Results come back in the same order as the input. A batch larger than
what is left on your key is refused whole (429 allowance_exceeded) and costs nothing.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"fields": "",
"points": [
[
38.8977,
-77.0365
],
[
39.7367,
-75.551
]
]
}
REQUEST
curl -X POST "https://api.geocode.net/v1/reverse/batch" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"fields": "",
"points": [
[
38.8977,
-77.0365
],
[
39.7367,
-75.551
]
]
}'
import requests
r = requests.post("https://api.geocode.net/v1/reverse/batch", headers={"X-API-Key": "YOUR_KEY"}, json={
"fields": "",
"points": [
[
38.8977,
-77.0365
],
[
39.7367,
-75.551
]
]
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.geocode.net/v1/reverse/batch", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"fields": "",
"points": [
[
38.8977,
-77.0365
],
[
39.7367,
-75.551
]
]
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200Successful Response
{
"results": [
{
"query": {
"lat": 38.8977,
"lng": -77.0365
},
"results": [
{
"formatted": "1600 Pennsylvania Ave NW, Washington, DC 20500",
"components": {
"number": "1600",
"street": "Pennsylvania",
"suffix": "Ave",
"postdirectional": "NW",
"city": "Washington",
"county": "District of Columbia",
"state": "DC",
"zip": "20500",
"country": "US"
},
"location": {
"lat": 38.897675,
"lng": -77.036545
},
"accuracy": 0.98,
"accuracy_type": "rooftop",
"source": "nad",
"fields": {
"distance_m": 4.8
}
}
]
},
{
"query": {
"lat": 39.7367,
"lng": -75.551
},
"results": [
{
"formatted": "100 S French ST, Wilmington, DE 19801",
"components": {
"number": "100",
"predirectional": "S",
"street": "French",
"suffix": "ST",
"city": "Wilmington",
"county": "New Castle",
"state": "DE",
"zip": "19801",
"country": "US"
},
"location": {
"lat": 39.7367,
"lng": -75.550995
},
"accuracy": 1.0,
"accuracy_type": "rooftop",
"source": "nad",
"fields": {
"distance_m": 0.5
}
}
]
}
]
}