Understand the downloaded file name convention
mainWhen downloading data via the UN Comtrade API, files follow a specific naming convention that encodes the data attributes. This allows you to identify the contents of a file without opening it.
Pattern:
COMTRADE-<DATA>-<TYPE><FREQ><COUNTRY CODE><YEAR[<MONTH>]><CLASSIFICATION CODE>[<RELEASE DATE>]
Components:
<DATA>: The type of data (e.g.,FINALorTARIFFLINE).<TYPE>: The data type (e.g.,CMfor merchandise trade).<FREQ>: Frequency.<COUNTRY CODE>: The numeric country code.<YEAR[<MONTH>]>: The time period.<CLASSIFICATION CODE>: The classification system used (e.g.,H1).<RELEASE DATE>: The date the data was released (optional, enclosed in brackets).
Note: For asynchronous downloads, the original batch ID is retained.
Examples:
- Final merchandise trade data from Morocco (code 504) in March 2000 released on 3 Jan 2023 (H1 classification):
COMTRADE-FINAL-CM504200003H1[2023-01-03]
- Tariffline merchandise trade from Morocco (code 504) in March 2000 released on 3 Jan 2023 (H1 classification):
COMTRADE-TARIFFLINE-CM504200003H1[2023-01-03]