oslew docs
Console
Menu

GeocodingaddressoperationId geocode

GET/v1/geocode

Resolve a name, or a number and street, with optional context.

Send Authorization: Bearer sk_live_…. The key's plan must include theaddress product; which plans do.

Explained in Your first request, Try it without a key, Authentication, Rate limits, Errors, Reading a result, Geocoding an address, Getting better accuracy, Decisions and receipts, Autocomplete, A store locator, Delivery planning and An agent over MCP.

Example

A landmark by name.

curl
curl -G "https://api.oslew.com/v1/geocode" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q=Museo Soumaya' \
  --data-urlencode 'limit=3'
Python
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)
TypeScript
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 });
Response
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.

Query

NameTypeDescription
q
queryrequired
string
Free text as name, context. Prefer a postcode in the context when known — hold-outs show ~7× lower median error than city-only.
near
query
string
lat,lon; constrains to roughly a city around it.
country
query
string
Comma-separated ISO country codes; results outside the set are dropped after ranking.
license
query
string
Comma-separated license allow-list: SPDX fragment, permissive, or odbl.
epoch
query
integer
Answer from an earlier manifest epoch the deployment still retains; only where the operator keeps them (GEO_ASOF=1), otherwise 400.
release
query
string
Require this data release string; 400 on mismatch.
receipt
query
boolean
Include a receipt: the epoch, the release and a SHA-256 of the answer. It is also signed with a keyed SHA-256 when the operator sets GEO_RECEIPT_SECRET.
limit
query
integer
≥ 1, ≤ 50
default 5
interpolate
query
boolean
default true
Place a house number the data does not hold between the two recorded numbers that bracket it, reporting precision: interpolated and the pair in between. false returns the nearest recorded row instead, which is what to compare against.

Responses

