oslew docs
Console
Menu

Reading a result

An answer from the address routes says more than where a place is. It says what matched, how wrong the position can be, how often answers like it are right, whether the question had one answer at all, and what to do next. Each of those is a field, and each is worth branching on.

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.

decision: what to do with the answer

A top-level field of a geocode answer, worked out over every candidate the search kept, before limitcut the list. It folds the fields below into one of three actions:

actionMeansDo
actThe top result stands clear of the rest and nothing obvious is missing.Use it.
askThe top result is probably right, but a field would settle it.Ask for what ask_for names (postcode, house_number, locality, country) and search again.
refuseThe top results tie, or the best is within 0.12 of the next on the service's margin score.Do not pick one. Show the candidates (disambiguation lists them when they tie), or add context.

margin is the gap itself, so you can be stricter than the service if you like. The answer above isact at a margin of 0.19. The same address with only a city as context is refuse withask_for: ["postcode"], and a bare Museo Soumaya is refuse because two buildings carry the name. Decisions and receipts has more.

precision: what the position locates

What actually matched, finest first — not what we wish had:

ValueThe position isComes from
rooftopAn address point that carried the house number asked for, as its source recorded it. Never a building footprint the service snapped to.geocode, reverse, validate
interpolatedPlaced between the two recorded house numbers that bracket the one asked for. between names them. Google calls this RANGE_INTERPOLATED.geocode, validate
addressAn address row, without a number to confirm.geocode, reverse, validate
streetA street with no number to place along it.geocode, reverse, validate
poiA place — a museum, a shop — rather than an address.geocode, reverse, nearby, autocomplete
postcodeThe mean of a postcode's address points./v1/postcode
locality, region, countryAn administrative area. Reserved in the taxonomy, and what the compatibility shapes map to their vendors' coarsest levels.—

precision_m is how exactly the position itself is placed. For a stored point it is the error of the grid cell the point is kept in, about 7 m, whatever the label; for an interpolated position it is half the gap between the two recorded numbers, or that cell error if larger, so one placed between numbers 200 m apart says at least 100. It does not say how large the thing named is: a street result's 7 m are about the one address row it returned, not about where your number is on that street. Read precision for that.

tied_at_top: did the query name one place?

A top-level field of the answer, not of a result: how many candidates shared the best score. 1 means the query determined one place. Anything more means it did not, and the first result is one of that many, chosen by prominence — which is the honest thing to tell a user, rather than a confident wrong answer.

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.

It is counted over every candidate the search kept, before the list was cut to limit, so it does not change when you ask for one result instead of five. It is also bounded by how many candidates the search kept, which is tie_probe: above, 16 of the 32 kept share the top score. When the two are equal, every candidate kept was tied and the true number is larger, so read a tied_at_top equal totie_probe as "at least this many", not as an exact count.

Python
answer = client.geocode(q, limit=5)
top = answer["results"][0] if answer["results"] else None

if top is None:
    ...                                   # answered, and found nothing
elif answer["decision"]["action"] == "refuse":
    ...                                   # tied, or too close to call: show the choices
elif answer["decision"]["action"] == "ask":
    ...                                   # ask for answer["decision"]["ask_for"], then retry
elif top["precision"] in ("street", "address"):
    ...                                   # found the street, not the door
else:
    ...                                   # one place, located

A tie is the case most integrations get wrong: showing the first of sixteen equally good candidates as if it were the answer. decision is refuse whenever tied_at_top is more than 1, so branching on decision covers it. Show the user the choices, or add context (a postcode, a city, anear point) and ask again.

confidence: how often answers like this are right

A number from 0 to 1, calibrated: it is the observed rate at which results with the same shape were right, not a score the ranking invented. The shape is the match mode, whether every token matched, whether the name matched exactly, whether the context resolved, whether the result was tied, whether it is an address rather than a place, and whether the context was a postcode. A result with confidence 0.95 belongs to a group that was right 95% of the time.

"Right" is measured two ways, one per kind of result:

  • Places are scored against a places scoreboard: right means the right place. An exact match for a place's name is typically 0.99.
  • Addresses are set from the held-out Mexico City addresses on theaccuracy guide: right means within 250 m of the true address. With a postcode as context, a rooftop match is about 0.73, and no address answer goes above 0.85; with only a city, about 0.40, and never above 0.45. The answer above is 0.73.
  • A group with fewer than twenty observations reports 0.5 — the model saying it does not know, not a low score. Tied results often land here.
  • It was measured on a hold-out, so treat it as an upper bound on field accuracy, and as a way to rank answers for review rather than a probability to multiply.
  • Autocomplete claims none: a prefix is not a question with a right answer yet.

The evidence: why and components

Every result says how it matched, so a surprising one can be explained rather than guessed at:

FieldSays
why.tokensThe query as the index read it, after normalising: accents and case folded, abbreviations expanded.
why.matched, why.extraHow many query tokens the name matched, and how many tokens the name had that the query did not.
why.modeall (every token), partial, fuzzy (an edit-distance or split salvage, never all), or none.
why.tiedWhether this result shares its rank with another candidate — at the top, with any the search saw; lower down, with another result in the list. So a second-rank result can be tied while tied_at_top is 1.
why.prominence0–15, the tie-break below the match: log₂ of the place's Wikidata sitelinks where it is matched, else 0.
components.name, components.localityexact, fuzzy, partial or missing for each part of the query.

mode at the top of the answer is the best mode any result reached. context_resolutionsays how the text after the last comma was matched — see geocoding — andfallback: true there means nothing satisfied it and the results ignore it.

hierarchy, normalized and admin

  • hierarchy is what the result's own row records: locality, region, country, and for a place its category, postcode and street. Missing parts are null — many address sources record no region.
  • normalized is the address in parts and in one line. formatted writes the house number where the country writes it — after the street in Mexico and 31 other countries (Avenida Insurgentes Sur 1602), before it elsewhere (1600 Pennsylvania Avenue NW) — and is derived from the parts, so a different layout never needs the sentence unpicked. house_number is whatever the source recorded, which is not always a number: 12-B, S/N.
  • admin — on reverse, postcode, locate and /v1/admin — is different in kind: every administrative division whose polygon contains the point, outermost first, from the divisions layer. Use it when you need the municipality or the ISO region code of a coordinate, which a row's own hierarchy may not carry. See administrative areas.

parse, epoch and release

  • parse is how the text was read before searching: name andcontext, and where it found them, house_number, street,locality or postcode. method says how: comma_parts when the last comma split it, passthrough when the text was searched as written.
  • epoch and release say which store answered: the store's manifest number and the data release. Keep them with anything you store, or pin a request to them; seeconventions and receipts.

provenance: where it came from, and on what terms

{name, release, license} on every result — which dataset, which release, and a licence code. Per result, because one answer can mix sources, and a caller storing millions of rows needs to know which of them carry share-alike. See data and licensing.