EU Trade Explorer Reports API

On-demand report generation: request reports, list request history and trial usage, plus the report pages' account gate and the full report text for registered readers.

GitHub OpenAPI

Operations 4

POST /api/reports/request Reports Request #
GET /api/reports/requests Reports Requests #
POST /api/reports/pdf-access Reports Pdf Access #
GET /api/reports/pdf-confirm Reports Pdf Confirm #

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-reports-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-reports-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EU Trade Explorer Reports 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: Reports
  description: 'On-demand report generation: request reports, list request history and trial usage, plus the report pages'' account gate and the full report text for registered readers.'
paths:
  /api/reports/request:
    post:
      tags:
      - Reports
      summary: Reports Request
      description: 'Request an on-demand report for a saved search (``search_id``) or

        inline dashboard-query criteria. Generated by the worker

        (reports/worker.py), published as an unlisted page and emailed to the

        user''s address — hence 403 while it is unverified.


        Every requested PDF carries the current theme''s immutable print/day

        snapshot. A re-click reuses the same request row: queued requests move

        to the latest snapshot, running ones keep the snapshot already claimed,

        failed ones are retried for free (409 ``being_fixed`` once they failed

        twice: the pipeline is being fixed), done ones are resent. A request — or

        a resend — counts toward the lifetime quota (429 ``total_cap``) only when

        it makes the worker write new prose: no published report for the query,

        or one gone stale. Multi-code queries are rejected.'
      operationId: reports_request_api_reports_request_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReportRequestReq'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportRequestResponse'
        '422':
          description: 'A malformed request: one sentence naming the fields, never their values.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: No valid session, personal key or OAuth access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
      - bearer: []
      - apiKey: []
      - session: []
  /api/reports/requests:
    get:
      tags:
      - Reports
      summary: Reports Requests
      description: 'The signed-in user''s report requests (newest first) plus the report

        quota and its usage, for the account panel.'
      operationId: reports_requests_api_reports_requests_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportRequestsResponse'
        '401':
          description: No valid session, personal key or OAuth access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
      - bearer: []
      - apiKey: []
      - session: []
  /api/reports/pdf-access:
    post:
      tags:
      - Reports
      summary: Reports Pdf Access
      description: 'The PDF gate''s form endpoint. Always 303-redirects back to the report

        page — ``#pdf-sent`` whether the address is new, known or throttled (no

        account-existence disclosure), ``#pdf-invalid`` when malformed. A verified

        account gets the PDF emailed straight away; a new or unverified address

        gets the confirmation link. Re-requests within PDF_GATE_RESEND_MINUTES

        are silently absorbed.'
      operationId: reports_pdf_access_api_reports_pdf_access_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_reports_pdf_access_api_reports_pdf_access_post'
      responses:
        '303':
          description: 'Back to the report page: `#pdf-sent`, or `#pdf-invalid` for a malformed address.'
        '422':
          description: 'A malformed request: one sentence naming the fields, never their values.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: Accounts are temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
  /api/reports/pdf-confirm:
    get:
      tags:
      - Reports
      summary: Reports Pdf Confirm
      description: 'Consume a PDF-gate confirmation token: mark the address verified,

        email the PDF, then redirect into the account page''s set-password form

        (the conversion pitch). An invalid/expired token lands on

        /account?verified=0.'
      operationId: reports_pdf_confirm_api_reports_pdf_confirm_get
      parameters:
      - name: token
        in: query
        required: false
        schema:
          type: string
          maxLength: 128
          default: ''
          title: Token
      responses:
        '303':
          description: To the account page's set-password form, or to `/account?verified=0` for an invalid or expired token.
        '422':
          description: 'A malformed request: one sentence naming the fields, never their values.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: Accounts are temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    ReportRequestResponse:
      properties:
        status:
          $ref: '#/components/schemas/WireEnum_ReportRequestOutcome_'
          description: '''pending'' when this report is already being generated, ''queued'' when (re)queued.'
        report_hash:
          type: string
          maxLength: 12
          minLength: 12
          pattern: ^[0-9a-f]{12}$
          title: Report Hash
          description: The report's content hash (its URL key).
        eta_minutes:
          type: integer
          title: Eta Minutes
          description: Estimated wait in minutes.
      additionalProperties: false
      type: object
      required:
      - status
      - report_hash
      - eta_minutes
      title: ReportRequestResponse
      description: 'POST /api/reports/request — the report-request outcome and the

        estimated wait.'
    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
    ReportRequestReq:
      properties:
        reporter:
          type: string
          maxLength: 120
          title: Reporter
          description: 'Declaring entity: an EU Member State, an EU candidate country, Northern Ireland (''XI''), or one of the three aggregate presets (''European Union'', ''Euro area'', ''EU candidate countries''), or a predefined reporter group name.'
          default: European Union
        group_reporters:
          anyOf:
          - items:
              type: string
              maxLength: 120
            type: array
            maxItems: 300
          - type: 'null'
          title: Group Reporters
          description: Explicit reporters for a custom reporter group. Each entry must be an EU Member State, EU candidate country, or Northern Ireland. When more than one is supplied the frame is aggregated into a synthetic group named after 'reporter'.
        partner_set:
          type: string
          maxLength: 120
          title: Partner Set
          description: Named partner preset, e.g. 'non-EU countries', 'EU countries', 'all countries', or a predefined partner group.
          default: non-EU countries
        partners:
          anyOf:
          - items:
              type: string
              maxLength: 120
            type: array
            maxItems: 300
          - type: 'null'
          title: Partners
          description: Explicit partner-country list that overrides 'partner_set' when present.
        period_start:
          type: string
          pattern: \d{4}-\d{2}
          title: Period Start
          description: Inclusive start of the analysis window, ISO month 'YYYY-MM'.
          default:
            year: 2015
            month: 1
        frequency:
          $ref: '#/components/schemas/Frequency'
          description: 'Resampling frequency for the series: ''month'', ''quarter'' or ''year''.'
          default: quarter
        remove_outliers:
          type: boolean
          title: Remove Outliers
          description: Drop extreme unit-price outliers before computing weighted-average prices.
          default: true
        name:
          type: string
          title: Name
          default: ''
        period_end:
          anyOf:
          - type: string
            pattern: \d{4}-\d{2}
            description: A calendar month, 'YYYY-MM'.
          - type: 'null'
          title: Period End
        search_id:
          anyOf:
          - type: string
            pattern: ^[0-9a-f]{12}$
          - type: 'null'
          title: Search Id
        customs_code:
          anyOf:
          - type: string
            description: A canonical customs code, TOTAL, or a supported residual spelling.
          - items:
              type: string
              description: A canonical customs code, TOTAL, or a supported residual spelling.
            type: array
            maxItems: 50
          - type: 'null'
          title: Customs Code
        lang:
          anyOf:
          - $ref: '#/components/schemas/WireEnum_Lang_'
          - type: 'null'
      additionalProperties: false
      type: object
      title: ReportRequestReq
      description: 'An on-demand report generation request (POST /api/reports/request):

        either a saved-search id, or inline criteria in the saved-search shape.

        ``lang`` is the report''s language, any :class:`Lang` (default: the

        account''s language).'
    ReportRequestsResponse:
      properties:
        requests:
          items:
            $ref: '#/components/schemas/ReportRequestRow'
          type: array
          title: Requests
          description: The user's past requests, newest first.
        caps:
          $ref: '#/components/schemas/ReportCaps'
          description: The report quota and its usage.
      additionalProperties: false
      type: object
      required:
      - requests
      - caps
      title: ReportRequestsResponse
      description: GET /api/reports/requests — the user's requests plus the report quota.
    Frequency:
      type: string
      enum:
      - month
      - quarter
      - year
      title: Frequency
      description: The resampling frequency of a series.
    ReportRequestRow:
      properties:
        id:
          type: integer
          title: Id
          description: The request's id.
        search_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Search Id
          description: The saved search the request was made from, when any.
        report_hash:
          type: string
          maxLength: 12
          minLength: 12
          pattern: ^[0-9a-f]{12}$
          title: Report Hash
          description: The report's content hash.
        status:
          $ref: '#/components/schemas/WireEnum_ReportStatus_'
          description: The request's status.
        page_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Page Url
          description: The report page's URL once the report was generated; kept while a resend is queued.
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
          description: The failure message, when generation failed.
        created_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Created At
          description: When the request was made.
      additionalProperties: false
      type: object
      required:
      - id
      - search_id
      - report_hash
      - status
      - page_url
      - error
      - created_at
      title: ReportRequestRow
      description: One past report request in the account panel.
    WireEnum_Lang_:
      type: string
      enum:
      - bg
      - cs
      - da
      - de
      - el
      - en
      - es
      - et
      - fi
      - fr
      - ga
      - hr
      - hu
      - it
      - lt
      - lv
      - mt
      - nl
      - pl
      - pt
      - ro
      - sk
      - sl
      - sv
      - ja
      - zh
      title: Lang
      description: 'Every language code the data or the published reports use. The value

        is the code itself: the same string in URLs, sqlite, JSON and file names.

        ``JA`` and ``ZH`` have no metadata: their reports take English labels and

        exist as HTML pages only. Build a value with ``Lang(code)``, which raises

        on any other code.'
    WireEnum_ReportStatus_:
      type: string
      enum:
      - queued
      - running
      - done
      - failed
      title: ReportStatus
      description: 'Lifecycle of an on-demand report request: the web app enqueues, the

        worker claims (running), then closes it as done or failed.'
    Body_reports_pdf_access_api_reports_pdf_access_post:
      properties:
        email:
          type: string
          maxLength: 254
          title: Email
          default: ''
        stem:
          type: string
          maxLength: 200
          title: Stem
          default: ''
        lang:
          type: string
          maxLength: 200
          title: Lang
          default: en
      type: object
      title: Body_reports_pdf_access_api_reports_pdf_access_post
    ReportCaps:
      properties:
        total:
          type: integer
          title: Total
          description: The lifetime report allowance.
        used_total:
          type: integer
          title: Used Total
          description: How many of those reports are used.
      additionalProperties: false
      type: object
      required:
      - total
      - used_total
      title: ReportCaps
      description: 'The account''s report quota: every request that makes the server write

        new report prose counts once, a public PDF-gate delivery included.'
    WireEnum_ReportRequestOutcome_:
      type: string
      enum:
      - pending
      - queued
      title: ReportRequestOutcome
      description: 'What POST /api/reports/request did: ``pending`` -- this report is

        already being generated; ``queued`` -- generation (or a resend of an

        already generated report) was (re)queued. A request always goes

        through the worker, which emails the personalised PDF.'
  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