Skip to main content
POST
/
api
/
comtrade
/
datasets
/comtrade/datasets
curl --request POST \
  --url https://api.anysite.io/api/comtrade/datasets \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "reporter_code": 123,
  "period": "<string>",
  "timeout": 300,
  "type_code": "C",
  "freq_code": "A",
  "classification": "HS"
}
'
[
  {
    "@type": "@comtrade_dataset",
    "dataset_code": "<string>",
    "type_code": "<string>",
    "freq_code": "<string>",
    "period": "<string>",
    "reporter_code": 123,
    "reporter_iso": "<string>",
    "reporter_desc": "<string>",
    "classification_code": "<string>",
    "classification_search_code": "<string>",
    "is_original_classification": true,
    "is_extended_flow_code": true,
    "is_extended_partner_code": true,
    "is_extended_partner2_code": true,
    "is_extended_cmd_code": true,
    "is_extended_customs_code": true,
    "is_extended_mot_code": true,
    "total_records": 123,
    "dataset_checksum": 123,
    "first_released": "<string>",
    "last_released": "<string>"
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
reporter_code
integer
required

Reporter area code (M49/UN numeric)

Examples:

842

156

period
string
required

Period — year (YYYY) for annual, year-month (YYYYMM) for monthly

Example:

"2022"

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
type_code
enum<string>
default:C

Trade type — goods (C) or services (S)

Available options:
C,
S
freq_code
enum<string>
default:A

Frequency — annual (A) or monthly (M)

Available options:
A,
M
classification
enum<string>
default:HS

Commodity/service classification scheme

Available options:
HS,
H0,
H1,
H2,
H3,
H4,
H5,
H6,
SITC,
S1,
S2,
S3,
S4,
ST,
BEC,
B4,
B5,
EB,
EB02,
EB10,
EB10S

Response

Successful Response

@type
string
default:@comtrade_dataset
dataset_code
string | null
type_code
string | null
freq_code
string | null
period
string | null
reporter_code
integer | null
reporter_iso
string | null
reporter_desc
string | null
classification_code
string | null
classification_search_code
string | null
is_original_classification
boolean | null
is_extended_flow_code
boolean | null
is_extended_partner_code
boolean | null
is_extended_partner2_code
boolean | null
is_extended_cmd_code
boolean | null
is_extended_customs_code
boolean | null
is_extended_mot_code
boolean | null
total_records
integer | null
dataset_checksum
integer | null
first_released
string | null
last_released
string | null