Skip to content
GuidesPlaygroundDashboard

Find features near a geographic point

elements.nearby(ElementNearbyParams**kwargs) -> FeatureCollection
GET/api/v1/features/nearby

Find features near a geographic point

ParametersExpand Collapse
lat: float

Latitude (-90 to 90)

lng: float

Longitude (-180 to 180)

limit: Optional[int]

Maximum results (default 20, max 100)

radius: Optional[int]

Search radius in meters (default 500, max 10000)

ReturnsExpand Collapse
class FeatureCollection:

Bare GeoJSON FeatureCollection. Pagination metadata is returned in HTTP headers (X-Limit, X-Has-More, X-Next-Cursor, X-Next-Offset, Link).

features: List[GeoJsonFeature]
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: Dict[str, object]
type: Literal["Feature"]
id: Optional[str]

Feature identifier (type/osm_id)

osm_id: Optional[int]

OpenStreetMap ID

type: Literal["FeatureCollection"]

Find features near a geographic point

import os
from plaza import Plaza

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