---
title: "Search Codes"
method: GET
path: "/api/reference/search"
tags: ["reference"]
---

# Search Codes

`GET /api/reference/search`

## Request

- Base URL: `https://tradedashboard.eu` (the document declares no server; this is the origin it was published from)
- URL: `https://tradedashboard.eu/api/reference/search`
- Auth: none declared

Keyword/code search over a nomenclature for the sidebar typeahead:
ranked ``{code, label, path}`` candidates.

A dotted PRODCOM notation (``XX.XX`` or deeper) is auto-detected and runs
the PRODCOM→CN reverse mapping instead; candidates then carry a
``via_prodcom`` provenance tag and the response a ``matched_prodcom``
block (present even when no CN code maps, so the frontend can warn).

## Query parameters

- `q` string, required
- `source` string
- `lang` string
- `limit` integer

## Response `200`

Successful Response

- SearchResponse: GET /api/reference/search — ranked candidates; ``matched_prodcom`` is set when the query was a dotted PRODCOM notation.
  - `query` string, required
  - `lang` string, required
  - `source` string, required
  - `matched_prodcom` object, nullable
  - `results` SearchResult[], required
    - `code` string, required
    - `label` string
    - `path` string[]
    - `via_prodcom` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tradedashboard/apis/eu-trade-explorer.md) · [All operations](https://skmtc.dev/tradedashboard/apis/eu-trade-explorer/llms.txt) · [OpenAPI document](https://skmtc.dev/tradedashboard/apis/eu-trade-explorer/revisions/b9abc715a5c2?raw)
