Skip to content

Response Format

All geocoding endpoints return a normalized response envelope regardless of the underlying provider.

Response Envelope

{
  "results": [ ... ],
  "provider": "locationiq",
  "cached": false
}
Field Type Description
results array List of result items
provider string Provider that served the request (here or locationiq)
cached boolean Whether the response was served from cache

Geocode / Reverse Result Item

{
  "label": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, United States",
  "position": { "lat": 37.42249, "lng": -122.08473 },
  "address": {
    "house_number": "1600",
    "street": "Amphitheatre Pkwy",
    "neighborhood": null,
    "city": "Mountain View",
    "county": null,
    "state": "California",
    "state_code": "CA",
    "postal_code": "94043",
    "country": "United States",
    "country_code": "USA"
  },
  "result_type": "house_number",
  "provider_id": "here:af:streetsection:abc123",
  "relevance": 1.0,
  "distance": null,
  "bounding_box": null
}

Field Reference

Field Type Description
label string Full formatted display string
position.lat float Latitude
position.lng float Longitude
address object Structured address components (see below)
result_type string Normalized result type (see below)
provider_id string Provider-specific identifier
relevance float | null Relevance score 0-1
distance float | null Distance in meters (reverse geocode only)
bounding_box array | null [south, north, west, east] floats

Address Object

Field Type Description
house_number string | null House/building number
street string | null Street name
neighborhood string | null Neighborhood or district
city string | null City, town, or village
county string | null County or equivalent
state string | null State or region name
state_code string | null State abbreviation (e.g., CA)
postal_code string | null ZIP or postal code
country string | null Country name
country_code string | null ISO 3166-1 alpha-3 code (e.g., USA)

Result Types

Value Description
house_number Specific address with house number
street Street-level result
city City or town
locality Neighborhood, suburb, or hamlet
state State or administrative area
country Country-level result
place General place
poi Point of interest (business, landmark)

Autocomplete Result Item

Same fields as above, plus:

Field Type Description
title string | null Short display name (e.g., business name)
category string | null Place category (e.g., Restaurant)