Structured Geocoding API
Search addresses with street, city, postcode and country components.
/api/v1/search/structured- Request credits
- 1
- Required scopes
geocode
Current plan limits
Free includes Routing, Route Optimization, Geocoding and Matrix within plan limits, plus a limited Truck Routing trial. Map Matching, Isochrone, Fuel Estimate and other separate APIs require a paid plan. Road Data and AI have separate Business requirements.
Replace YOUR_KEY with your own API key. Paid API requests consume credits; copying this example does not send a request.
Current plans and pricingUsage and limits
Provide street, city or postcode. Country codes contain two letters; other fields allow 100 characters. Components form a text search. Matched/different/missing comparisons and source precision are not guaranteed address validation.
Request example
Send your key in the Authorization: Bearer header. Coordinates use [longitude, latitude]. Set OSRM_API_KEY in your server environment; never expose a secret in browser code.
curl --fail-with-body -X POST "https://osrmroute.com/api/v1/search/structured" \
-H "Authorization: Bearer $OSRM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"street":"Friedrichstraße","city":"Berlin","countrycode":"DE"}'features[].id
features[].address
features[].precision
features[].match.components
features[].precision_basis
search_method: composed_address_query