apyhub
GEOLOCATION

Address Validation & Location Lookup API

What it does

Address Validation checks a postal address from either query parameters or a JSON body and returns a simple validation envelope with success and code.

Send an address as street, address, city, state, country, or postcode, depending on what you have available. The GET endpoint accepts those fields as query parameters; the POST endpoint accepts the same address parts inside body. The response is an object with a numeric code, a boolean success, and additional module blocks.

Use Address Validation when you need to confirm user-entered shipping addresses before checkout, clean up address data before storing it, or gate downstream workflows on a basic validity check. It fits forms, customer onboarding, and logistics systems where you want a fast pass/fail result without parsing a larger geocoding payload.

▣ ENDPOINT 01 / 02
GET
Address Validation
https://api.eu.apyhub.com/quadlem/address-validation/address-validate

QUICKSTART

GUIDE

Quickstart

Use the following request to validate an address and retrieve the closest matching location along with confidence and risk information.

curl -X GET "https://api.eu.apyhub.com/quadlem/address-validation/address-validate?address=1600+Pennsylvania+Ave+NW&city=Washington&state=DC&country=US&postcode=20500" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

A successful request returns the validation result, confidence score, resolved address details, geographic coordinates, and a breakdown of which address components matched.

{
  "success": true,
  "code": 200,
  "valid": true,
  "status": "close",
  "confidence": 73,
  "risk_score": 0.05,
  "resolved": {
    "label": "Example City, Example State, 141001, India",
    "city": "Example City",
    "state": "Example State",
    "postcode": "141001",
    "country": "India",
    "lat": 30.9090157,
    "lng": 75.851601
  },
  "matches": {
    "house_number": false,
    "road": false,
    "city": true,
    "state": true,
    "postcode": false,
    "country": false
  }
}

Note: This example shows a partial, typo-tolerant match. The full response also includes additional metadata such as input, disclaimer, model_version, and request_id.

TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Validates a postal address from query parameters using OpenStreetMap/Nominatim data. Typo-tolerant and fuzzy: unmatched or missing fields (e.g. a partial street) don't sink the lookup — the query is progressively relaxed and matched at the city/state/country level where a precise match isn't possible. Returns a match status, confidence score, resolved address, coordinates, and per-field match flags.

Query Parameter(s)

AttributeTypeMandatoryDescription
addressStringNoFree-text address (preferred).
streetStringNoStreet address line.
cityStringNoCity name.
stateStringNoState or region.
postcodeStringNoPostal or ZIP code.
countryStringNoCountry name or code.

Response

AttributeTypeDescription
successBooleanWhether the request succeeded.
codeIntegerNumeric response code.
geocoder_okBooleanWhether the underlying geocoder responded successfully.
validBooleanWhether a usable address match was found.
statusStringMatch quality — exact, close, partial, or not_found.
confidenceNumberMatch confidence (0–100).
risk_scoreNumberAddress-related fraud risk score.
inputObjectThe submitted fields plus the constructed search query.
resolvedObjectThe best-matched address — label, components, coordinates, and OSM reference.
matchesObjectPer-field boolean flags showing which submitted components matched the resolved address.
disclaimerStringNotes that this is OSM/Nominatim-based, not postal-authority (CASS) certified.
model_versionStringAddress validation model version.
request_idStringUnique identifier for this request.

Query parameters

Name
Type
Description
cityOPTIONAL
string
stateOPTIONAL
string
streetOPTIONAL
string
addressOPTIONAL
string
countryOPTIONAL
string
postcodeOPTIONAL
string
▣ ENDPOINT 02 / 02
POST
Address Validation
https://api.eu.apyhub.com/quadlem/address-validation

QUICKSTART

GUIDE

Quickstart

Use the following request to validate an address by submitting structured address fields in the request body and retrieve the closest matching location.

curl -X POST "https://api.eu.apyhub.com/quadlem/address-validation" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "city": "Washington",
    "state": "DC",
    "street": "1600 Pennsylvania Avenue NW",
    "address": "1600 Pennsylvania Avenue NW, Washington DC",
    "country": "US",
    "postcode": "20500"
  }'

What you'll get back

A successful request returns the validation result, confidence score, resolved address details, geographic coordinates, and a breakdown of which address components matched.

{
  "success": true,
  "code": 200,
  "valid": true,
  "status": "close",
  "confidence": 73,
  "risk_score": 0.05,
  "resolved": {
    "label": "Example City, Example Tahsil, Example City, Example State, 141001, India",
    "city": "Example City",
    "state": "Example State",
    "postcode": "141001",
    "country": "India",
    "lat": 30.9090157,
    "lng": 75.851601
  },
  "matches": {
    "house_number": false,
    "road": false,
    "city": true,
    "state": true,
    "postcode": false,
    "country": true
  }
}

Note: This example demonstrates a partial, typo-tolerant match. The full response also includes additional metadata such as input, disclaimer, model_version, and request_id.

TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Validates a postal address submitted as fields in a JSON body, using OpenStreetMap/Nominatim data. Same behavior as the GET variant — typo-tolerant and fuzzy, with the query progressively relaxed so missing or unmatched fields (street, postcode, etc.) don't sink the lookup. Returns a match status, confidence score, resolved address, coordinates, and per-field match flags.

Request Body

ParameterTypeMandatoryDescription
addressStringNoFree-text address (preferred).
streetStringNoStreet address line.
cityStringNoCity name.
stateStringNoState or region.
postcodeStringNoPostal or ZIP code.
countryStringNoCountry name or code.

Response

AttributeTypeDescription
successBooleanWhether the request succeeded.
codeIntegerNumeric response code.
geocoder_okBooleanWhether the underlying geocoder responded successfully.
validBooleanWhether a usable address match was found.
statusStringMatch quality — exact, close, partial, or not_found.
confidenceNumberMatch confidence (0–100).
risk_scoreNumberAddress-related fraud risk score.
inputObjectThe submitted fields plus the constructed search query.
resolvedObjectThe best-matched address — label, components, coordinates, and OSM reference.
matchesObjectPer-field boolean flags showing which submitted components matched the resolved address.
disclaimerStringNotes that this is OSM/Nominatim-based, not postal-authority (CASS) certified.
model_versionStringAddress validation model version.
request_idStringUnique identifier for this request.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.