Skip to content
GuidesPlaygroundDashboard

Reverse geocode a coordinate

client.geocode.reverse(GeocodeReverseParams { lat, lng, lang, 3 more } query, RequestOptionsoptions?): ReverseGeocodeResult { features, type }
GET/api/v1/geocode/reverse

Reverse geocode a coordinate

ParametersExpand Collapse
query: GeocodeReverseParams { lat, lng, lang, 3 more }
lat: number

Latitude

lng: number

Longitude

lang?: string

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

layer?: string

Filter by layer: house or poi

limit?: number

Maximum results (default 1, max 20)

radius?: number

Search radius in meters (default 200, max 5000)

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

Reverse geocode a coordinate

import Plaza from '@plazafyi/sdk';

const client = new Plaza({
  apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted
});

const reverseGeocodeResult = await client.geocode.reverse({ lat: 0, lng: 0 });

console.log(reverseGeocodeResult.features);
Returns Examples