Aan de slag
GA
Your first request
Anatomy of a Topolab API request and response, base URL, versioning, headers, and how to read what comes back.
Your first request
This page walks through one request end to end, so the shape is clear before you explore the rest of the API.
Base URL and versioning
All endpoints live under a versioned prefix:
| Environment | Base URL |
|---|---|
| Production | https://api.topolab.nl/v1 |
| Staging | https://api-staging.topolab.nl/v1 |
| Local | http://localhost:1337/v1 |
The API uses URI versioning; v1 is current.
A public request
Listing datasets needs no key and costs no credits:
curl "https://api.topolab.nl/v1/dataset/all?limit=2&country=nl"
The response is a paginated envelope, a data array plus a meta object:
{
"data": [
{
"table": "transport_infrastructure_bushaltes",
"title": "Dutch Bus Stops",
"country": "nl",
"totalRecords": 51532,
"type": "point",
"qualityGrade": { "grade": "A", "score": 0.93 },
"metadata": { "theme": "Transportation", "issued": "2026-05-01" }
}
],
"meta": {
"currentPage": 1,
"itemsPerPage": 2,
"totalItems": 896,
"totalPages": 448,
"hasPreviousPage": false,
"hasNextPage": true
}
}
Page through by incrementing page until meta.hasNextPage is false.
Field names above reflect the dataset model; the exact envelope is documented per endpoint in the Datasets API.
An authenticated request
Pull a dataset file. Send the key in X-API-Key; this consumes credits (10 for a full download):
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/dataset/transport_infrastructure_bushaltes/files/geojson" \
-o transport_infrastructure_bushaltes.geojson
Reading responses
- Success:
2xx. Listing endpoints return a paginated envelope; file endpoints stream the file. - Auth errors:
401(missing/invalid key),403(key valid but lacks the permission or addon, e.g.API_ACCESS). - Rate limiting:
429when you exceed the limits in Rate limits & credits. - Not found:
404for an unknown datasettable.