EU Trade Explorer Searches API

Account search lifecycle: record recent dashboard searches, save searches and remove saved searches.

GitHub OpenAPI

Operations 3

POST /api/searches/recent Searches Add Recent #
POST /api/searches/saved Searches Save #
DELETE /api/searches/saved/{search_id} Searches Remove Saved #

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-searches-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-searches-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EU Trade Explorer Searches 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: searches
  description: 'Account search lifecycle: record recent dashboard searches, save searches and remove saved searches.'
paths:
  /api/searches/recent:
    post:
      tags:
      - searches
      summary: Searches Add Recent
      description: 'Record a dashboard search on the user''s history (deduped by criteria,

        capped) and return the updated list.'
      operationId: searches_add_recent_api_searches_recent_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecentSearchReq'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecentSearchesResponse'
        '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/searches/saved:
    post:
      tags:
      - searches
      summary: Searches Save
      description: 'Save a dashboard search on the user''s account (permanent, never

        evicted by the history cap) and return the updated list.'
      operationId: searches_save_api_searches_saved_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedSearchReq'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearchesResponse'
        '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/searches/saved/{search_id}:
    delete:
      tags:
      - searches
      summary: Searches Remove Saved
      description: 'Remove one of the signed-in user''s saved searches; returns the updated

        list.'
      operationId: searches_remove_saved_api_searches_saved__search_id__delete
      security:
      - bearer: []
      - apiKey: []
      - session: []
      parameters:
      - name: search_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[0-9a-f]{12}$
          title: Search Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearchesResponse'
        '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'
components:
  schemas:
    SavedSearchesResponse:
      properties:
        saved_searches:
          items:
            $ref: '#/components/schemas/SavedSearch'
          type: array
          title: Saved Searches
          description: The saved searches, most recently updated first.
      additionalProperties: false
      type: object
      required:
      - saved_searches
      title: SavedSearchesResponse
      description: POST/DELETE /api/searches/saved — the updated saved searches.
    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
    RecentSearchesResponse:
      properties:
        recent_searches:
          items:
            $ref: '#/components/schemas/SavedSearch'
          type: array
          title: Recent Searches
          description: The search history, most recent first.
      additionalProperties: false
      type: object
      required:
      - recent_searches
      title: RecentSearchesResponse
      description: POST /api/searches/recent — the updated history.
    SavedSearchReq:
      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
        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
          title: Customs Code
      additionalProperties: false
      type: object
      required:
      - customs_code
      title: SavedSearchReq
      description: 'A dashboard search to save on the user''s account. Same shape as the

        recent-history entries -- saved searches carry no notification flags

        (there is no per-search notification system).'
    Frequency:
      type: string
      enum:
      - month
      - quarter
      - year
      title: Frequency
      description: The resampling frequency of a series.
    SavedSearch:
      properties:
        reporter:
          type: string
          maxLength: 120
          title: Reporter
          default: European Union
        group_reporters:
          anyOf:
          - items:
              type: string
              maxLength: 120
            type: array
            maxItems: 300
          - type: 'null'
          title: Group Reporters
        partner_set:
          type: string
          maxLength: 120
          title: Partner Set
          default: non-EU countries
        partners:
          anyOf:
          - items:
              type: string
              maxLength: 120
            type: array
            maxItems: 300
          - type: 'null'
          title: Partners
        period_start:
          type: string
          pattern: \d{4}-\d{2}
          title: Period Start
          description: Inclusive start of the analysis window, ISO month 'YYYY-MM'.
          default: 2015-01
        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
        id:
          type: string
          title: Id
        customs_code:
          anyOf:
          - type: string
          - items:
              type: string
            type: array
          title: Customs Code
        saved_at:
          type: string
          title: Saved At
      additionalProperties: false
      type: object
      required:
      - id
      - customs_code
      - saved_at
      title: SavedSearch
      description: 'One stored search: a ``saved_searches`` payload, or one element of a

        ``recent_searches`` blob (both tables share the shape). A stored key this

        model does not declare raises. A stored month is read strictly (``Month``),

        never corrected.'
    RecentSearchReq:
      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
        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
          title: Customs Code
      additionalProperties: false
      type: object
      required:
      - customs_code
      title: RecentSearchReq
      description: 'One dashboard search to remember on the user''s account: every query

        parameter from the dashboard URL except the palette. Field defaults

        mirror the dashboard''s own.'
  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