Skip to content
GuidesPlaygroundDashboard

Fetch multiple features by type and ID

POST/api/v1/features/batch

Fetch multiple features by type and ID

Body ParametersJSONExpand Collapse
elements: array of object { id, type }
id: number
type: "node" or "way" or "relation"
One of the following:
"node"
"way"
"relation"
ReturnsExpand Collapse
FeatureCollection = object { features, type }

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

features: array of GeoJsonFeature { geometry, properties, type, 2 more }
geometry: GeoJsonGeometry { coordinates, type }
coordinates: array of number or array of array of number or array of array of array of number or array of array of array of array of number

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
array of number
array of array of number
array of array of array of number
array of array of array of array of number
type: "Point" or "LineString" or "Polygon" or 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: map[unknown]
type: "Feature"
id: optional string

Feature identifier (type/osm_id)

osm_id: optional number

OpenStreetMap ID

type: "FeatureCollection"

Fetch multiple features by type and ID

curl https://plaza.fyi/api/v1/features/batch \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $PLAZA_API_KEY" \
    -d '{
          "elements": [
            {
              "id": 0,
              "type": "node"
            }
          ]
        }'
Returns Examples