200 — Ranked results.

  • contextstring | nullrequired
  • context_resolutionContextResolution | nullrequired
    How the context was matched beyond its spelling: the terms tried against addresses, and the divisions whose polygons counted.
    • divisionsHit[]required
      Divisions of that name, or of which it is a whole-word prefix; a place inside one is in context.
      • docintegerrequired
        Ordinal in the segment.
      • idstringrequired
        Overture id.
      • namestringrequired
      • provenanceSourcerequired
        • licensestringrequired
        • namestringrequired
        • releasestringrequired
      • subtypestringrequired
        country | dependency | region | county | localadmin | locality | macrohood | neighborhood | microhood | timezone
      • viastringrequired
        interior: the point's cell is provably inside, no geometry read; boundary: the polygon decided.
        interior | boundary
      • admin_levelinteger | null
      • countrystring | null
        ISO code.
      • regionstring | null
        ISO region code, MX-JAL.
    • fallbackbooleanrequired
      Nothing satisfied the context: the results are the answer without it, locality missing, confidence context-free.
    • knownbooleanrequired
      The context named a division or a spelling some address uses.
    • termsstring[]required
      The context as written, then ISO codes of region or country divisions of that name.
  • decisionobjectrequired
    Agent branch: action is act / ask / refuse; margin is top−runner-up score; ask_for and disambiguation explain why.
    • actionstringrequired
      act | ask | refuse
    • ask_forstring[]
    • disambiguationobject
      • optionsobject[]
      • tiedinteger
    • marginnumber | null
      Top minus runner-up margin score; refuse when below 0.12.
  • epochintegerrequired
    Manifest epoch this answer was served from.
  • examinedintegerrequired
  • interpolatedbooleanrequired
    Whether the top result's position was placed between two recorded house numbers rather than read off a row. Its precision then says interpolated and its between names the two.
  • modeMatchModerequired
    fuzzy is an edit-distance or split salvage and never all.
    all | partial | fuzzy | none
  • namestringrequired
  • nearnumber[] | nullrequired
  • parseobjectrequired
    Structured query parse: house_number, street, locality, region, postcode, country, method.
  • postingsintegerrequired
  • querystringrequired
  • releasestringrequired
    Data release string.
  • resultsResolved[]required
    • bboxnumber[]required4 items
      lat_lo, lat_hi, lng_lo, lng_hi of the cell.
    • componentsobjectrequired
      How each part of the query matched. Missing when the query did not supply that part.
      • countryMatchQuality
        exact | fuzzy | partial | missing
      • house_numberMatchQuality
        exact | fuzzy | partial | missing
      • localityMatchQuality
        exact | fuzzy | partial | missing
      • nameMatchQuality
        exact | fuzzy | partial | missing
      • postcodeMatchQuality
        exact | fuzzy | partial | missing
      • regionMatchQuality
        exact | fuzzy | partial | missing
      • streetMatchQuality
        exact | fuzzy | partial | missing
    • confidencenumberrequired≥ 0, ≤ 1
      Calibrated: the observed precision of results like this one on the scoreboard.
    • docintegerrequired
      Document ordinal within its segment.
    • hierarchyContextrequired
      • categorystring | null
      • countrystring | null
      • localitystring | null
      • postcodestring | null
      • regionstring | null
      • streetstring | null
    • latnumberrequired
    • lonnumberrequired
    • namestringrequired
    • normalizedNormalizedrequired
      The address in parts as well as in a sentence. formatted orders the house number and the street the way that country writes them — Avenida Insurgentes Sur 1602 in Mexico, 1600 Pennsylvania Avenue NW in the United States — and is derived from the parts, so a caller who needs another layout does not have to unpick the sentence.
      • formattedstringrequired
      • countrystring
        ISO code.
      • house_numberstring
        Whatever the source recorded, which is not always a number: 10, 12-B, S/N.
      • localitystring
      • postcodestring
      • regionstring
        Absent for most of the world, and absent from the address layer, which records locality, postcode and country.
      • streetstring
    • precisionPrecisionrequired
      What the position locates, finest first. rooftop is an address point with a house number, as its source recorded it — never a building footprint we snapped to, which would contaminate the permissive bundle. interpolated is a point placed between the two recorded numbers that bracket the one asked for, which is what Google calls RANGE_INTERPOLATED. street is an address row with no number to place along it. precision_m carries the honest radius alongside: the label says what was matched, the metres say how wrong it can be.
      rooftop | interpolated | address | street | postcode | locality | region | country | poi
    • precision_mnumberrequired
      Approximate positional error in metres.
    • provenanceSourcerequired
      • licensestringrequired
      • namestringrequired
      • releasestringrequired
    • whyobjectrequired
      • extraintegerrequired
      • matchedintegerrequired
      • modeMatchModerequired
        fuzzy is an edit-distance or split salvage and never all.
        all | partial | fuzzy | none
      • tiedbooleanrequired
      • tokensstring[]required
      • prominenceinteger≥ 0, ≤ 15
        log2 of Wikidata sitelinks where the place is matched, else 0; the tie-break below matched and extra.
      • rerankinteger≥ 0, ≤ 100
        Hashed-trigram cosine against the query (0–100). Orders within equal matched/extra/prominence.
    • attributesAttributes | null
      From an attributes feed, when one carries this place.
      • hoursinteger[][]required7 items
        Per weekday, Monday first: [open, close] minutes from midnight; [0,0] closed, [0,65535] all day; a close before its open runs past midnight.
      • priceinteger | nullrequired
        0–4.
      • provenanceSourcerequired
        • licensestringrequired
        • namestringrequired
        • releasestringrequired
      • ratingnumber | nullrequired
        0–5.
      • reviewsintegerrequired
      • photostring
        A photo of the place on Wikimedia Commons, when a feed carries one. The image is the photographer's, not ours: see https://www.oslew.com/licensing
    • betweenstring[]2 items
      When the position was interpolated, the two recorded house numbers it was placed between — the evidence for a position no row actually holds.
  • segmentsintegerrequired
  • store_bytesintegerrequired
  • store_requestsintegerrequired
  • tie_probeintegerrequired
    Candidates the search kept before the page was cut, which is what tied_at_top was counted over. Equal values mean every candidate shared the top rank and the true number of ties is larger.
  • tied_at_topintegerrequired
    How many places share the top rank; more than 1 means the query does not determine one place. Counted over everything the search kept, before the page was cut to limit, so it does not change when a caller asks for one result instead of five.
  • took_usintegerrequired
  • receiptReceipt
    Which store answered and a digest of what it answered, to keep beside a stored result. Signed only when the operator sets GEO_RECEIPT_SECRET.
    • algstringrequired
      sha256, or sha256-keyed when signed.
      sha256 | sha256-keyed
    • epochintegerrequired
      Manifest epoch the answer came from.
    • payload_sha256stringrequired
      SHA-256 hex of the canonical payload.
    • releasestringrequired
      Data release string.
    • signaturestring
      SHA-256 hex of the operator's receipt secret, a zero byte and the payload; present only when the operator set GEO_RECEIPT_SECRET, and checkable only by them.

