Skip to content
GuidesPlaygroundDashboard

Geocode

Forward geocode an address
client.geocode.forward(GeocodeForwardParams { q, bbox, country_code, 5 more } query, RequestOptionsoptions?): GeocodeResult { features, type }
GET/api/v1/geocode
Reverse geocode a coordinate
client.geocode.reverse(GeocodeReverseParams { lat, lng, lang, 3 more } query, RequestOptionsoptions?): ReverseGeocodeResult { features, type }
GET/api/v1/geocode/reverse
Autocomplete a partial address
client.geocode.autocomplete(GeocodeAutocompleteParams { q, country_code, lang, 4 more } query, RequestOptionsoptions?): AutocompleteResult { features, type }
GET/api/v1/geocode/autocomplete
Batch geocode multiple addresses
client.geocode.batch(GeocodeBatchParams { addresses } body, RequestOptionsoptions?): GeocodeBatchResponse
POST/api/v1/geocode/batch
ModelsExpand Collapse
AutocompleteResult { features, type }

GeoJSON FeatureCollection of autocomplete suggestions

features: Array<GeocodingFeature { geometry, properties, type } >
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties { country_code, display_name, distance_m, 4 more }
country_code?: string | null

ISO 3166-1 alpha-2 country code

display_name?: string

Formatted address or place name

distance_m?: number | null

Distance in meters

osm_id?: number | null

OpenStreetMap ID

osm_type?: string | null

OSM element type

score?: number | null

Match confidence score

source?: string | null

Result source (address, place, interpolation)

type: "Feature"
type: "FeatureCollection"
GeocodeResult { features, type }

GeoJSON FeatureCollection of geocoding results

features: Array<GeocodingFeature { geometry, properties, type } >
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties { country_code, display_name, distance_m, 4 more }
country_code?: string | null

ISO 3166-1 alpha-2 country code

display_name?: string

Formatted address or place name

distance_m?: number | null

Distance in meters

osm_id?: number | null

OpenStreetMap ID

osm_type?: string | null

OSM element type

score?: number | null

Match confidence score

source?: string | null

Result source (address, place, interpolation)

type: "Feature"
type: "FeatureCollection"
GeocodingFeature { geometry, properties, type }
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties { country_code, display_name, distance_m, 4 more }
country_code?: string | null

ISO 3166-1 alpha-2 country code

display_name?: string

Formatted address or place name

distance_m?: number | null

Distance in meters

osm_id?: number | null

OpenStreetMap ID

osm_type?: string | null

OSM element type

score?: number | null

Match confidence score

source?: string | null

Result source (address, place, interpolation)

type: "Feature"
ReverseGeocodeResult { features, type }

GeoJSON FeatureCollection of reverse geocoding results

features: Array<GeocodingFeature { geometry, properties, type } >
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties { country_code, display_name, distance_m, 4 more }
country_code?: string | null

ISO 3166-1 alpha-2 country code

display_name?: string

Formatted address or place name

distance_m?: number | null

Distance in meters

osm_id?: number | null

OpenStreetMap ID

osm_type?: string | null

OSM element type

score?: number | null

Match confidence score

source?: string | null

Result source (address, place, interpolation)

type: "Feature"
type: "FeatureCollection"