Migrating from another provider
Switching geocoder usually costs a week: every call site, every response parser, every test fixture. There are two ways to spend less than that here. /v1/migrate reads a request you already make and says what it becomes and what the month costs, with no key. The compatibility routes then answer Google, Mapbox, Nominatim and LocationIQ requests at their own paths and in their own shapes, so a client can switch by changing its host and its credential, and move to the native /v1 routes later, one call site at a time.
Read a request you already make: /v1/migrate
Free and unauthenticated, because somebody deciding whether to switch has no key yet. It takes no token from any bucket and sends no rate-limit headers.
| Parameter | Default | Is |
|---|---|---|
url | required | A request you make today, complete with its query string. Percent-encode it when you put it in a query string of its own. |
volume | 100000 | Requests a month, for the price comparison. |
base | none | A prefix for the URLs it writes back, such as https://api.oslew.com. Without it they are relative paths. |
A Google request, credential and all:
curl -G "https://api.oslew.com/v1/migrate" \
--data-urlencode 'url=https://maps.googleapis.com/maps/api/geocode/json?address=Museo+Soumaya&language=es&key=AIzaDOCSEXAMPLE' \
--data-urlencode 'volume=100000'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.migrate(
"https://maps.googleapis.com/maps/api/geocode/json?address=Museo+Soumaya&language=es&key=AIzaDOCSEXAMPLE",
volume=100000,
)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.migrate("https://maps.googleapis.com/maps/api/geocode/json?address=Museo+Soumaya&language=es&key=AIzaDOCSEXAMPLE", { volume: 100000 });HTTP/1.1 200 OK
content-type: application/json
{
"vendor": "google",
"recognised": true,
"direction": "forward",
"query": "Museo Soumaya",
"ours": "/v1/geocode?q=Museo%20Soumaya&limit=5",
"compat": "/compat/google/maps/api/geocode/json?address=Museo%20Soumaya",
"parameters": [
{
"name": "address",
"value": "Museo Soumaya",
"carried": true,
"becomes": "q"
},
{
"name": "key",
"value": "«redacted»",
"carried": false,
"why": "this service authenticates with `Authorization: Bearer sk_live_…`, not a query parameter — which is also why a key in a URL is a key in every log it passes through"
},
{
"name": "language",
"value": "es",
"carried": false,
"why": "answers are in the language their source recorded; no translation layer exists"
}
],
"pricing": {
"volume": 100000,
"their_list_usd_per_1k": 5,
"their_free_monthly": 10000,
"their_bands": [
{
"up_to": 10000,
"usd_per_1k": 0
},
{
"up_to": 100000,
"usd_per_1k": 5
},
{
"up_to": 500000,
"usd_per_1k": 4
},
{
"up_to": 1000000,
"usd_per_1k": 3
},
{
"up_to": 5000000,
"usd_per_1k": 1.5
},
{
"usd_per_1k": 0.38
}
],
"their_tariff": "geocoding (essentials)",
"their_price_source": "https://developers.google.com/maps/billing-and-pricing/pricing",
"their_monthly_usd": 450,
"our_monthly_usd": 99,
"compared_plan": "address",
"saving_usd": 351,
"required_rps": 0.038580246913580245,
"planning_rps": 0.038580246913580245,
"fits_address_plan": true,
"caveat": "list prices as published in 2026-09, summed band by band; this service cannot verify a price, a free tier or a caching restriction"
},
"next": [
"Point your existing client at the `compat` URL and change only the host and the key: your response parser keeps working.",
"Or call `ours` and read the `normalized` block, which has the address in parts as well as formatted.",
"Check the parameters marked `carried: false` above: each one is a real limitation here, not a rename.",
"Pass `peak_rps` with the rate your busiest stretch holds — an import, a month-start backfill — and the plan is chosen on that rather than on the month's average.",
"Run `compare` from `geo-bench` on your own addresses before you switch. Our held-out accuracy is published and it is not flattering."
]
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
What the answer says
| Field | Says |
|---|---|
vendor, recognised | Whose request this is: mapbox, google, locationiq, nominatim, geoapify or photon, or unknown with recognised: false. |
direction | forward (text to a place), reverse (a point to places), or unknown when the URL carries neither. |
query | The text or point it pulled out of the request. |
ours | The same question on this service's own routes: /v1/geocode?q=… or /v1/reverse?at=…, with your limit carried over (clamped to 1–50; 5 when you sent none). |
compat | The compatibility route that takes the request in the vendor's own shape. Absent for Geoapify and Photon, which have no compatibility route. |
parameters | Every parameter you sent, each with carried, and either becomes (what it is called here) or why (why it has no equivalent). Nothing is left out. |
pricing | The month both ways; see below. |
next | What to do next, in sentences. |
A vendor is recognised by its host — mapbox.com, googleapis.com,locationiq.com, geoapify.com, a host containing photon ornominatim — or, failing that, by the shape of the path, so a request sent through your own gateway still reads correctly: /maps/api/geocode is Google, mapbox.places is Mapbox,search.php is LocationIQ, and a path ending in /search or /reverse is Nominatim.
Credentials are redacted, never echoed
A key, access_token, apiKey, api_key or token in the URL comes back with the value «redacted», carried: false, and the reason: this service reads its key from the Authorization header only. A key in a URL is a key in every log the URL passes through, which is why it is not read here and not repeated back to you. Your key does still travel to this service inside the url parameter, though — so use a revoked or placeholder key when you paste one in.
What does not carry, and why
Each parameter marked carried: false is a real limitation of this service, not a rename, and thewhy says so in a sentence you can take to whoever owns the call site:
| Their parameter | Here |
|---|---|
limit | Carried, as limit. |
addressdetails, format | Carried: the address parts are always in the answer, and the answer is always JSON. |
language | Not carried. Answers are in the language their source recorded; there is no translation layer. |
types | Not carried. One index answers every kind of place; there is no feature-type filter. |
bbox | Not carried. There is no bounding-box filter; near constrains results to roughly a city instead. |
country, countrycodes | Not carried. Filtering is by administrative name, not ISO code: put the country after the last comma of the query. |
components | Not carried. Put the locality or postcode after a comma in the query instead. |
| anything else | Not carried, as "not a parameter this service has an equivalent for" — Mapbox's proximity, for example. |
Most of these have a native equivalent that is not a filter: the text after the last comma of ageocoding query is resolved as administrative context — a city, a region, an ISO code or a postcode — and a near point confines results to about a city around it. Seegetting better accuracy.
The price, and the rate that actually decides the plan
| Field | Is |
|---|---|
volume | The requests a month the comparison assumes. |
their_bands, their_tariff, their_price_source | Every published volume band the bill is summed across, which of the vendor's prices it is, and the page it was read from. Mapbox's temporary and permanent geocoding are different tariffs: a mapbox.places-permanent path or permanent=true selects the permanent one. Only for Mapbox and Google; absent for the others. |
their_list_usd_per_1k, their_free_monthly | Their first price past the free allowance, and the free allowance itself. |
their_monthly_usd | What the volume costs them, band by band: each band's requests at that band's price. A volume discount is counted where the vendor publishes it. |
compared_plan | The cheapest plan here whose sustained Address rate carries planning_rps: address, scale, or enterprise when no listed plan does. |
our_monthly_usd | The price of compared_plan, whatever the volume — a plan is a rate, not an allowance, so the bill does not grow with the month. For enterprise it is the top listed price, as a floor. |
saving_usd | The difference. Negative when their free tier covers your volume, and it says so rather than hiding it. Absent when the plan that fits is negotiated. |
required_rps | The volume spread evenly over 30 days: volume ÷ 2,592,000, in requests a second. |
peak_rps, planning_rps | The peak you passed as peak_rps, echoed, and the busier of it and required_rps — the rate the plan was chosen on. |
fits_address_plan | Whether planning_rps is at most 20, the Address plan's sustained rate. |
caveat | When the price list was written, that this service cannot verify a vendor's price, free tier or caching restriction, and — for an unpriced vendor — why there is no price. |
Only Mapbox and Google are priced. LocationIQ and Geoapify sell daily tiers rather than a per-thousand list price, Nominatim's public instance is not for this kind of load, and Photon is software you run: each is reported unpriced, with the reason in caveat, rather than guessed at. The same comparison for a larger Mapbox volume:
Five million Mapbox requests a month
HTTP/1.1 200 OK
content-type: application/json
{
"vendor": "mapbox",
"recognised": true,
"direction": "forward",
"query": "Museo Soumaya",
"ours": "/v1/geocode?q=Museo%20Soumaya&limit=1",
"compat": "/compat/mapbox/geocoding/v5/mapbox.places/Museo%20Soumaya.json",
"parameters": [
{
"name": "access_token",
"value": "«redacted»",
"carried": false,
"why": "this service authenticates with `Authorization: Bearer sk_live_…`, not a query parameter — which is also why a key in a URL is a key in every log it passes through"
},
{
"name": "limit",
"value": "1",
"carried": true,
"becomes": "limit"
},
{
"name": "proximity",
"value": "-99.2,19.4",
"carried": false,
"why": "not a parameter this service has an equivalent for"
}
],
"pricing": {
"volume": 5000000,
"their_list_usd_per_1k": 0.75,
"their_free_monthly": 100000,
"their_bands": [
{
"up_to": 100000,
"usd_per_1k": 0
},
{
"up_to": 500000,
"usd_per_1k": 0.75
},
{
"up_to": 1000000,
"usd_per_1k": 0.6
},
{
"usd_per_1k": 0.45
}
],
"their_tariff": "temporary geocoding",
"their_price_source": "https://www.mapbox.com/pricing",
"their_monthly_usd": 2400,
"our_monthly_usd": 99,
"compared_plan": "address",
"saving_usd": 2301,
"required_rps": 1.9290123456790123,
"planning_rps": 1.9290123456790123,
"fits_address_plan": true,
"caveat": "list prices as published in 2026-09, summed band by band; this service cannot verify a price, a free tier or a caching restriction"
},
"next": [
"Point your existing client at the `compat` URL and change only the host and the key: your response parser keeps working.",
"Or call `ours` and read the `normalized` block, which has the address in parts as well as formatted.",
"Check the parameters marked `carried: false` above: each one is a real limitation here, not a rename.",
"Pass `peak_rps` with the rate your busiest stretch holds — an import, a month-start backfill — and the plan is chosen on that rather than on the month's average.",
"Run `compare` from `geo-bench` on your own addresses before you switch. Our held-out accuracy is published and it is not flattering."
]
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
required_rps is an average. Traffic arrives in peaks — an import, a month-start backfill — and a plan's rate is a sustained rate with a burst on top, so pass peak_rps with the rate your busiest stretch holds and the comparison is made against the plan that carries it rather than the one the average fits. Seerate limits and products and plans for what each plan sustains.
Or change almost nothing: the compatibility routes
Four vendors' request and response shapes, at their own paths under /compat/, with this service's data inside. They are not proxies: nothing is sent to the vendor, and every answer says whose data it is.
| Vendor | Forward | Reverse |
|---|---|---|
/compat/google/maps/api/geocode/json?address=… | the same path, ?latlng=lat,lng | |
| Mapbox | /compat/mapbox/geocoding/v5/mapbox.places/{search_text} | the same path, with lon,lat as the search text |
| Nominatim | /compat/nominatim/search?q=… | /compat/nominatim/reverse?lat=…&lon=… |
| LocationIQ | /compat/locationiq/v1/search.php?q=… | /compat/locationiq/v1/reverse.php?lat=…&lon=… |
What every compatibility route has in common
- The key goes in the
Authorizationheader. Their credential parameters — Google'skey, Mapbox'saccess_token, LocationIQ'skey— are accepted so that an existing request does not break, and ignored. A vendor SDK that cannot send a custom header cannot authenticate here; call the path from your own HTTP client. See authentication. - They are the Address product. Each request takes one token from the key's address bucket — the same bucket
/v1/geocodedraws on — so they are available on every self-serve plan, free included. - Forward is
/v1/geocode, reverse is/v1/reverse. Forward runs with nonearand with house-number interpolation on; the text after the last comma is still resolved as administrative context. At most 10 results, whatever the vendor's own ceiling. - Every result gains a
provenanceobject the vendor's shape does not have:{name, release, licence, served_by}. It is spelledlicencehere, notlicenseas on/v1. A parser ignores a field it does not know; a person who looks can see whose data this is and on what terms. See data and licensing. - Errors are this service's. A refusal is
{"error": "…"}with a400, and401,403and429are the same as everywhere else — except where the vendor's contract puts an error inside a200, noted below. A vendor's error shape is not imitated: once you have switched, you should be debugging against this documentation, not theirs. - Identifiers are not theirs, and not durable. Google's
place_id, Mapbox'sidand Nominatim'splace_idcarry the result's ordinal within the data segment that answered. Do not store one as a lasting key for a place, and never send one back to the vendor. - Boxes are the error bar, not the feature. Google's
viewport, Mapbox'sbboxand Nominatim'sboundingboxare a square reachingprecision_m(at least 1 m) either side of the point — how far the position can be wrong — not the extent of a building or a city. - Coverage is this service's data, not the vendor's. What a query finds depends on what is loaded for that area. A field there is no data for is
nullor absent, never invented.
| Parameter | Here |
|---|---|
address | Honoured: free text, forward. |
latlng | Honoured: lat,lng, reverse. When both are sent, latlng wins. |
limit | Not Google's: results to return, default 5, at most 10. |
key, language, components | Accepted and ignored. |
curl -G "https://api.oslew.com/compat/google/maps/api/geocode/json" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'address=Museo Soumaya' \
--data-urlencode 'limit=1'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.compat_google_maps_api_geocode_json(address="Museo Soumaya", limit=1)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.compat_google_maps_api_geocode_json({ address: "Museo Soumaya", limit: 1 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 299
ratelimit-reset: 1
{
"results": [
{
"address_components": [
{
"long_name": "Miguel Hidalgo",
"short_name": "Miguel Hidalgo",
"types": [
"locality",
"political"
]
},
{
"long_name": "CMX",
"short_name": "CMX",
"types": [
"administrative_area_level_1",
"political"
]
},
{
"long_name": "MX",
"short_name": "MX",
"types": [
"country",
"political"
]
}
],
"confidence": 0.5,
"formatted_address": "Museo Soumaya, Miguel Hidalgo, CMX, MX",
"geometry": {
"location": {
"lat": 19.44062110346353,
"lng": -99.20465953606559
},
"location_type": "GEOMETRIC_CENTER",
"viewport": {
"northeast": {
"lat": 19.440681794925386,
"lng": -99.20459517519265
},
"southwest": {
"lat": 19.440560412001677,
"lng": -99.20472389693853
}
}
},
"place_id": "geoalt:348329",
"precision_m": 6.756173533775122,
"provenance": {
"licence": "CDLA-Permissive-2.0",
"name": "overture-places",
"release": "2026-08-19.0",
"served_by": "geospatial-alt"
},
"types": [
"point_of_interest",
"establishment"
]
}
],
"status": "OK"
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
statusis real and means what Google's does:OK,ZERO_RESULTS, orINVALID_REQUESTwith anerror_message— for neitheraddressnorlatlng, or alatlngthat does not parse — inside a200, as Google does it. It is neverOVER_QUERY_LIMIT: going faster than your plan is a real429withRetry-After, before the route runs. A client that only ever looks atstatusneeds to handle the HTTP status too.place_idis prefixedgeoalt:, on purpose not shaped like a Google place id, so that one stored and later sent to Google fails loudly instead of naming a different place.address_componentsuses the typesstreet_number,route,locality,administrative_area_level_1,postal_codeandcountry.long_nameandshort_nameare always the same value — the one the source recorded, which for a region or country is often a code, likeCMXandMXabove.typesfollows what matched:street_addressfor an address,routefor a street,point_of_interestandestablishmentfor a place,postal_codeand the political types for areas.- Three fields are added:
precision_m,confidence(nullon a reverse lookup) andprovenance.
location_type is mapped from this service's precision, never claiming more than matched:
precision | location_type |
|---|---|
rooftop | ROOFTOP |
interpolated | RANGE_INTERPOLATED |
address, street, poi | GEOMETRIC_CENTER |
postcode, locality, region, country | APPROXIMATE |
Mapbox
Geocoding v5, at /compat/mapbox/geocoding/v5/mapbox.places/{search_text}. search_text may end in .json, as theirs does. Mapbox uses one path for both directions and so does this: search text that is two numbers, a valid longitude then a valid latitude, is a reverse lookup — lon,lat, Mapbox's order, the opposite of every /v1 route. Anything else is forward text.
| Parameter | Here |
|---|---|
limit | Honoured: default 5, at most 10. |
proximity | Accepted and ignored. It is not a bias here, and forward lookups run with no near. |
country | Accepted and ignored; not a filter. |
autocomplete | Accepted and ignored: there is no autocomplete mode on this path. /v1/autocomplete is the route for that. |
access_token | Accepted and ignored. |
curl -G "https://api.oslew.com/compat/mapbox/geocoding/v5/mapbox.places/Museo%20Soumaya.json" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'limit=1'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.compat_mapbox_geocoding_v5_mapbox_places(
"Museo Soumaya.json",
limit=1,
)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.compat_mapbox_geocoding_v5_mapbox_places("Museo Soumaya.json", { limit: 1 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 298
ratelimit-reset: 1
{
"attribution": "geospatial-alt; data: CDLA-Permissive-2.0",
"features": [
{
"bbox": [
-99.20472389693853,
19.440560412001677,
-99.20459517519265,
19.440681794925386
],
"center": [
-99.20465953606559,
19.44062110346353
],
"context": [
{
"id": "place.0",
"text": "Miguel Hidalgo"
},
{
"id": "region.0",
"text": "CMX"
},
{
"id": "country.0",
"short_code": "mx",
"text": "MX"
}
],
"geometry": {
"coordinates": [
-99.20465953606559,
19.44062110346353
],
"type": "Point"
},
"id": "poi.348329",
"place_name": "Museo Soumaya, Miguel Hidalgo, CMX, MX",
"place_type": [
"poi"
],
"properties": {
"accuracy": "poi",
"accuracy_m": 6.756173533775122,
"provenance": {
"licence": "CDLA-Permissive-2.0",
"name": "overture-places",
"release": "2026-08-19.0",
"served_by": "geospatial-alt"
}
},
"relevance": 0.5,
"text": "Museo Soumaya",
"type": "Feature"
}
],
"query": [
"museo",
"soumaya"
],
"type": "FeatureCollection"
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
centerandgeometry.coordinatesare[lon, lat];bboxis west, south, east, north.place_typehas one entry —address,street,postcode,place,region,countryorpoi— andidis that type, a dot and the result's ordinal.relevanceis the calibratedconfidence, not a text-similarity score; on a reverse lookup it is1.propertiescarriesaccuracy(this service'sprecisionvalue),accuracy_mandprovenance.contextentries arepostcode.0,place.0,region.0andcountry.0; the country entry has a lower-caseshort_code.addressis the house number, when there is one.queryis the search text as this index tokenised it, andattributionnames this service and the licence codes of the data in the answer.
Nominatim
| Parameter | Here |
|---|---|
q | Honoured on /search; required. |
lat, lon | Honoured on /reverse; both required, as numbers. |
format | jsonv2 (the default) or json. geojson and xml are refused with a 400 rather than answered in a shape you did not ask for. |
limit | Honoured on /search: default 10, at most 10. /reverse answers one place. |
addressdetails | Accepted and ignored: the address object is always included. |
countrycodes | Accepted and ignored; not a filter. |
curl -G "https://api.oslew.com/compat/nominatim/search" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'q=Museo Soumaya' \
--data-urlencode 'limit=1'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.compat_nominatim_search("Museo Soumaya", limit=1)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.compat_nominatim_search("Museo Soumaya", { limit: 1 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 297
ratelimit-reset: 1
[
{
"address": {
"city": "Miguel Hidalgo",
"country_code": "mx",
"state": "CMX"
},
"addresstype": "yes",
"boundingbox": [
"19.440560412001677",
"19.440681794925386",
"-99.20472389693853",
"-99.20459517519265"
],
"category": "place",
"display_name": "Museo Soumaya, Miguel Hidalgo, CMX, MX",
"importance": 0.5,
"lat": "19.44062110346353",
"licence": "CDLA-Permissive-2.0 (overture-places)",
"lon": "-99.20465953606559",
"name": "Museo Soumaya",
"osm_id": null,
"osm_type": null,
"place_id": 348329,
"place_rank": 30,
"precision_m": 6.756173533775122,
"provenance": {
"licence": "CDLA-Permissive-2.0",
"name": "overture-places",
"release": "2026-08-19.0",
"served_by": "geospatial-alt"
},
"type": "yes"
}
]A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Two fields are deliberately not copied, and the rest are real:
licenceis ours, as"<licence code> (<dataset>)"— the data is not OpenStreetMap's, and a field whose purpose is attribution is the last place to be careless.osm_typeandosm_idarenull. There is no honest OSM object to name, and an invented one would make your data unreconcilable with the real thing.latandlonare strings, as this family has always written them, andboundingboxis four strings: south, north, west, east.typedescribes the thing:house,road,postcode,city,state,country, oryesfor a place.importanceis the calibratedconfidence;0on a reverse lookup.addresshashouse_number,road,city,state,postcodeandcountry_code(lower case), each only when known.jsonv2addscategory(alwaysplace),addresstype,nameandplace_rank(30 for an address or a place, 26 a street, 21 a postcode, 16 a city, 8 a region, 4 a country).precision_mandprovenanceare added; a reverse answer addsdistance_mfrom the point asked about.
/reverse answers one object, not an array, as Nominatim does, and when nothing is near it answers200 with {"error": "Unable to geocode"} — Nominatim's own convention. Nominatim'szoom and other parameters are not read: the answer is the nearest address or place.
curl -G "https://api.oslew.com/compat/nominatim/reverse" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'lat=19.4406' \
--data-urlencode 'lon=-99.2047'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.compat_nominatim_reverse(19.4406, -99.2047)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.compat_nominatim_reverse(19.4406, -99.2047);HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 296
ratelimit-reset: 1
{
"address": {
"city": "Miguel Hidalgo",
"country_code": "mx",
"state": "CMX"
},
"addresstype": "yes",
"boundingbox": [
"19.440560412001677",
"19.440681794925386",
"-99.20472389693853",
"-99.20459517519265"
],
"category": "place",
"display_name": "Museo Soumaya, Miguel Hidalgo, CMX, MX",
"distance_m": 4.848551852818172,
"importance": 0,
"lat": "19.44062110346353",
"licence": "CDLA-Permissive-2.0 (overture-places)",
"lon": "-99.20465953606559",
"name": "Museo Soumaya",
"osm_id": null,
"osm_type": null,
"place_id": 348329,
"place_rank": 30,
"precision_m": 6.756173533775122,
"provenance": {
"licence": "CDLA-Permissive-2.0",
"name": "overture-places",
"release": "2026-08-19.0",
"served_by": "geospatial-alt"
},
"type": "yes"
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
LocationIQ
LocationIQ serves the Nominatim shape, so this is the Nominatim rendering above at LocationIQ's paths, with LocationIQ's key accepted and ignored. /v1/search.php takes q,format, limit (default 10, at most 10) and addressdetails;/v1/reverse.php takes lat, lon and format. The same caveats hold: licence is ours, and osm_type and osm_id are null.
curl -G "https://api.oslew.com/compat/locationiq/v1/search.php" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'q=Museo Soumaya' \
--data-urlencode 'format=json' \
--data-urlencode 'limit=1'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.compat_locationiq_v1_search_php(
"Museo Soumaya",
format="json",
limit=1,
)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.compat_locationiq_v1_search_php("Museo Soumaya", { format: "json", limit: 1 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 295
ratelimit-reset: 1
[
{
"address": {
"city": "Miguel Hidalgo",
"country_code": "mx",
"state": "CMX"
},
"boundingbox": [
"19.440560412001677",
"19.440681794925386",
"-99.20472389693853",
"-99.20459517519265"
],
"display_name": "Museo Soumaya, Miguel Hidalgo, CMX, MX",
"importance": 0.5,
"lat": "19.44062110346353",
"licence": "CDLA-Permissive-2.0 (overture-places)",
"lon": "-99.20465953606559",
"osm_id": null,
"osm_type": null,
"place_id": 348329,
"precision_m": 6.756173533775122,
"provenance": {
"licence": "CDLA-Permissive-2.0",
"name": "overture-places",
"release": "2026-08-19.0",
"served_by": "geospatial-alt"
},
"type": "yes"
}
]A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
curl -G "https://api.oslew.com/compat/locationiq/v1/reverse.php" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'lat=19.4406' \
--data-urlencode 'lon=-99.2047' \
--data-urlencode 'format=json'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.compat_locationiq_v1_reverse_php(19.4406, -99.2047, format="json")import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.compat_locationiq_v1_reverse_php(19.4406, -99.2047, { format: "json" });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 294
ratelimit-reset: 1
{
"address": {
"city": "Miguel Hidalgo",
"country_code": "mx",
"state": "CMX"
},
"boundingbox": [
"19.440560412001677",
"19.440681794925386",
"-99.20472389693853",
"-99.20459517519265"
],
"display_name": "Museo Soumaya, Miguel Hidalgo, CMX, MX",
"distance_m": 4.848551852818172,
"importance": 0,
"lat": "19.44062110346353",
"licence": "CDLA-Permissive-2.0 (overture-places)",
"lon": "-99.20465953606559",
"osm_id": null,
"osm_type": null,
"place_id": 348329,
"precision_m": 6.756173533775122,
"provenance": {
"licence": "CDLA-Permissive-2.0",
"name": "overture-places",
"release": "2026-08-19.0",
"served_by": "geospatial-alt"
},
"type": "yes"
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
A migration plan
- Run
/v1/migrateon one real request from each call site. Read everycarried: false: each is a behaviour your code may depend on. - Point the base URL at the compatibility path and move the key into a header. Remove the vendor's credential from the URL while you are there: it is ignored, and it is still a secret in your logs.
- Compare answers on your own addresses before switching traffic. Coverage and accuracy depend on the data loaded for your area; getting better accuracy publishes how this service measures on held-out addresses.
- Move call sites to
/v1when you want what the vendor shapes cannot carry — not as a precondition of switching.
curl "https://maps.googleapis.com/maps/api/geocode/json?address=Museo+Soumaya&key=$GOOGLE_KEY"# The same path and parameters under /compat/google; the key in a header.
curl -H "Authorization: Bearer $GEO_API_KEY" \
"https://api.oslew.com/compat/google/maps/api/geocode/json?address=Museo+Soumaya"curl -H "Authorization: Bearer $GEO_API_KEY" \
"https://api.oslew.com/v1/geocode?q=Museo+Soumaya&limit=5"What moving to /v1 buys
The vendor shapes have nowhere to put the fields that say whether an answer can be trusted. On/v1/geocode every answer carries them — see reading a result:
tied_at_top: how many candidates share the best score. More than 1 means the query does not name one place — the case a vendor shape silently answers with the first of many.confidence, calibrated: how often answers like this one were right. The compatibility shapes carry it asrelevance,importanceor an extra field, but not the tie it depends on.precisionandprecision_m: nine values fromrooftoptocountry, and an honest radius, wherelocation_typehas four.context_resolution: how the text after the last comma was matched, andfallback: truewhen nothing matched it and the answer ignores it.normalized, the address in parts and formatted;near;limitup to 50; andinterpolate=falsewhen you want only recorded house numbers.
Where the fields you read today live on /v1/geocode:
| Mapbox | Nominatim | /v1/geocode result | |
|---|---|---|---|
geometry.location.lat, .lng | center[1], center[0] | lat, lon (strings) | lat, lon (numbers) |
formatted_address | place_name | display_name | normalized.formatted |
geometry.location_type | properties.accuracy | type | precision, precision_m |
address_components | context, address | address | normalized, hierarchy |
| — | relevance | importance | confidence, and tied_at_top on the answer |
status | — | — | the HTTP status; an empty results is 200 |
from oslew import Client
client = Client(base_url="https://api.oslew.com")
answer = client.geocode("Museo Soumaya, Miguel Hidalgo", limit=5)
if not answer["results"]:
... # was status == "ZERO_RESULTS"
elif answer["tied_at_top"] > 1:
... # several places fit: ask, or add context
else:
top = answer["results"][0]
lat, lon = top["lat"], top["lon"] # was geometry.location.lat / .lng
shown = top["normalized"]["formatted"] # was formatted_address
how_close = top["precision_m"] # metres, where location_type was a wordimport { Client } from "@oslew/client";
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.geocode("Museo Soumaya, Miguel Hidalgo", { limit: 5 });
if (answer.results.length === 0) {
// was status === "ZERO_RESULTS"
} else if (answer.tied_at_top > 1) {
// several places fit: ask, or add context
} else {
const top = answer.results[0];
const { lat, lon } = top; // was geometry.location.lat / .lng
const shown = top.normalized.formatted; // was formatted_address
const howClose = top.precision_m; // metres, where location_type was a word
}Endpoints
/v1/migrateno keyPaste a request you already make to another provider; get this service's equivalent, every parameter that does not carry over and why, and what the month costs either way.
/compat/google/maps/api/geocode/jsonaddressThe Google Geocoding API's shape over this service's data: results and a status, at their path.
/compat/mapbox/geocoding/v5/mapbox.places/{search_text}addressMapbox Geocoding v5's shape over this service's data: a FeatureCollection, at their path. Free text forward, lon,lat reverse, as they do it.
/compat/nominatim/searchaddressNominatim's search shape over this service's data: an array of objects with string coordinates and a boundingbox.
/compat/nominatim/reverseaddressNominatim's reverse shape: one object, not an array, as theirs is.
/compat/locationiq/v1/search.phpaddressLocationIQ's search.php: the Nominatim shape at their path, with key accepted and ignored.