With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.

Refusals

Every refusal is a JSON object with an error string, except where noted.

400Bad request.
401No key, or one that is unknown, revoked or suspended.
403The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does.
429This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After.
503The pod cannot reach the control plane and its entitlements are too old to trust. Retry.

A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.

More examples

An address with a receipt
curl
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' \
  --data-urlencode 'receipt=true'
Python
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", receipt=True, limit=1)
TypeScript
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", { receipt: true, limit: 1 });
Response
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",
  "receipt": {
    "epoch": 30,
    "release": "2026-08-19.0",
    "payload_sha256": "63cad92f9f779ca88f60c1d8643f755a86c7ab7f2e06a99db919ea341195f084",
    "alg": "sha256"
  },
  "examined": 1612,
  "postings": 3471,
  "segments": 2,
  "store_requests": 0,
  "store_bytes": 0,
  "took_us": 14849
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

A house number and street, with the postcode as context
curl
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'
Python
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)
TypeScript
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 });
Response
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.

The same address with only the city as context
curl
curl -G "https://api.oslew.com/v1/geocode" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q=Avenida Insurgentes Sur 1602, Ciudad de México' \
  --data-urlencode 'limit=3'
Python
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, Ciudad de México", limit=3)
TypeScript
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, Ciudad de México", { limit: 3 });
Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 299
ratelimit-reset: 1

