Skip to content
GuidesPlaygroundDashboard

Geocode

Forward geocode an address
geocode.forward(**kwargs) -> GeocodeResult { features, type }
GET/api/v1/geocode
Reverse geocode a coordinate
geocode.reverse(**kwargs) -> ReverseGeocodeResult { features, type }
GET/api/v1/geocode/reverse
Autocomplete a partial address
geocode.autocomplete(**kwargs) -> AutocompleteResult { features, type }
GET/api/v1/geocode/autocomplete
Batch geocode multiple addresses
geocode.batch(**kwargs) -> GeocodeBatchResponse
POST/api/v1/geocode/batch
ModelsExpand Collapse
class AutocompleteResult { features, type }

GeoJSON FeatureCollection of autocomplete suggestions

features: Array[GeocodingFeature { geometry, properties, type } ]
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { country_code, display_name, distance_m, 4 more}
country_code: String

ISO 3166-1 alpha-2 country code

display_name: String

Formatted address or place name

distance_m: Float

Distance in meters

osm_id: Integer

OpenStreetMap ID

osm_type: String

OSM element type

score: Float

Match confidence score

source: String

Result source (address, place, interpolation)

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

GeoJSON FeatureCollection of geocoding results

features: Array[GeocodingFeature { geometry, properties, type } ]
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { country_code, display_name, distance_m, 4 more}
country_code: String

ISO 3166-1 alpha-2 country code

display_name: String

Formatted address or place name

distance_m: Float

Distance in meters

osm_id: Integer

OpenStreetMap ID

osm_type: String

OSM element type

score: Float

Match confidence score

source: String

Result source (address, place, interpolation)

type: :Feature
type: :FeatureCollection
class GeocodingFeature { geometry, properties, type }
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { country_code, display_name, distance_m, 4 more}
country_code: String

ISO 3166-1 alpha-2 country code

display_name: String

Formatted address or place name

distance_m: Float

Distance in meters

osm_id: Integer

OpenStreetMap ID

osm_type: String

OSM element type

score: Float

Match confidence score

source: String

Result source (address, place, interpolation)

type: :Feature
class ReverseGeocodeResult { features, type }

GeoJSON FeatureCollection of reverse geocoding results

features: Array[GeocodingFeature { geometry, properties, type } ]
geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { country_code, display_name, distance_m, 4 more}
country_code: String

ISO 3166-1 alpha-2 country code

display_name: String

Formatted address or place name

distance_m: Float

Distance in meters

osm_id: Integer

OpenStreetMap ID

osm_type: String

OSM element type

score: Float

Match confidence score

source: String

Result source (address, place, interpolation)

type: :Feature
type: :FeatureCollection