Skip to content
GuidesPlaygroundDashboard

Reverse geocode a coordinate

geocode.reverse(GeocodeReverseParams**kwargs) -> ReverseGeocodeResult
GET/api/v1/geocode/reverse

Reverse geocode a coordinate

ParametersExpand Collapse
lat: float

Latitude

lng: float

Longitude

lang: Optional[str]

Language code for localized names (e.g. en, de, fr)

layer: Optional[str]

Filter by layer: house or poi

limit: Optional[int]

Maximum results (default 1, max 20)

radius: Optional[int]

Search radius in meters (default 200, max 5000)

ReturnsExpand Collapse
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"]

Reverse geocode a coordinate

import os
from plaza import Plaza

client = Plaza(
    api_key=os.environ.get("PLAZA_API_KEY"),  # This is the default and can be omitted
)
reverse_geocode_result = client.geocode.reverse(
    lat=0,
    lng=0,
)
print(reverse_geocode_result.features)
Returns Examples