{
  "query": "Avenida Insurgentes Sur 1602, Ciudad de México",
  "name": "Avenida Insurgentes Sur 1602",
  "context": "Ciudad de México",
  "parse": {
    "name": "Avenida Insurgentes Sur 1602",
    "context": "Ciudad de México",
    "house_number": "1602",
    "street": "Avenida Insurgentes Sur",
    "locality": "Ciudad de México",
    "method": "comma_parts"
  },
  "context_resolution": {
    "terms": [
      "Ciudad de México",
      "MX-CMX",
      "CMX"
    ],
    "divisions": [
      {
        "doc": 1560,
        "id": "bc8dbc34-544b-47c4-bdb1-d3f5ecfc6af7",
        "name": "Ciudad de México",
        "subtype": "region",
        "country": "MX",
        "region": "MX-CMX",
        "admin_level": 1,
        "via": "interior",
        "provenance": {
          "name": "overture-divisions",
          "release": "2026-08-19.0",
          "license": "ODbL-1.0"
        }
      },
      {
        "doc": 1522,
        "id": "2b1d49e2-98ef-4665-b9f6-1ce96c9f015b",
        "name": "Ciudad de México",
        "subtype": "locality",
        "country": "MX",
        "region": "MX-CMX",
        "admin_level": null,
        "via": "interior",
        "provenance": {
          "name": "overture-divisions",
          "release": "2026-08-19.0",
          "license": "ODbL-1.0"
        }
      }
    ],
    "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": "missing",
        "country": "missing"
      },
      "confidence": 0.3960396,
      "why": {
        "tokens": [
          "1602",
          "avenida",
          "insurgentes",
          "sur"
        ],
        "matched": 4,
        "extra": 0,
        "mode": "all",
        "tied": false,
        "prominence": 0,
        "rerank": 89
      },
      "provenance": {
        "name": "overture-addresses",
        "release": "2026-08-19.0",
        "license": "permissive (per-source, see record)"
      },
      "attributes": null
    },
    {
      "doc": 131752,
      "name": "AVENIDA INSURGENTES SUR",
      "lat": 19.306485580000658,
      "lon": -99.18666049037793,
      "bbox": [
        19.30635154353446,
        19.306619616468854,
        -99.18678958317274,
        -99.18653139760642
      ],
      "precision": "street",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Ciudad de México",
        "region": null,
        "country": "MX",
        "category": null,
        "postcode": "04530",
        "street": "AVENIDA INSURGENTES SUR"
      },
      "normalized": {
        "street": "AVENIDA INSURGENTES SUR",
        "locality": "Ciudad de México",
        "postcode": "04530",
        "country": "MX",
        "formatted": "AVENIDA INSURGENTES SUR, Ciudad de México, 04530, MX"
      },
      "components": {
        "name": "partial",
        "house_number": "missing",
        "street": "partial",
        "locality": "exact",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.35,
      "why": {
        "tokens": [
          "1602",
          "avenida",
          "insurgentes",
          "sur"
        ],
        "matched": 3,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 67
      },
      "provenance": {
        "name": "overture-addresses",
        "release": "2026-08-19.0",
        "license": "permissive (per-source, see record)"
      },
      "attributes": null
    },
    {
      "doc": 131754,
      "name": "AVENIDA INSURGENTES SUR",
      "lat": 19.305591323802492,
      "lon": -99.18614134691849,
      "bbox": [
        19.30545728760145,
        19.305725360005535,
        -99.18627043943381,
        -99.18601225442644
      ],
      "precision": "street",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Ciudad de México",
        "region": null,
        "country": "MX",
        "category": null,
        "postcode": "04530",
        "street": "AVENIDA INSURGENTES SUR"
      },
      "normalized": {
        "street": "AVENIDA INSURGENTES SUR",
        "locality": "Ciudad de México",
        "postcode": "04530",
        "country": "MX",
        "formatted": "AVENIDA INSURGENTES SUR, Ciudad de México, 04530, MX"
      },
      "components": {
        "name": "partial",
        "house_number": "missing",
        "street": "partial",
        "locality": "exact",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.35,
      "why": {
        "tokens": [
          "1602",
          "avenida",
          "insurgentes",
          "sur"
        ],
        "matched": 3,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 67
      },
      "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": 371,
  "interpolated": false,
  "decision": {
    "action": "refuse",
    "margin": 0.076227725,
    "ask_for": [
      "postcode"
    ]
  },
  "epoch": 30,
  "release": "2026-08-19.0",
  "examined": 29202,
  "postings": 353658,
  "segments": 2,
  "store_requests": 0,
  "store_bytes": 0,
  "took_us": 22012
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

A name that does not determine one place
curl
curl -G "https://api.oslew.com/v1/geocode" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q=OXXO' \
  --data-urlencode 'limit=3'
Python
from oslew import Client

# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")

answer = client.geocode("OXXO", limit=3)
TypeScript
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("OXXO", { limit: 3 });
Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 299
ratelimit-reset: 1

{
  "query": "OXXO",
  "name": "OXXO",
  "context": null,
  "parse": {
    "name": "OXXO",
    "method": "passthrough"
  },
  "context_resolution": null,
  "near": null,
  "results": [
    {
      "doc": 19524,
      "name": "OXXO",
      "lat": 20.612046892212046,
      "lon": -105.23387968256127,
      "bbox": [
        20.611911606339586,
        20.612182178088325,
        -105.23401122598554,
        -105.2337481391495
      ],
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Puerto Vallarta",
        "region": null,
        "country": "MX",
        "category": "convenience_store",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Puerto Vallarta",
        "country": "MX",
        "formatted": "OXXO, Puerto Vallarta, MX"
      },
      "components": {
        "name": "exact",
        "house_number": "missing",
        "street": "missing",
        "locality": "missing",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.99148935,
      "why": {
        "tokens": [
          "oxxo"
        ],
        "matched": 1,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 75
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    },
    {
      "doc": 20122,
      "name": "OXXO",
      "lat": 20.610405973859322,
      "lon": -105.23397110804532,
      "bbox": [
        20.61027068832683,
        20.610541259395642,
        -105.23410265149454,
        -105.23383956460859
      ],
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Puerto Vallarta",
        "region": null,
        "country": "MX",
        "category": "convenience_store",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Puerto Vallarta",
        "country": "MX",
        "formatted": "OXXO, Puerto Vallarta, MX"
      },
      "components": {
        "name": "exact",
        "house_number": "missing",
        "street": "missing",
        "locality": "missing",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.99148935,
      "why": {
        "tokens": [
          "oxxo"
        ],
        "matched": 1,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 75
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    },
    {
      "doc": 20812,
      "name": "OXXO",
      "lat": 20.62072596660037,
      "lon": -105.22510306857126,
      "bbox": [
        20.620590680172317,
        20.620861253032217,
        -105.2252346095983,
        -105.22497152755672
      ],
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Puerto Vallarta",
        "region": null,
        "country": "MX",
        "category": "convenience_store",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Puerto Vallarta",
        "country": "MX",
        "formatted": "OXXO, Puerto Vallarta, MX"
      },
      "components": {
        "name": "exact",
        "house_number": "missing",
        "street": "missing",
        "locality": "missing",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.99148935,
      "why": {
        "tokens": [
          "oxxo"
        ],
        "matched": 1,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 75
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    }
  ],
  "mode": "all",
  "tied_at_top": 16,
  "tie_probe": 32,
  "interpolated": false,
  "decision": {
    "action": "refuse",
    "margin": 0,
    "disambiguation": {
      "tied": 16,
      "options": [
        {
          "rank": 1,
          "label": "OXXO, Puerto Vallarta, MX",
          "country": "MX",
          "locality": "Puerto Vallarta"
        },
        {
          "rank": 2,
          "label": "OXXO, Puerto Vallarta, MX",
          "country": "MX",
          "locality": "Puerto Vallarta"
        },
        {
          "rank": 3,
          "label": "OXXO, Puerto Vallarta, MX",
          "country": "MX",
          "locality": "Puerto Vallarta"
        },
        {
          "rank": 4,
          "label": "OXXO, Puerto Vallarta, JAL, MX",
          "country": "MX",
          "locality": "Puerto Vallarta"
        },
        {
          "rank": 5,
          "label": "OXXO, Puerto Vallarta, MX",
          "country": "MX",
          "locality": "Puerto Vallarta"
        },
        {
          "rank": 6,
          "label": "Oxxo, Boca de Tomatlán, JAL, MX",
          "country": "MX",
          "locality": "Boca de Tomatlán"
        },
        {
          "rank": 7,
          "label": "oxxo, Pérula, JAL, MX",
          "country": "MX",
          "locality": "Pérula"
        },
        {
          "rank": 8,
          "label": "OXXO, Tomatlán, MX",
          "country": "MX",
          "locality": "Tomatlán"
        }
      ]
    }
  },
  "epoch": 30,
  "release": "2026-08-19.0",
  "examined": 98,
  "postings": 1736,
  "segments": 2,
  "store_requests": 0,
  "store_bytes": 0,
  "took_us": 805
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

Narrowed to the city around a point with near
curl
curl -G "https://api.oslew.com/v1/geocode" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q=OXXO' \
  --data-urlencode 'near=19.4326,-99.1332' \
  --data-urlencode 'limit=3'
Python
from oslew import Client

# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")

answer = client.geocode("OXXO", near="19.4326,-99.1332", limit=3)
TypeScript
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("OXXO", { near: "19.4326,-99.1332", limit: 3 });
Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 298
ratelimit-reset: 1

{
  "query": "OXXO",
  "name": "OXXO",
  "context": null,
  "parse": {
    "name": "OXXO",
    "method": "passthrough"
  },
  "context_resolution": null,
  "near": [
    19.4326,
    -99.1332
  ],
  "results": [
    {
      "doc": 312143,
      "name": "OXXO",
      "lat": 19.41387107720213,
      "lon": -99.18570872993081,
      "bbox": [
        19.413737020076393,
        19.414005134329585,
        -99.18583782221324,
        -99.18557963767167
      ],
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "category": "convenience_store",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "formatted": "OXXO, Miguel Hidalgo, CMX, MX"
      },
      "components": {
        "name": "exact",
        "house_number": "missing",
        "street": "missing",
        "locality": "missing",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.99148935,
      "why": {
        "tokens": [
          "oxxo"
        ],
        "matched": 1,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 75
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    },
    {
      "doc": 312176,
      "name": "Oxxo",
      "lat": 19.41758879104772,
      "lon": -99.186833538943,
      "bbox": [
        19.417454733014733,
        19.417722849082416,
        -99.18696263183097,
        -99.18670444607832
      ],
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "category": "convenience_store",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "formatted": "Oxxo, Miguel Hidalgo, CMX, MX"
      },
      "components": {
        "name": "exact",
        "house_number": "missing",
        "street": "missing",
        "locality": "missing",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.99148935,
      "why": {
        "tokens": [
          "oxxo"
        ],
        "matched": 1,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 75
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    },
    {
      "doc": 312833,
      "name": "Oxxo",
      "lat": 19.405177436199025,
      "lon": -99.184670458663,
      "bbox": [
        19.40504338092024,
        19.405311491479537,
        -99.18479955038647,
        -99.18454136696286
      ],
      "precision": "poi",
      "precision_m": 6.756173533775122,
      "hierarchy": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "category": "convenience_store",
        "postcode": null,
        "street": null
      },
      "normalized": {
        "locality": "Miguel Hidalgo",
        "region": "CMX",
        "country": "MX",
        "formatted": "Oxxo, Miguel Hidalgo, CMX, MX"
      },
      "components": {
        "name": "exact",
        "house_number": "missing",
        "street": "missing",
        "locality": "missing",
        "region": "missing",
        "postcode": "missing",
        "country": "missing"
      },
      "confidence": 0.99148935,
      "why": {
        "tokens": [
          "oxxo"
        ],
        "matched": 1,
        "extra": 0,
        "mode": "all",
        "tied": true,
        "prominence": 0,
        "rerank": 75
      },
      "provenance": {
        "name": "overture-places",
        "release": "2026-08-19.0",
        "license": "CDLA-Permissive-2.0"
      },
      "attributes": null
    }
  ],
  "mode": "all",
  "tied_at_top": 16,
  "tie_probe": 16,
  "interpolated": false,
  "decision": {
    "action": "refuse",
    "margin": 0,
    "disambiguation": {
      "tied": 16,
      "options": [
        {
          "rank": 1,
          "label": "OXXO, Miguel Hidalgo, CMX, MX",
          "country": "MX",
          "locality": "Miguel Hidalgo"
        },
        {
          "rank": 2,
          "label": "Oxxo, Miguel Hidalgo, CMX, MX",
          "country": "MX",
          "locality": "Miguel Hidalgo"
        },
        {
          "rank": 3,
          "label": "Oxxo, Miguel Hidalgo, CMX, MX",
          "country": "MX",
          "locality": "Miguel Hidalgo"
        },
        {
          "rank": 4,
          "label": "Oxxo, Miguel Hidalgo, CMX, MX",
          "country": "MX",
          "locality": "Miguel Hidalgo"
        },
        {
          "rank": 5,
          "label": "oxxo, MX",
          "country": "MX"
        },
        {
          "rank": 6,
          "label": "OXXO, San Pedro De Los Pinos, Ciudad de México, MX",
          "country": "MX",
          "locality": "San Pedro De Los Pinos"
        },
        {
          "rank": 7,
          "label": "Oxxo, Álvaro Obregón, CMX, MX",
          "country": "MX",
          "locality": "Álvaro Obregón"
        },
        {
          "rank": 8,
          "label": "OXXO, Ciudad de México, Ciudad de México, MX",
          "country": "MX",
          "locality": "Ciudad de México"
        }
      ]
    }
  },
  "epoch": 30,
  "release": "2026-08-19.0",
  "examined": 18,
  "postings": 25,
  "segments": 2,
  "store_requests": 0,
  "store_bytes": 0,
  "took_us": 361
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

An empty query
curl
curl -G "https://api.oslew.com/v1/geocode" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q= '
Python
from oslew import Client

# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")

answer = client.geocode(" ")
TypeScript
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(" ");
Response
HTTP/1.1 400 Bad Request
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 297
ratelimit-reset: 1

{
  "error": "q is required"
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

No key
curl
curl -G "https://api.oslew.com/v1/geocode" \
  --data-urlencode 'q=Museo Soumaya'
Python
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")
TypeScript
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");
Response
HTTP/1.1 401 Unauthorized
content-type: application/json

{
  "error": "an API key is required: Authorization: Bearer sk_live_…"
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

Faster than the plan's rate
curl
curl -G "https://api.oslew.com/v1/geocode" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q=Museo Soumaya' \
  --data-urlencode 'limit=1'
Python
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=1)
TypeScript
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: 1 });
Response
HTTP/1.1 429 Too Many Requests
content-type: application/json
ratelimit-limit: 2
ratelimit-remaining: 0
ratelimit-reset: 1
retry-after: 1

{
  "error": "address is limited to 2 requests a second, burst 2; try again in 1 s. There is no monthly quota."
}

A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.

A parameter that does not parse is refused in plain text
curl
curl -G "https://api.oslew.com/v1/geocode" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'q=Museo Soumaya' \
  --data-urlencode 'limit=three'
Python
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="three")
TypeScript
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: "three" });
Response — HTTP/1.1 400 Bad Request
Failed to deserialize query string: limit: invalid digit found in string

A real response, captured from the service at commit b8f4bde-dirty.

Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.