Reference · built on requestCommons signalEconomic & calendar reference

UN Comtrade API

Merchandise and services trade by reporter, counterpart, and HS code from the UN Comtrade database, with a free subscription key.

About

UN Comtrade is the United Nations Statistics Division's repository of import and export statistics reported by the statistical authorities of nearly 200 countries and areas since 1962. The API at comtradeapi.un.org returns trade value, quantity, and gross weight by reporter, counterpart, commodity, and flow, classified under HS, SITC, BEC, and EBOPS 2002, at annual or monthly frequency. A preview endpoint works without a key; the data endpoints need a subscription key from the developer portal, and a registered account gets the free product.

An operator built on Fibric reads the flows for the goods and lanes you depend on, checks getDa for newly released periods, and proposes a sourcing note or a customs classification check for your approval. The reporter, period, and HS code stay on the record.

This is a reference listing. It documents what Fibric would read from UN Comtrade API and what it could propose, based on the publisher's published interfaces. Fibric builds it under a managed deployment when you request it; selecting it here installs nothing.

Inputs

  • Final trade data through data/v1/get with type C for goods or S for services, frequency A or M, and a classification such as HS, H5, H4, H3, or S3
  • Trade value (CIF and FOB), quantity in secondary units, and gross weight per record
  • Tariff-line data through data/v1/getTariffline and data availability through data/v1/getDa, which lists released periods per reporter
  • Metadata through data/v1/getMetadata and bulk file availability through bulk/v1/get
  • Reference code lists under files/v1/app/reference: Reporters.json, partnerAreas.json, tradeRegimes.json, HS.json, SS.json, QuantityUnits.json, and ModeOfSupply.json
  • A no-key preview through public/v1/preview, limited to 500 records and a single period and product per call
  • Responses as JSON by default, or CSV and tab-separated TXT through the format parameter

Proposed actions

Read-only. This feed informs operators; it changes nothing.

Proposed actions are target capabilities. Every action runs propose-first and needs a validated deployment and the appropriate permissions.

What you can build

  • Check an HS classification before the declaration

    When a new SKU needs a commodity code, the operator looks up how your destination country reports imports under the candidate HS heading and proposes the code, with the reporter's recent trade under it as evidence.

    With Customs Declaration

  • Spot an import lane that is shifting suppliers

    For each import lane you rely on, the operator compares the latest released monthly flows against the prior year. When a counterpart's share of the lane falls, it proposes a sourcing review with the period and flow attached.

    With Lead-Time Drift, Inbound Delay

  • Brief the quarter on export demand by market

    The operator reads annual and monthly imports of your product's HS code by destination market, ranks the markets, and proposes a paragraph for the board pack citing UN Comtrade and the reference period.

    With Demand Outlook, Board Pack

Requirements

  • A registered UN Comtrade account and a subscription to the Free APIs product on the developer portal; the key appears under Profile once its state is Active
  • M49 reporter codes and HS commodity codes for the goods and lanes you follow, taken from the reference JSON files
  • Network reach to comtradeapi.un.org
  • Source credit as UN Comtrade in anything you publish, and a licence from UNSD for any for-profit redistribution
Authentication
A subscription key from comtradedeveloper.un.org, sent as the subscription-key query parameter. Registered UN Comtrade users subscribe to the Free APIs product; premium subscribers request a key from their profile page.

Limits

  • The free key allows 500 data API calls per day at one call per second; the public preview is capped at 500 records and one period and product per call
  • Bulk files, the async API, and higher daily quotas are premium products sold through shop.un.org
  • There is no fixed release schedule: data is processed as reporters send it, and monthly figures from some countries arrive well after the reference month
  • Free use is internal use only; extraction or streaming beyond 100,000 records, or any for-profit redistribution, needs a licence from UNSD

Access and pricing

Reference listing. Public feed access is separate from Fibric integration. If you request this feed, your quote covers the build, usage, and support.

Request UN Comtrade API ↗

Questions and answers

Is there a free way to query UN Comtrade?
Yes. public/v1/preview needs no key but returns at most 500 records for one period and product per call. A registered account can subscribe to the Free APIs product and receive a key good for 500 data calls a day at one call per second.
How current is the monthly data?
It varies by reporter. UNSD processes submissions continuously; some countries provide monthly data within a month of the reference period and others later, and some send annual totals without a monthly breakdown. data/v1/getDa reports which periods a reporter has released.
Can I republish the figures?
A few tables or charts in articles, books, or social media need no licence, and free applications may extract up to 100,000 records. For-profit visualisation, extraction, or streaming needs a licence with a fee, and re-dissemination needs an active premium subscription. Cite the source as UN Comtrade.
Ask about UN Comtrade API

Ask about the capabilities and requirements in this listing.

For project-specific requirements, contact Fibric.