Check Data Availability
comtrade_get_data_availabilityRead-only
Check which reporter/period/classification combinations have published data before constructing expensive trade queries. Returns dataset records with period, classification, record count, and first/latest release dates. Call this before querying recent periods — annual data is typically published 3–12 months after the reference year and not all countries report every year. Omit all parameters to browse the full availability index.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| freq | No | Frequency: A=annual, M=monthly. | A |
| period | No | Period to check: YYYY (annual) or YYYYMM (monthly). Omit to see all available periods for the reporter. | |
| type_code | No | Trade type: C=commodities (goods), S=services. | C |
| reporter_code | No | M49 reporter code to check. Omit to browse availability across all reporters. | |
| classification | No | Classification code filter (e.g. "HS", "H6", "EB10"). Omitted or blank defaults to HS for goods and EB10 for services. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Recovery hint when no availability records are found. | |
| datasets | No | Available datasets matching the query. | |
| totalDatasets | No | Total number of available dataset records. |