Your first request
From nothing to an answer you can act on in six steps. The first needs no account: it is the same service, answering one city with no key.
1. Try it without a key
The demo surface answers Mexico City with no key, at about one call every two seconds per visitor. It is for seeing what an answer looks like before you sign up, not for building on:
curl -G "https://api.oslew.com/demo/v1/geocode" \
--data-urlencode 'q=Museo Soumaya' \
--data-urlencode 'limit=2'HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 4
ratelimit-remaining: 3
ratelimit-reset: 2
x-oslew-demo: 1
{
"query": "Museo Soumaya",
"name": "Museo Soumaya",
"context": null,
"parse": {
"name": "Museo Soumaya",
"method": "passthrough"
},
"context_resolution": null,
"near": null,
"results": [
{
"doc": 348329,
"name": "Museo Soumaya",
"lat": 19.44062110346353,
"lon": -99.20465953606559,
"bbox": [
19.440487037931074,
19.440755168997644,
-99.20478863854248,
-99.20453043361198
],
"precision": "poi",
"precision_m": 6.756173533775122,
"hierarchy": {
"locality": "Miguel Hidalgo",
"region": "CMX",
"country": "MX",
"category": "museum",
"postcode": null,
"street": null
},
"normalized": {
"locality": "Miguel Hidalgo",
"region": "CMX",
"country": "MX",
"formatted": "Museo Soumaya, Miguel Hidalgo, CMX, MX"
},
"components": {
"name": "exact",
"house_number": "missing",
"street": "missing",
"locality": "missing",
"region": "missing",
"postcode": "missing",
"country": "missing"
},
"confidence": 0.5,
"why": {
"tokens": [
"museo",
"soumaya"
],
"matched": 2,
"extra": 0,
"mode": "all",
"tied": false,
"prominence": 5,
"rerank": 87
},
"provenance": {
"name": "overture-places",
"release": "2026-08-19.0",
"license": "CDLA-Permissive-2.0"
},
"attributes": {
"rating": null,
"reviews": 0,
"price": null,
"hours": [
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
]
],
"photo": "https://commons.wikimedia.org/wiki/Special:FilePath/Museo_Soumaya%2C_Ciudad_de_M%C3%A9xico%2C_M%C3%A9xico%2C_2015-07-18%2C_DD_12.JPG",
"provenance": {
"name": "wikidata",
"release": "2026-11-23",
"license": "CC0; images under their Commons licences"
}
}
},
{
"doc": 318314,
"name": "Museo Soumaya",
"lat": 19.33886538628843,
"lon": -99.19254435060174,
"bbox": [
19.338731342470982,
19.33899943010779,
-99.19267344656319,
-99.19241525466357
],
"precision": "poi",
"precision_m": 6.756173533775122,
"hierarchy": {
"locality": "Álvaro Obregón",
"region": "CMX",
"country": "MX",
"category": "museum",
"postcode": null,
"street": null
},
"normalized": {
"locality": "Álvaro Obregón",
"region": "CMX",
"country": "MX",
"formatted": "Museo Soumaya, Álvaro Obregón, CMX, MX"
},
"components": {
"name": "exact",
"house_number": "missing",
"street": "missing",
"locality": "missing",
"region": "missing",
"postcode": "missing",
"country": "missing"
},
"confidence": 0.5,
"why": {
"tokens": [
"museo",
"soumaya"
],
"matched": 2,
"extra": 0,
"mode": "all",
"tied": false,
"prominence": 0,
"rerank": 85
},
"provenance": {
"name": "overture-places",
"release": "2026-08-19.0",
"license": "CDLA-Permissive-2.0"
},
"attributes": null
}
],
"mode": "all",
"tied_at_top": 1,
"tie_probe": 32,
"interpolated": false,
"decision": {
"action": "refuse",
"margin": 0.03733337
},
"epoch": 30,
"release": "2026-08-19.0",
"examined": 420,
"postings": 424,
"segments": 2,
"store_requests": 0,
"store_bytes": 0,
"took_us": 10668
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Two museums answered, because Mexico City has two Museo Soumaya buildings, in Plaza Carso and in Plaza Loreto. Step 5 reads that answer properly. What the demo serves and how it is paced: trying it without a key.
2. Sign up
Open console.oslew.com/signup, give your organisation's name and your email address, and press Email me a link. There is no password. Nothing is created until you open the link in that email, because that is what proves the address is yours. Opening it creates your organisation on theFree plan (free), which answers the address routes at 1 request a second with a burst of 5. Afterwards you sign in atconsole.oslew.com/signin the same way.
3. Mint a key
In the console, open Keys. Under Mint a key, name it after what will use it, pick the plan it draws on and live or test, and press Mint. The secret is shown once; only a SHA-256 of it is kept. Put it in an environment variable, where both clients look for it:
export GEO_API_KEY=sk_live_…Keys, rotation, and why a key never goes in a browser or a mobile app:authentication.
4. Install a client, or use curl
Everything is HTTPS and JSON, so curl is enough. The clients are generated from the same OpenAPI document as the reference, have no dependencies, and turn each refusal into an exception you can catch:
pip install oslewnpm install @oslew/client5. Ask for a place, and read the answer
curl -G "https://api.oslew.com/v1/geocode" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'q=Museo Soumaya' \
--data-urlencode 'limit=3'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.geocode("Museo Soumaya", limit=3)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.geocode("Museo Soumaya", { limit: 3 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 299
ratelimit-reset: 1
{
"query": "Museo Soumaya",
"name": "Museo Soumaya",
"context": null,
"parse": {
"name": "Museo Soumaya",
"method": "passthrough"
},
"context_resolution": null,
"near": null,
"results": [
{
"doc": 348329,
"name": "Museo Soumaya",
"lat": 19.44062110346353,
"lon": -99.20465953606559,
"bbox": [
19.440487037931074,
19.440755168997644,
-99.20478863854248,
-99.20453043361198
],
"precision": "poi",
"precision_m": 6.756173533775122,
"hierarchy": {
"locality": "Miguel Hidalgo",
"region": "CMX",
"country": "MX",
"category": "museum",
"postcode": null,
"street": null
},
"normalized": {
"locality": "Miguel Hidalgo",
"region": "CMX",
"country": "MX",
"formatted": "Museo Soumaya, Miguel Hidalgo, CMX, MX"
},
"components": {
"name": "exact",
"house_number": "missing",
"street": "missing",
"locality": "missing",
"region": "missing",
"postcode": "missing",
"country": "missing"
},
"confidence": 0.5,
"why": {
"tokens": [
"museo",
"soumaya"
],
"matched": 2,
"extra": 0,
"mode": "all",
"tied": false,
"prominence": 5,
"rerank": 87
},
"provenance": {
"name": "overture-places",
"release": "2026-08-19.0",
"license": "CDLA-Permissive-2.0"
},
"attributes": {
"rating": null,
"reviews": 0,
"price": null,
"hours": [
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
]
],
"photo": "https://commons.wikimedia.org/wiki/Special:FilePath/Museo_Soumaya%2C_Ciudad_de_M%C3%A9xico%2C_M%C3%A9xico%2C_2015-07-18%2C_DD_12.JPG",
"provenance": {
"name": "wikidata",
"release": "2026-11-23",
"license": "CC0; images under their Commons licences"
}
}
},
{
"doc": 318314,
"name": "Museo Soumaya",
"lat": 19.33886538628843,
"lon": -99.19254435060174,
"bbox": [
19.338731342470982,
19.33899943010779,
-99.19267344656319,
-99.19241525466357
],
"precision": "poi",
"precision_m": 6.756173533775122,
"hierarchy": {
"locality": "Álvaro Obregón",
"region": "CMX",
"country": "MX",
"category": "museum",
"postcode": null,
"street": null
},
"normalized": {
"locality": "Álvaro Obregón",
"region": "CMX",
"country": "MX",
"formatted": "Museo Soumaya, Álvaro Obregón, CMX, MX"
},
"components": {
"name": "exact",
"house_number": "missing",
"street": "missing",
"locality": "missing",
"region": "missing",
"postcode": "missing",
"country": "missing"
},
"confidence": 0.5,
"why": {
"tokens": [
"museo",
"soumaya"
],
"matched": 2,
"extra": 0,
"mode": "all",
"tied": false,
"prominence": 0,
"rerank": 85
},
"provenance": {
"name": "overture-places",
"release": "2026-08-19.0",
"license": "CDLA-Permissive-2.0"
},
"attributes": null
},
{
"doc": 385507,
"name": "Museo Soumaya - Auguste Rondin",
"lat": 19.53106621771892,
"lon": -99.23296424906052,
"bbox": [
19.530932130179863,
19.531200305259414,
-99.23309336673412,
-99.23283513141011
],
"precision": "poi",
"precision_m": 6.756173533775122,
"hierarchy": {
"locality": "Tlalnepantla de Baz",
"region": null,
"country": "MX",
"category": "museum",
"postcode": null,
"street": null
},
"normalized": {
"locality": "Tlalnepantla de Baz",
"country": "MX",
"formatted": "Museo Soumaya - Auguste Rondin, Tlalnepantla de Baz, MX"
},
"components": {
"name": "exact",
"house_number": "missing",
"street": "missing",
"locality": "missing",
"region": "missing",
"postcode": "missing",
"country": "missing"
},
"confidence": 0.5,
"why": {
"tokens": [
"museo",
"soumaya"
],
"matched": 2,
"extra": 2,
"mode": "all",
"tied": false,
"prominence": 0,
"rerank": 55
},
"provenance": {
"name": "overture-places",
"release": "2026-08-19.0",
"license": "CDLA-Permissive-2.0"
},
"attributes": null
}
],
"mode": "all",
"tied_at_top": 1,
"tie_probe": 32,
"interpolated": false,
"decision": {
"action": "refuse",
"margin": 0.03733337
},
"epoch": 30,
"release": "2026-08-19.0",
"examined": 420,
"postings": 424,
"segments": 2,
"store_requests": 0,
"store_bytes": 0,
"took_us": 12238
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
A position is the least of it. Read these fields first.
decision: what to do with it
act means the top result stands clear of the rest: use it. ask means it is probably right but one more field would settle it, named in ask_for. refuse means the top candidates are too close to call. Here it is refuse, with a margin of about 0.04 against a threshold of 0.12: both Soumaya buildings match the name well, and nothing in the query picks one. Show the user both, or add context. Decisions and receipts covers each case.
tied_at_top
How many candidates shared exactly the best score. 1 means one candidate scored highest, as here; more means the query named that many places equally well. It is counted before the list is cut tolimit, so it does not change with limit.
precision
What actually matched: rooftop when an address point carried the house number asked for,interpolated when the position was placed between two recorded numbers, street when there was no number to place, poi for a place like the museums above.
confidence
Calibrated: the share of results with the same shape that were right on a scored hold-out. A result in a group too small to measure reports 0.5, which means "not measured", not "a coin toss".
provenance
Which dataset, which release, and a licence code, per result. Address and place results are permissive; routing, boundary, time-zone and map data derive from ODbL sources and carry share-alike. Seedata and licensing.
6. Give it context
Text after the last comma is administrative context. For an address, a postcode is the most valuable thing you can send: on Mexico City hold-outs it takes the median error from 673 m to 93 m.
curl -G "https://api.oslew.com/v1/geocode" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'q=Avenida Insurgentes Sur 1602, 03940' \
--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.geocode("Avenida Insurgentes Sur 1602, 03940", 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.geocode("Avenida Insurgentes Sur 1602, 03940", { limit: 1 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 299
ratelimit-reset: 1
{
"query": "Avenida Insurgentes Sur 1602, 03940",
"name": "Avenida Insurgentes Sur 1602",
"context": "03940",
"parse": {
"name": "Avenida Insurgentes Sur 1602",
"context": "03940",
"house_number": "1602",
"street": "Avenida Insurgentes Sur",
"postcode": "03940",
"method": "comma_parts"
},
"context_resolution": {
"terms": [
"03940"
],
"divisions": [],
"known": true,
"fallback": false
},
"near": null,
"results": [
{
"doc": 1645192,
"name": "AVENIDA INSURGENTES SUR 1602",
"lat": 19.364069672979937,
"lon": -99.18198831998704,
"bbox": [
19.3639356260916,
19.36420371987013,
-99.18211741026626,
-99.18185922973113
],
"precision": "rooftop",
"precision_m": 6.756173533775122,
"hierarchy": {
"locality": "Ciudad de México",
"region": null,
"country": "MX",
"category": null,
"postcode": "03940",
"street": "AVENIDA INSURGENTES SUR"
},
"normalized": {
"house_number": "1602",
"street": "AVENIDA INSURGENTES SUR",
"locality": "Ciudad de México",
"postcode": "03940",
"country": "MX",
"formatted": "AVENIDA INSURGENTES SUR 1602, Ciudad de México, 03940, MX"
},
"components": {
"name": "exact",
"house_number": "exact",
"street": "exact",
"locality": "exact",
"region": "missing",
"postcode": "exact",
"country": "missing"
},
"confidence": 0.72772276,
"why": {
"tokens": [
"1602",
"avenida",
"insurgentes",
"sur"
],
"matched": 4,
"extra": 0,
"mode": "all",
"tied": false,
"prominence": 0,
"rerank": 100
},
"provenance": {
"name": "overture-addresses",
"release": "2026-08-19.0",
"license": "permissive (per-source, see record)"
},
"attributes": null
}
],
"mode": "all",
"tied_at_top": 1,
"tie_probe": 16,
"interpolated": false,
"decision": {
"action": "act",
"margin": 0.18940592
},
"epoch": 30,
"release": "2026-08-19.0",
"examined": 1612,
"postings": 3471,
"segments": 2,
"store_requests": 0,
"store_bytes": 0,
"took_us": 15244
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
One rooftop match, and decision.action is act. Why the postcode matters, measured:getting better accuracy.
Endpoints
This page used GET /v1/geocode.