Preview final trade data (up to 500 records, one period and one commodity).
GET/preview/{typeCode}/{freqCode}/{clCode}
- Passive: the target is not contacted
- Plan: No key needed
Returns a limited selection of trade data without a key: at most 500 records, at most 1 period and 1 commodity code. Codes for reporters, partners and commodities are in the Comtrade reference tables.
Path parameters
typeCodeC for commodities, S for services
freqCodeA for annual, M for monthly
clCodeProduct classification: HS, SITC, BEC (goods) or EBOPS (services)
Query parameters
reporterCodeReporter code; several codes separated by commas
periodYear (YYYY) or month (YYYYMM); a maximum of 1 period for preview
partnerCodePartner code; several codes separated by commas
cmdCodeCommodity code; a maximum of 1 for preview
flowCodeTrade flow code, case-insensitive; several separated by commas; omit to not filter
Response fields · 21ShowHide
elapsedTime
Time the server took
count
Number of records returned
error
Error text, empty on success
typeCode
C or S
freqCode
A or M
period
Period (year or year-month)
refYear
Reference year
reporterCode
Reporter code
reporterISO
Reporter ISO code (null in the preview)
reporterDesc
Reporter name (null in the preview)
flowCode
Trade flow code
partnerCode
Partner code
partner2Code
Second partner code
classificationCode
Classification edition
cmdCode
Commodity code
customsCode
Customs procedure code
motCode
Mode of transport code
qtyUnitCode
Quantity unit code
qty
Quantity
isQtyEstimated
Whether the quantity is estimated
altQty
Alternative quantity
curl 'https://comtradeapi.un.org/public/v1/preview/C/A/HS'{
"elapsedTime": "1.07 secs",
"count": 1,
"data": [
{
"typeCode": "C",
"freqCode": "A",
"refYear": 2022,
"period": "2022",
"reporterCode": 36,
"reporterISO": null,
"reporterDesc": null,
"flowCode": "X",
"partnerCode": 0,
"partner2Code": 0,
"classificationCode": "H6",
"cmdCode": "TOTAL",
"customsCode": "C00",
"motCode": 0,
"qtyUnitCode": -1,
"qty": 0,
"isQtyEstimated": false
}
],
"error": ""
}