bbox and filtering
Narrow OGC feature results by bounding box, category, city, and country, and combine filters with limit and offset paging.
bbox and filtering
The items endpoint accepts query parameters that narrow results before they are returned. Use bbox to restrict by area and category, city, or country to restrict by attribute. Combine any of them with limit and offset for paging.
These are the only server-side filters. There is no CQL filter parameter and no datetime parameter, matching the conformance declaration, which advertises only Core, GeoJSON, and OpenAPI classes. For anything more selective, page the results and filter client-side, or use the PostGIS SQL access endpoint.
Requires an organization API key with the GIS_ACCESS addon in the X-API-Key header, plus a license for the dataset. Each filtered items request costs 10 credits; see Rate limits and credits. See Authentication.
Parameters
| Parameter | Example | Meaning |
|---|---|---|
bbox |
4.85,52.34,4.95,52.40 |
Bounding box minLon,minLat,maxLon,maxLat in WGS84. Returns features inside the box. |
category |
bus_stop |
Match features whose category property equals this value. |
city |
Amsterdam |
Match features whose city property equals this value. |
country |
nl |
Match features whose country property equals this value. |
limit |
100 |
Features per page. Default 100, max 1000. |
offset |
0 |
Features to skip before returning results. |
Filters are combined with logical AND, a feature must satisfy every parameter you supply. The numberMatched field in the response reflects the filtered total, so paging works the same as in Items.
Filter by bounding box
bbox order is minLon,minLat,maxLon,maxLat. This example covers roughly central Amsterdam:
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/ogc/collections/transport_infrastructure_bushaltes/items?bbox=4.85,52.34,4.95,52.40"
Only features whose geometry falls inside that box are returned. Because coordinates are WGS84, you read the box as longitude-then-latitude, matching GeoJSON order.
Filter by attribute
Restrict to a single category:
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/ogc/collections/transport_infrastructure_bushaltes/items?category=bus_stop&limit=50"
Restrict to a city and country:
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/ogc/collections/transport_infrastructure_bushaltes/items?city=Rotterdam&country=nl"
Combine filters and page
Filters and paging compose. This pulls the second page of bus stops inside the Amsterdam box:
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/ogc/collections/transport_infrastructure_bushaltes/items?bbox=4.85,52.34,4.95,52.40&category=bus_stop&limit=100&offset=100"
Follow the response's next link to continue paging the filtered set.
Use directly from a GIS client
QGIS, ArcGIS, and other OGC-compatible clients can point straight at https://api.topolab.nl/v1/ogc as an OGC API - Features source, sending your key in the X-API-Key header. They issue these same item requests under the hood, bbox is driven by the map extent, and attribute filters map to the client's filter UI. See the QGIS plugin guide and the ArcGIS toolbox guide.
Errors
| Status | Meaning |
|---|---|
401 |
Missing or invalid API key (API key is required). |
403 |
Key is valid but the organization lacks the GIS_ACCESS addon. |
404 |
Unknown collectionId, or a dataset your organization is not licensed for. The two cases return the same 404. |
429 |
Rate limit exceeded. |
Next
- Items, the full FeatureCollection response shape.
- Single feature, fetch one feature by id.
- Need a key with
GIS_ACCESS? Get in touch.