Skip to content
GuidesPlaygroundDashboard

Geocode

Forward geocode an address
geocode.forward(GeocodeForwardParams**kwargs) -> GeocodeResult
GET/api/v1/geocode
Reverse geocode a coordinate
geocode.reverse(GeocodeReverseParams**kwargs) -> ReverseGeocodeResult
GET/api/v1/geocode/reverse
Autocomplete a partial address
geocode.autocomplete(GeocodeAutocompleteParams**kwargs) -> AutocompleteResult
GET/api/v1/geocode/autocomplete
Batch geocode multiple addresses
geocode.batch(GeocodeBatchParams**kwargs) -> object
POST/api/v1/geocode/batch
ModelsExpand Collapse
class AutocompleteResult:

GeoJSON FeatureCollection of autocomplete suggestions

features: List[GeocodingFeature]
geometry: GeoJsonGeometry
coordinates: Union[List[float], List[List[float]], List[List[List[float]]], List[List[List[List[float]]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List[float]
List[List[float]]
List[List[List[float]]]
List[List[List[List[float]]]]
type: Literal["Point", "LineString", "Polygon", 3 more]
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties
country_code: Optional[str]

ISO 3166-1 alpha-2 country code

display_name: Optional[str]

Formatted address or place name

distance_m: Optional[float]

Distance in meters

osm_id: Optional[int]

OpenStreetMap ID

osm_type: Optional[str]

OSM element type

score: Optional[float]

Match confidence score

source: Optional[str]

Result source (address, place, interpolation)

type: Literal["Feature"]
type: Literal["FeatureCollection"]
class GeocodeResult:

GeoJSON FeatureCollection of geocoding results

features: List[GeocodingFeature]
geometry: GeoJsonGeometry
coordinates: Union[List[float], List[List[float]], List[List[List[float]]], List[List[List[List[float]]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List[float]
List[List[float]]
List[List[List[float]]]
List[List[List[List[float]]]]
type: Literal["Point", "LineString", "Polygon", 3 more]
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties
country_code: Optional[str]

ISO 3166-1 alpha-2 country code

display_name: Optional[str]

Formatted address or place name

distance_m: Optional[float]

Distance in meters

osm_id: Optional[int]

OpenStreetMap ID

osm_type: Optional[str]

OSM element type

score: Optional[float]

Match confidence score

source: Optional[str]

Result source (address, place, interpolation)

type: Literal["Feature"]
type: Literal["FeatureCollection"]
class GeocodingFeature:
geometry: GeoJsonGeometry
coordinates: Union[List[float], List[List[float]], List[List[List[float]]], List[List[List[List[float]]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List[float]
List[List[float]]
List[List[List[float]]]
List[List[List[List[float]]]]
type: Literal["Point", "LineString", "Polygon", 3 more]
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties
country_code: Optional[str]

ISO 3166-1 alpha-2 country code

display_name: Optional[str]

Formatted address or place name

distance_m: Optional[float]

Distance in meters

osm_id: Optional[int]

OpenStreetMap ID

osm_type: Optional[str]

OSM element type

score: Optional[float]

Match confidence score

source: Optional[str]

Result source (address, place, interpolation)

type: Literal["Feature"]
class ReverseGeocodeResult:

GeoJSON FeatureCollection of reverse geocoding results

features: List[GeocodingFeature]
geometry: GeoJsonGeometry
coordinates: Union[List[float], List[List[float]], List[List[List[float]]], List[List[List[List[float]]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List[float]
List[List[float]]
List[List[List[float]]]
List[List[List[List[float]]]]
type: Literal["Point", "LineString", "Polygon", 3 more]
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties
country_code: Optional[str]

ISO 3166-1 alpha-2 country code

display_name: Optional[str]

Formatted address or place name

distance_m: Optional[float]

Distance in meters

osm_id: Optional[int]

OpenStreetMap ID

osm_type: Optional[str]

OSM element type

score: Optional[float]

Match confidence score

source: Optional[str]

Result source (address, place, interpolation)

type: Literal["Feature"]
type: Literal["FeatureCollection"]