Concepts: datasets vs collections
The core Topolab concepts, datasets, products, and OGC collections, and how they relate across the REST and OGC APIs.
Concepts: datasets vs collections
A few terms recur across the API. Getting them straight makes the rest of the docs obvious.
One identifier: the dataset table
There is a single identifier, the dataset table (for example transport_infrastructure_bushaltes). The same table addresses a dataset over both interfaces:
GET /v1/dataset/transport_infrastructure_bushaltes (REST)
GET /v1/ogc/collections/transport_infrastructure_bushaltes (OGC)
There is no separate "slug". Learn one identifier and it works everywhere.
Dataset
A dataset is the data artifact, the records, schema, sample, and metadata. It is the thing of value, identified by a stable table name (for example transport_infrastructure_bushaltes). Every dataset Topolab operates has one, including B2B-only datasets that are not sold in the shop.
In the REST API you address a dataset by its table:
GET /v1/dataset/transport_infrastructure_bushaltes
GET /v1/dataset/transport_infrastructure_bushaltes/files/geojson
Product
A product is the commerce wrapper around one or more datasets, price, license, checkout. A dataset has zero or one product. Products matter when you buy; for data access you work with datasets.
Collection (OGC)
In the OGC API, each dataset you can access is exposed as a collection of features. "Collection" is the OGC term for a queryable set of geospatial features; for Topolab it maps to a dataset, and the collectionId is the dataset table. You list collections, then page through their items (features):
GET /v1/ogc/collections
GET /v1/ogc/collections/transport_infrastructure_bushaltes/items
So the same underlying dataset is a dataset in the REST API and a collection in the OGC API. Use whichever interface fits your tooling, REST/SDK for application code, OGC for GIS clients.
How they line up
| Concept | What it is | Where you meet it |
|---|---|---|
| Dataset | The data artifact (records, schema, metadata) | REST /v1/dataset/*, SDKs |
| Product | The commerce wrapper (price, license) | Shop / checkout |
| Collection | A dataset exposed as OGC features | OGC /v1/ogc/collections/* |
Free discovery vs paid access
Discovery is free and public; pulling the data costs credits. You can browse, read metadata, and inspect a sample before spending anything.
| Free (0 credits, no key) | Paid (credits, X-API-Key) |
|---|---|
List GET /v1/dataset/all |
Dataset file GET /v1/dataset/:table/files/:format (10) |
Metadata GET /v1/dataset/:table |
Coordinates GET /v1/dataset/:table/coordinates (15) |
Sample GET /v1/dataset/:table/sample/:format |
OGC items GET /v1/ogc/collections/:table/items (10) |
| Themes, industry codes, stats | SQL POST /v1/sql/query (25) |
Same data, two ways
The same dataset, transport_infrastructure_bushaltes, is reachable as a REST file or as OGC features. Both cost 10 credits and both need an X-API-Key.
REST, download the whole dataset as a file:
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/dataset/transport_infrastructure_bushaltes/files/geojson" \
-o transport_infrastructure_bushaltes.geojson
OGC, query features a page at a time (for GIS clients and spatial filters):
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/ogc/collections/transport_infrastructure_bushaltes/items?limit=100"
Reach for REST when you want the full artifact in application code; reach for OGC when you want paged, filterable features in a mapping tool.
Next
- Datasets API, work with datasets over REST.
- OGC API, work with the same data as collections.