Nominatim migration
Keep your /reverse and /search requests. Change the base URL, add the X-API-Key header, and check the short list of differences.
If your application already talks to a Nominatim server, you do not have to rewrite it to try BuddyGeo. The compatibility endpoints /reverse and /search accept Nominatim's query parameters and answer in Nominatim's jsonv2 shape. When you want request IDs, credit information and stable field names in the body, move to the normalized /v1 endpoints one call at a time.
What changes
| Nominatim | BuddyGeo compatibility endpoints | |
|---|---|---|
| Base URL | https://nominatim.openstreetmap.org or your own host | https://api.buddygeo.com |
| Paths | /reverse, /search | /reverse, /search (unchanged) |
| Authentication | None on the public instance, where a User-Agent or Referer identifies you | X-API-Key header |
| Limits | Usage policy of the instance | Requests per second and monthly credits of your plan |
| Response format | jsonv2, json, xml, geojson, geocodejson | jsonv2 (format=json is accepted and answers in the same shape) |
A reverse request, before and after:
# before
curl "https://nominatim.openstreetmap.org/reverse?lat=43.6426&lon=-79.3871&format=jsonv2"
# after
curl "https://api.buddygeo.com/reverse?lat=43.6426&lon=-79.3871&format=jsonv2" \
-H "X-API-Key: YOUR_API_KEY"{
"place_id": 283786944,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0.",
"osm_type": "way",
"osm_id": 461829037,
"lat": "43.642196",
"lon": "-79.386628",
"category": "tourism",
"type": "attraction",
"place_rank": 30,
"importance": 0.52,
"addresstype": "tourism",
"name": "CN Tower",
"display_name": "CN Tower, 290, Bremner Boulevard, Entertainment District, Toronto, Ontario, M5V 3L9, Canada",
"boundingbox": ["43.641657", "43.642735", "-79.387373", "-79.385883"],
"address": {
"tourism": "CN Tower",
"house_number": "290",
"road": "Bremner Boulevard",
"neighbourhood": "Entertainment District",
"city": "Toronto",
"state": "Ontario",
"ISO3166-2-lvl4": "CA-ON",
"postcode": "M5V 3L9",
"country": "Canada",
"country_code": "ca"
}
}And a search:
curl "https://api.buddygeo.com/search?q=CN%20Tower&format=jsonv2&addressdetails=1&limit=1" \
-H "X-API-Key: YOUR_API_KEY"The answer is an array of the same objects, best match first, and [] when nothing is found.
Supported parameters
/reverse
| Parameter | Support |
|---|---|
lat, lon | Required, decimal degrees |
format | jsonv2 (default) or json. Other formats are rejected with 400 invalid_query |
accept-language | Supported as a query parameter and as the Accept-Language header. The first language of the list is used. See Languages |
zoom | Reduced to three levels of detail: 18 returns the full address (the default), 16 and 17 the street, anything lower the locality |
addressdetails | 1 (default) includes the address object, 0 leaves it out |
/search
| Parameter | Support |
|---|---|
q | Required free-form query, up to 200 characters |
format | jsonv2 (default) or json |
accept-language | As for /reverse |
limit | 1 to 10, default 5 |
countrycodes | One two-letter country code. Only the first code of a comma-separated list is used |
addressdetails | 0 (default, as in Nominatim) or 1 |
Not supported
- Other formats:
xml,geojsonandgeocodejson. - Structured search:
street,city,county,state,countryandpostalcode. Join them intoqinstead. - Result shaping:
extratags,namedetails,polygon_geojsonand the other polygon options,viewbox,bounded,layer,featureType,exclude_place_ids,dedupe. They are ignored, not rejected. - Other endpoints:
/lookup,/detailsand/status. For service health, see the status page.
Differences in the response
The compatibility response is built from the same match as the normalized one, so the facts agree. The shapes differ:
Compatibility (/reverse, /search) | Normalized (/v1/reverse, /v1/search) |
|---|---|
| The place object itself, or an array of them | An envelope with request_id, outcome, credits_charged and result |
lat, lon as strings | result.location.lat, result.location.lon as numbers |
boundingbox as four strings | result.bounding_box as four numbers, both [south, north, west, east] |
display_name: every part joined with commas | result.formatted: the address as it is written locally, for example 290 Bremner Boulevard, Toronto, ON M5V 3L9, Canada |
address.road, address.city, address.state | result.components.street, .locality, .region |
address.<category> holds the place name, for example "tourism": "CN Tower" | result.components.name |
address["ISO3166-2-lvl4"], for example CA-ON | result.components.region_code (ON) with country_code |
category, type, osm_type, osm_id | result.match.category, .type, .osm_type, .osm_id |
place_rank, importance, addresstype | result.match.level and result.match.detail, a sentence explaining the match |
licence | attribution |
No match on /reverse: 200 with {"error": "Unable to geocode"} | 200 with result: null and outcome: "no_match" |
No match on /search: 200 with [] | 200 with result: null and outcome: "no_match" |
Request ID in the X-Request-Id header only | request_id in the body and in the header |
Three details to check in an existing client:
- The locality key. Nominatim puts the locality under
city,town,villageorhamletdepending on the place. BuddyGeo always usesaddress.city. A client that already tries those keys in turn keeps working. place_idis a number as in Nominatim, and as in Nominatim it is not an identifier you can carry between services. Useosm_typeandosm_idto recognise a feature.- Errors. Invalid input and authentication problems use BuddyGeo's error body with a
4xxstatus:request_id,statusand anerrorobject withcode,messageandnext_step. See Rate limits and errors.
Credits
The compatibility endpoints are billed like their /v1 counterparts: one credit for a request that returns a place, nothing for a request that does not. They appear in Usage as their own endpoints, "Reverse (Nominatim-compatible)" and "Search (Nominatim-compatible)", so you can watch a migration progress.
Moving on to /v1
There is no deadline to leave the aliases. Reasons to switch a call over:
- You want
request_id,outcomeandcredits_chargedin the body rather than inferring them. - You want numbers for coordinates and one stable key per address part.
- You want
match.level,match.detailandmatch.distance_mto judge a result.
The parameters map directly: accept-language becomes lang, zoom becomes detail (full, street or locality), countrycodes becomes country. lat, lon, q and limit keep their names.
Open in the app
Nominatim compatibility page
Interactive /reverse and /search examples, with the normalized and the compatibility response side by side.
Compatibility endpoints in the API reference
Parameters, schema and a Try it console for /reverse and /search.
The same lookup, normalized
The CN Tower example in the reverse playground, JSON view.
API keys
Create the key your Nominatim client will send.
Related guides
Authentication
Send your key in the X-API-Key header. Create one key per environment, rotate with an overlap and revoke what you no longer use.
Reverse geocoding
GET /v1/reverse turns a latitude and longitude into the nearest mapped address, with its components, its own coordinate and an explanation of the match.
Forward geocoding
GET /v1/search turns an address or place name into coordinates and returns every plausible candidate when a query is ambiguous.
Attribution
BuddyGeo results are derived from OpenStreetMap data under the Open Database License. What you need to show, and where.