oslew docs
Console
Menu

GeocodingaddressoperationId validate

GET/v1/validate

Validate an address against the addresses and places layers: a verdict (confirmed, corrected, partial, unconfirmed), the corrected form, and each component's agreement.

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

Explained in Errors, Validating an address, Autocomplete, Clean a customer CSV and An address form.

Example

A whole address as one string.

curl
curl -G "https://api.oslew.com/v1/validate" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'text=Avenida Insurgentes Sur 1602, Ciudad de México 03940, MX'
Python
from oslew import Client

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

answer = client.validate(
    text="Avenida Insurgentes Sur 1602, Ciudad de México 03940, MX",
)
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.validate({ text: "Avenida Insurgentes Sur 1602, Ciudad de México 03940, MX" });
Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 296
ratelimit-reset: 1

{
  "verdict": "confirmed",
  "formatted": "1602 AVENIDA INSURGENTES SUR, Ciudad de México, 03940, MX",
  "components": [
    {
      "name": "house_number",
      "input": "1602",
      "matched": "1602",
      "quality": "exact"
    },
    {
      "name": "street",
      "input": "Avenida Insurgentes Sur",
      "matched": "AVENIDA INSURGENTES SUR",
      "quality": "exact"
    },
    {
      "name": "locality",
      "input": "Ciudad de México",
      "matched": "Ciudad de México",
      "quality": "exact"
    },
    {
      "name": "region",
      "input": null,
      "matched": null,
      "quality": "missing"
    },
    {
      "name": "postcode",
      "input": "03940",
      "matched": "03940",
      "quality": "exact"
    },
    {
      "name": "country",
      "input": "MX",
      "matched": "MX",
      "quality": "exact"
    }
  ],
  "lat": 19.364069672979937,
  "lon": -99.18198831998704,
  "precision": "rooftop",
  "confidence": 0.3960396,
  "candidates": 25,
  "why": "matched AVENIDA INSURGENTES SUR 1602 (an address point) among 25 candidates",
  "epoch": 30,
  "release": "2026-08-19.0",
  "took_us": 3210
}

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

Query

NameTypeDescription
text
query
string
Free text, number street, locality, region postcode, country.
house_number
query
string
street
query
string
locality
query
string
region
query
string
postcode
query
string
country
query
string

Responses

200 — The validation.

  • candidatesintegerrequired
  • componentsobject[]required
    • inputstring | nullrequired
    • matchedstring | nullrequired
    • namestringrequired
    • qualityMatchQualityrequired
      exact | fuzzy | partial | missing
  • confidencenumberrequired
  • formattedstringrequired
  • latnumber | nullrequired
  • lonnumber | nullrequired
  • precisionPrecision | nullrequired
    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
  • took_usintegerrequired
  • verdictstringrequired
    confirmed | corrected | partial | unconfirmed
  • whystringrequired
  • epochinteger
    Manifest epoch this answer was served from.
  • 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.
  • releasestring
    Data release string.

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.

400Neither text nor street given.
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

A misspelt street
curl
curl -G "https://api.oslew.com/v1/validate" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'house_number=1602' \
  --data-urlencode 'street=Avenida Insurjentes Sur' \
  --data-urlencode 'postcode=03940'
Python
from oslew import Client

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

answer = client.validate(
    house_number="1602",
    street="Avenida Insurjentes Sur",
    postcode="03940",
)
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.validate({
  house_number: "1602",
  street: "Avenida Insurjentes Sur",
  postcode: "03940",
});
Response
HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 295
ratelimit-reset: 1

{
  "verdict": "corrected",
  "formatted": "1602 AVENIDA INSURGENTES SUR, Ciudad de México, 03940, MX",
  "components": [
    {
      "name": "house_number",
      "input": "1602",
      "matched": "1602",
      "quality": "exact"
    },
    {
      "name": "street",
      "input": "Avenida Insurjentes Sur",
      "matched": "AVENIDA INSURGENTES SUR",
      "quality": "fuzzy"
    },
    {
      "name": "locality",
      "input": null,
      "matched": "Ciudad de México",
      "quality": "missing"
    },
    {
      "name": "region",
      "input": null,
      "matched": null,
      "quality": "missing"
    },
    {
      "name": "postcode",
      "input": "03940",
      "matched": "03940",
      "quality": "exact"
    },
    {
      "name": "country",
      "input": null,
      "matched": "MX",
      "quality": "missing"
    }
  ],
  "lat": 19.364069672979937,
  "lon": -99.18198831998704,
  "precision": "rooftop",
  "confidence": 0.5967742,
  "candidates": 25,
  "why": "matched AVENIDA INSURGENTES SUR 1602 (an address point) among 25 candidates; street corrected from \"Avenida Insurjentes Sur\" to \"AVENIDA INSURGENTES SUR\"; locality inferred as \"Ciudad de México\"; country inferred as \"MX\"",
  "epoch": 30,
  "release": "2026-08-19.0",
  "took_us": 1734
}

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

Neither text nor a street
curl
curl -G "https://api.oslew.com/v1/validate" \
  -H "Authorization: Bearer $GEO_API_KEY" \
  --data-urlencode 'postcode=03940'
Python
from oslew import Client

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

answer = client.validate(postcode="03940")
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.validate({ postcode: "03940" });
Response
HTTP/1.1 400 Bad Request
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 292
ratelimit-reset: 1

{
  "error": "give `text`, or at least `street`"
}

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

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