Data
Nearest amenity of a type API
Find the single nearest amenity of a given type (pharmacy, supermarket, hospital, fuel, ATM, bus_stop, ...) to a point within a max radius via Overpass, with distance, name, opening hours, and a few nearby alternates. Distinct from a POI list: returns the closest-first answer. Answers 'where is the nearest pharmacy', 'closest supermarket to these coordinates', 'how far is the nearest hospital'.
Price$0.01per request
MethodPOST
Route/v1/data/places-nearest-amenity
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache21600s public
dataplacesnearestamenityoverpassosmpoidistanceproximity
API URL
Integration docshttps://x402.hexl.dev/v1/data/places-nearest-amenityExample request
{
"latitude": 48.8584,
"longitude": 2.2945,
"category": "pharmacy",
"alternates": 2
}Example response
{
"category": "pharmacy",
"found": true,
"nearest": {
"id": "node/3266833092",
"name": "Pharmacie de la Tour Eiffel",
"category": "pharmacy",
"latitude": 48.8593893,
"longitude": 2.2980526,
"distanceMeters": 282,
"address": null,
"city": null,
"openingHours": "Mo-Fr 08:00-20:00; Sa 09:00-20:00",
"phone": null,
"website": null
},
"alternates": [
{
"id": "node/5850967086",
"name": "Parapharmacie Eiffel Para",
"category": "pharmacy",
"latitude": 48.8547824,
"longitude": 2.2949979,
"distanceMeters": 404,
"address": null,
"city": null,
"openingHours": "Mo-Su 10:30-19:30",
"phone": null,
"website": null
},
{
"id": "node/3266833093",
"name": "Pharmacie du Champs de Mars",
"category": "pharmacy",
"latitude": 48.8579304,
"longitude": 2.3006577,
"distanceMeters": 454,
"address": null,
"city": null,
"openingHours": "Mo-Fr 09:00-20:00; Sa 09:30-20:00",
"phone": null,
"website": null
}
],
"searchRadiusMeters": 3000
}Input schema
{
"type": "object",
"required": [
"latitude",
"longitude",
"category"
],
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"category": {
"type": "string"
},
"maxRadiusMeters": {
"type": "integer",
"minimum": 100,
"maximum": 20000,
"default": 3000
},
"alternates": {
"type": "integer",
"minimum": 0,
"maximum": 10,
"default": 3
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}