Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: EU Trade Explorer Subcodes API
description: 'HTTP REST API for the EU Trade Explorer, serving Eurostat Comext (customs trade) and
PRODCOM (industrial production) statistics for the Combined Nomenclature. > Bridge to the tradedashboard.eu EU Trade Explorer — access the same data via REST endpoints or, for LLM agents, via the MCP bridge at mcp.tradedashboard.eu. ## Typical Workflow
1. **Resolve the product**: If you don''t already know the right Combined Nomenclature (CN) customs code, use `/api/reference/search` with a keyword (e.g. "glass jars") and `/api/reference/validate-customs-code/{customs_code}` for a candidate code. Note that CN nomenclature is often coarser than a colloquial product name: there is no code for "glass jars" alone, only a heading (7010) that bundles jars with bottles and closures; check `has_subcodes` and the returned hierarchy before assuming a code is a clean match. 2. **Choose your path**:
- **Short path**: Call `/api/descriptive/overview` for the headline totals. For a quick analysis, that plus `/api/descriptive/partner-detail` and `/api/concentration/concentration` is often enough. - **Long path**: There are ~25 analytical endpoints you can call iteratively depending on your angle: drill into `/api/descriptive/reporter-detail`, `/api/concentration/specialisation`, `/api/vulnerability/net-import-reliance`, etc. as needed. ## Request Model
Every analytical endpoint takes the same `DashboardQuery` JSON body:
- `customs_code`: Combined Nomenclature code(s) -- one code or a list; each code is one basket over the full requested period
- `baskets`: the explicit form of the customs-code selection (a list of baskets, each a list of `(customs_code, optional from/to month)` pieces summed into one line) -- use it to clip a code to specific months or to chain successor codes; exactly one of `customs_code` and `baskets`
- `reporter`: Declaring entity (EU Member State, etc.)
- `partner_set`: Named partner preset or custom list
- `period_start`, `period_end`: Analysis window (YYYY-MM format)
- `frequency`: ''month'', ''quarter'', or ''year''
- Plus endpoint-specific query parameters (`entity_level`, `flow`, `partner`, detection thresholds, ...)
## Streaming Responses
The analytical endpoints under `/api/descriptive`, `/api/concentration`, `/api/volatility`, `/api/vulnerability`, `/api/autonomy` and `/api/production` do not return a single JSON object. They stream newline-delimited JSON (`application/jsonl`): zero or more `{"type": "progress", "message": ...}` lines while Eurostat data loads, then exactly one terminal frame — either `{"type": "result", "data": ...}` or `{"type": "error", "detail": ..., "status": ...}`. Many endpoints also accept a `compact=true` query parameter to condense long numeric time series into summary statistics (first/last/min/max/mean/pct_change) instead of full series. Use this when you just want main trends; omit it when identifying shocks and outliers. ## Authentication & Access
Everything under `/api/reference` and `/api/auth` is public and unlimited. The analytical endpoints (`/api/descriptive`, `/api/concentration`,
`/api/volatility`, `/api/vulnerability`, `/api/autonomy`, `/api/production`)
require registration: anonymous calls for non-demonstration customs codes
get HTTP 401 with a registration invitation. The only anonymous exception:
queries made entirely of the dashboard''s welcome-page demonstration
customs codes, which stay fully browsable without an account, on every
analytical endpoint. Registering is free and currently unlimited — register once, then
use one of:
- A signed-in session cookie (from the dashboard UI)
- A personal API key sent as `Authorization: Bearer ...` or `X-API-Key`
- OAuth 2.1 authentication (for programmatic/headless clients)
See `/.well-known/oauth-authorization-server` for OAuth setup details.'
version: 1.0.0
tags:
# --- truncated at 32 KB (46 KB total) ---
# Full source: https://artifacts.apis.io/tradedashboard-eu/openapi/tradedashboard-eu-subcodes-api-openapi.yml