Skip to content
GuidesPlaygroundDashboard

Query features by bounding box or H3 cell

FeatureCollection Elements.Query(ElementQueryParams?parameters, CancellationTokencancellationToken = default)
GET/api/v1/features

Query features by bounding box or H3 cell

ParametersExpand Collapse
ElementQueryParams parameters
string bbox

Bounding box: south,west,north,east. At least one of bbox or h3 is required.

string cursor

Cursor for pagination

string h3

H3 cell index. At least one of bbox or h3 is required.

Long limit

Maximum results (default 100, max 10000)

string type

Element types (comma-separated: node,way,relation)

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).

required IReadOnlyList<GeoJsonFeature> Features
required GeoJsonGeometry Geometry
required Coordinates Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
IReadOnlyList<Double>
IReadOnlyList<IReadOnlyList<Double>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>>
required Type Type
One of the following:
"Point"Point
"LineString"LineString
"Polygon"Polygon
"MultiPoint"MultiPoint
"MultiLineString"MultiLineString
"MultiPolygon"MultiPolygon
required IReadOnlyDictionary<string, JsonElement> Properties
required Type Type
string ID

Feature identifier (type/osm_id)

Long OsmID

OpenStreetMap ID

required Type Type

Query features by bounding box or H3 cell

ElementQueryParams parameters = new();

var featureCollection = await client.Elements.Query(parameters);

Console.WriteLine(featureCollection);
Returns Examples