Skip to main content

AddressParseResult

A free-text address decomposed into labelled components.

querystring
Example: Adjacent Goil Filling Station, Madina Zongo Junction, Accra
is_codeboolean

True when the query is a GPS/hex code — no parse attempted.

Example: false
codestring

The extracted code when is_code — present even when the query carries trailing text ("GA-183-8164, Accra", pasted from a chat). Look up this value via /v2/lookup or /v2/hexcode, not the raw query.

Example: GA-183-8164
parsed object
housestring

POI or building name

Example: ecobank branch
house_numberstring
unitstring
roadstring
Example: spintex rd
suburbstring
Example: osu
city_districtstring
citystring
Example: accra
statestring
po_boxstring
postcodestring
anchors object[]

Relative-position clauses — resolve names via /v2/landmarks/geocode.

  • Array [
  • relationstring

    Possible values: [near, adjacent, opposite, behind, beside, after]

    Example: adjacent
    namestring
    Example: goil filling station
  • ]
  • geocode_querystring

    Cleaned structural query for /v2/search — relative clauses stripped.

    Example: madina zongo junction, accra
    AddressParseResult
    {
    "query": "Adjacent Goil Filling Station, Madina Zongo Junction, Accra",
    "is_code": false,
    "code": "GA-183-8164",
    "parsed": {
    "house": "ecobank branch",
    "house_number": "string",
    "unit": "string",
    "road": "spintex rd",
    "suburb": "osu",
    "city_district": "string",
    "city": "accra",
    "state": "string",
    "po_box": "string",
    "postcode": "string",
    "anchors": [
    {
    "relation": "adjacent",
    "name": "goil filling station"
    }
    ],
    "geocode_query": "madina zongo junction, accra"
    }
    }