About this API
UN Comtrade is the database of official merchandise (and services) trade statistics reported by close to 200 countries and territories, run by the UN Statistics Division (UNSD). The API serves data as REST/JSON: export and import flows with values and quantities, by reporting country, partner, trade flow and commodity classification. The preview tier (the /public/v1/preview/ path) is public, needs no account or key and suits quick tests and small queries, but caps results at 500 records and is rate-limited. For full, large downloads (up to 250,000 records per request) there is the full API under a separate path, which requires a free subscription key from a UN Comtrade account. The data is governed by the UN policy on use and re-dissemination — intended for internal use, with re-dissemination requiring consent.
Frequently asked questions
Do I need an API key?
For the preview tier, no — it works without registration or a key, but it is capped at 500 records per request and rate-limited. The full API (up to 250,000 records per request) requires a free subscription key from a UN Comtrade account.
What data does this API return?
Annual and monthly merchandise (and services) trade statistics: export and import values and quantities broken down by reporting country, partner country, trade flow (export/import) and commodity code in the HS, SITC or BEC classifications. Responses are JSON.
Can this API be called directly from a browser?
No. The API does not return CORS headers permitting cross-origin requests, so browser front-end code is blocked — it must be called server-side. That is why there is no live "Try it" button here.
Who runs this API?
The United Nations — the UN Comtrade database maintained by the UN Statistics Division (UNSD). Documentation: uncomtrade.org.