Glossary
Comtrade public preview endpoint
The Comtrade public preview endpoint is UN Comtrade Plus' free, unauthenticated read path at comtradeapi.un.org/public/v1/preview/{typeCode}/{freqCode}/{clsCode}, returning JSON records under a 'data' array with 'count' and 'elapsedTime'. Final non-preview records need the paid path; bulk full-year downloads need a logged-in premium account instead.
What is the Comtrade public preview endpoint?
It is the free, unauthenticated read path into UN Comtrade Plus, documented in the cataloged record as GET
Queries are built from typeCode=C, freqCode=A or M and clsCode=HS, plus reporter, partner, period, cmdCode and flowCode filters. Responses come back as JSON records nested under a 'data' array with 'count' and 'elapsedTime' alongside.
The preview covers annual and monthly flows - in the cataloged record, HS 85 electrical machinery and HS 90 optical/measuring instruments with value, weight and quantity fields. Two boundaries matter: final non-preview records require the paid path, and bulk download of full-year datasets is gated to logged-in premium users.
Why does the public preview endpoint matter when choosing a dataset?
The preview defines what a Comtrade-based product can offer for free, so it is the baseline every vendor should be measured against.
- Preview is not final data. The endpoint serves preview records; certified final records require the paid path, and revisions can move numbers between the two.
- Bulk is a separate gate. Downloading full-year datasets needs a logged-in premium account, so an API-only pipeline cannot substitute for the bulk files.
- Parameter discipline is the skill. typeCode, freqCode, clsCode plus reporter, partner, period, cmdCode and flowCode filters are the whole query surface - a source that cannot state them is reselling blindly.
- Attribution still applies. The data is free with UN Comtrade cited as the reference, supplied without modification by UNSD.
How do you evaluate a Comtrade preview data source?
- Call the endpoint yourself. It is unauthenticated - if a vendor cannot reproduce a preview response, their pipeline is opaque.
- Check which records they serve. Preview versus final is a real distinction; ask whether their numbers are certified final values.
- Verify the parameter mapping. typeCode=C, freqCode=A/M, clsCode=HS with reporter, partner, period, cmdCode and flowCode filters should map cleanly to their UI or API.
- Test the response envelope. Records nested under 'data' with 'count' and 'elapsedTime' is the documented shape.
- Plan the paid boundary. Bulk full-year downloads require premium login, so decide early whether your workflow needs them.
Where to see it in context: electronic equipment instruments data and homefurnishing retail data.
Related terms
These entries cover the key that unlocks final data and the interface the preview belongs to: - apim subscription key — Final (non-preview) Comtrade data is served through an Azure API Management gateway, so calls to comtradeapi.un.org/data/v1/get must pass a subscription key obtained through the UN Comtrade Developer Portal (comtradedeveloper.un.org) as... - un comtrade plus tradeflow — TradeFlow is UN Comtrade Plus' query interface for the UN's official bilateral merchandise trade statistics, built from reports submitted by national statistical offices.
Frequently asked questions
Is the Comtrade API free?
The preview path is: GET comtradeapi.un.org/public/v1/preview/{typeCode}/{freqCode}/{clsCode} needs no authentication. Final non-preview records require the paid path, and bulk full-year downloads are gated to logged-in premium users.
What parameters does the Comtrade preview endpoint take?
typeCode (C), freqCode (A or M) and clsCode (HS) in the path, plus reporter, partner, period, cmdCode and flowCode as filters. Responses return JSON records under a 'data' array with 'count' and 'elapsedTime'.
What is the difference between preview and final Comtrade data?
Preview records come through the free unauthenticated endpoint; final non-preview records require the paid path. Values can differ between the two as estimates are replaced with certified figures.
Datasets containing this field
Datasets containing Comtrade public preview endpoint
6 datasets carry comtrade public preview endpoint in the catalog. Open one, count the fields, judge for yourself.
Census Foreign Trade – Schedule B / HS-Based Trade Statistics
EU Open Data Portal - Electronics Datasets
id · identifier · title …+11 more
Google Patents Public Data on BigQuery
Hugging Face Datasets - Electronics & Semiconductors
id · downloads · likes …+5 more
JEITA Electronics Shipment & Production Statistics
Product category · Sub-category · Unit …+3 more
Every listing shows the field dictionary, sample rows, and coverage before you commit. API, files, or your warehouse. Daily, weekly, or hourly.
Get sample rows