- Request credits
- 1
- Required scopes
maps
Usage and limits
Only datasets owned by the key owner are accessible. Radius: 0–50,000 m; limit: 1–50. Results contain nearest points and estimated local distances, not road distance or original full geometries. Empty successful results also cost one credit.
Request example
Send your key in the Authorization: Bearer header. Coordinates use [longitude, latitude]. Set OSRMROUTE_API_KEY locally; for dataset queries, set DATASET_ID to an owned dataset UUID. Never expose a Studio key in browser code.
cURL
curl --fail-with-body -X POST "https://osrmroute.com/api/v1/maps/datasets/$DATASET_ID/query" \
-H "Authorization: Bearer $OSRMROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"point":[2.3522,48.8566],"radius":1000,"limit":10}'