Skip to content
GuidesPlaygroundDashboard

Query features by bounding box or H3 cell

$client->elements->query(?string bbox, ?string cursor, ?string h3, ?int limit, ?string type): FeatureCollection
GET/api/v1/features

Query features by bounding box or H3 cell

ParametersExpand Collapse
bbox?:optional string

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

cursor?:optional string

Cursor for pagination

h3?:optional string

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

limit?:optional int

Maximum results (default 100, max 10000)

type?:optional string

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

ReturnsExpand Collapse
list<GeoJsonFeature> features
Type type

Query features by bounding box or H3 cell

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'My API Key', environment: 'local');

$featureCollection = $client->elements->query(
  bbox: 'bbox', cursor: 'cursor', h3: 'h3', limit: 0, type: 'type'
);

var_dump($featureCollection);
Returns Examples