Skip to content
GuidesBlogPlaygroundDashboard

Elements

Query features by spatial predicate, bounding box, or H3 cell
client.elements.query(ElementQueryParams { bbox, contains, crosses, 18 more } query?, RequestOptionsoptions?): FeatureCollection { features, type }
GET/api/v1/features
Query features by spatial predicate, bounding box, or H3 cell
client.elements.queryPost(ElementQueryPostParams { bbox, contains, crosses, 18 more } params?, RequestOptionsoptions?): FeatureCollection { features, type }
POST/api/v1/features
Get feature by type and ID
client.elements.retrieve(numberid, ElementRetrieveParams { type } params, RequestOptionsoptions?): GeoJsonFeature { geometry, properties, type, id }
GET/api/v1/features/{type}/{id}
Get feature by type and ID
client.elements.lookup(RequestOptionsoptions?): GeoJsonFeature { geometry, properties, type, id }
POST/api/v1/features/lookup
Fetch multiple features by type and ID
client.elements.batch(ElementBatchParams { elements } body, RequestOptionsoptions?): FeatureCollection { features, type }
POST/api/v1/features/batch
Find features near a geographic point
client.elements.nearby(ElementNearbyParams { lat, limit, lng, 10 more } query?, RequestOptionsoptions?): FeatureCollection { features, type }
GET/api/v1/features/nearby
Find features near a geographic point
client.elements.nearbyPost(ElementNearbyPostParams { lat, limit, lng, 10 more } params?, RequestOptionsoptions?): FeatureCollection { features, type }
POST/api/v1/features/nearby
ModelsExpand Collapse
BatchRequest { elements }

Fetch multiple OSM elements by their type and ID in a single request. Maximum 100 elements per batch.

elements: Array<Element>

Array of element references to fetch

id: number

OSM element ID

type: "node" | "way" | "relation"

OSM element type

One of the following:
"node"
"way"
"relation"