API Overview

API Overview

Base URLs, versioning, CORS, and locale filtering for the DTPR API.

API Overview

The DTPR API provides read-only access to the DTPR taxonomy — elements, categories, and datachain types that describe data-collecting technologies in public spaces.

The API has moved to api.dtpr.io. Two things changed, not one. The hostname changed, and the path lost a segment: the retired base carried an extra dtpr segment between /api/ and the version, and that segment is gone. A find-and-replace of the hostname alone will not work — every call needs both edits. The old host is being switched off, so its URLs will break rather than redirect.

Base URLs

VersionBase URLStatus
v2https://api.dtpr.io/api/v2Current — actively maintained
v1https://api.dtpr.io/api/v1Frozen
v0https://api.dtpr.io/api/v0Frozen

Versioning

The API is versioned using a path prefix. v2 is the current version, and new integrations should point at it.

v0 and v1 are frozen. They serve exactly what dtpr.io served — byte for byte, apart from the icon URLs inside the response bodies, which were rewritten to point at the new per-version icon namespaces — and their content will not change again. They are preserved, not maintained. They stay published because v2 currently publishes only ai@… schema versions: the device taxonomy is available from v1 and v0 only.

Authentication

The API is public and requires no authentication. Every endpoint that returns taxonomy content is read-only; the v2 validation endpoints are POST because they take a document to check, not because they write anything.

CORS

All /api/** endpoints have CORS enabled, so you can call them directly from browser-side JavaScript.

Locale filtering

The v1 typed endpoints and the v2 read endpoints support an optional locales query parameter to filter localized content:

?locales=en
?locales=en,fr,es

When provided, only locale entries matching the requested codes are included in the response. When omitted, all available locales are returned.

GET /api/v1/elements?locales=… — the untyped v1 elements endpoint with a locales value — returns 500 Server Error. That is a defect in the frozen v1 surface, reproduced deliberately so consumers see what they saw before. Use the typed endpoints (/api/v1/elements/{datachain_type}, /api/v1/categories/{datachain_type}) when you need locale filtering. v0 ignores locales entirely; each v0 document is already single-locale.

Endpoints

v2 — current

MethodPathDescription
GET/api/v2/schemasPublished schema versions
GET/api/v2/schemas/{version}/manifestManifest for one schema version
GET/api/v2/schemas/{version}/categoriesCategories for one schema version
GET/api/v2/schemas/{version}/elementsElements for one schema version
GET/api/v2/schemas/{version}/elements/{element_id}A single element
GET/api/v2/schemas/{version}/elements/{element_id}/icon.svgComposed element icon
POST/api/v2/schemas/{version}/validateValidate a datachain instance

See the v2 reference for the full route list.

v1 — frozen

MethodPathDescription
GET/api/v1/elementsAll elements across all datachain types
GET/api/v1/elements/{datachain_type}Elements filtered by datachain type
GET/api/v1/categories/{datachain_type}Categories for a datachain type
GET/api/v1/icons/{icon_id}.svgElement icon (148 icons)

The datachain_type parameter must be one of the supported types: device, ai.

v0 — frozen

MethodPathDescription
GET/api/v0/{locale}Pre-rendered elements for one locale
GET/api/v0/icons/{icon_id}.svgElement icon (123 icons)

Icons

Icons are namespaced per version and there is no cross-version fallback — an id that exists only in v1 is a genuine 404 under v0. The icon URLs inside v0 and v1 response bodies are absolute — https://api.dtpr.io/api/v1/icons/identifiable_video.svg — so a consumer that follows the URL it is given needs no separate change, exactly as with the retired service.

Response format

All responses are JSON, except the icon endpoints, which return image/svg+xml. v1 element endpoints return arrays of element objects and v1 category endpoints return arrays of category objects; see the v1 reference for full schema details. v2 responses are wrapped in an envelope with an ok flag; see the v2 reference.

Copyright © 2026