EU Trade Explorer API Key API

Self-service personal API key management: generate, rotate and revoke the Bearer credential used for headless/programmatic REST access.

GitHub OpenAPI

Operations 2

POST /api/api-key/generate Auth Generate Api Key #
POST /api/api-key/revoke Auth Revoke Api Key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tradedashboard-eu:tradedashboard-eu-api-key-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tradedashboard-eu-api-key-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EU Trade Explorer API Key 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:
- name: API Key
  description: 'Self-service personal API key management: generate, rotate and revoke the Bearer credential used for headless/programmatic REST access.'
paths:
  /api/api-key/generate:
    post:
      tags:
      - API Key
      summary: Auth Generate Api Key
      description: 'Create (or rotate) the signed-in user''s personal API key. The raw key

        is returned exactly once and cannot be shown again; any previously issued

        key stops working immediately.'
      operationId: auth_generate_api_key_api_api_key_generate_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyResponse'
        '401':
          description: No valid session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: 'A personal key or OAuth token was presented: this destructive or credential-issuing action requires an interactive session.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
      - session: []
  /api/api-key/revoke:
    post:
      tags:
      - API Key
      summary: Auth Revoke Api Key
      description: Revoke the signed-in user's personal API key (idempotent).
      operationId: auth_revoke_api_key_api_api_key_revoke_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponse'
        '401':
          description: No valid session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: 'A personal key or OAuth token was presented: this destructive or credential-issuing action requires an interactive session.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
      - session: []
components:
  schemas:
    ApiKeyResponse:
      properties:
        api_key:
          type: string
          title: Api Key
          description: The raw API key; it cannot be retrieved again.
        api_key_created_at:
          type: string
          title: Api Key Created At
          description: When the key was issued.
        has_api_key:
          type: boolean
          title: Has Api Key
          description: Always true after generation.
      additionalProperties: false
      type: object
      required:
      - api_key
      - api_key_created_at
      - has_api_key
      title: ApiKeyResponse
      description: POST /api/api-key/generate — the new key, shown exactly once.
    OkResponse:
      properties:
        ok:
          type: boolean
          title: Ok
          description: 'Always true: failures are HTTP errors.'
      additionalProperties: false
      type: object
      required:
      - ok
      title: OkResponse
      description: The bare acknowledgement most account mutations return.
    ErrorBody:
      additionalProperties: false
      description: 'The dashboard''s error envelope: a refused request is answered with one

        human-readable sentence (``HTTPException.detail`` is a string, always;

        maintenance/checks/error_details.py). The OAuth protocol endpoints answer

        in the RFCs'' own format instead (``OAuthErrorBody``).'
      properties:
        detail:
          description: What was refused and why, as one sentence.
          title: Detail
          type: string
      required:
      - detail
      title: ErrorBody
      type: object
  securitySchemes:
    bearer:
      type: http
      description: A personal API key (`eut_...`) or an OAuth 2.1 access token (see `/.well-known/oauth-authorization-server`).
      scheme: bearer
    apiKey:
      type: apiKey
      description: A personal API key (`eut_...`).
      in: header
      name: X-API-Key
    session:
      type: apiKey
      description: The dashboard's sign-in session, set by `POST /api/auth/login`.
      in: cookie
      name: td_session
    personalKey:
      type: http
      description: A personal API key (`eut_...`) sent as a bearer token. OAuth access tokens are refused here.
      scheme: bearer