Skip to main content
POST /v1/data/customs/trade-stats/run Pricing: $0.04 per aggregate bucket ($35.00 per 1,000).

Request

Send the inputs under params. Only the keys below are accepted; any other key returns 422 invalid_params.
string
default:"hsCode"
How to bucket matching trade records: by HS code, origin country, destination country, or time period.Allowed values: hsCode (HS code), originCountry (Origin country), destinationCountry (Destination country), period (Time period).
string
default:"imports"
Whether to aggregate import records or export records.Allowed values: imports (Imports), exports (Exports).
string[]
Product description keywords to match; one of product, HS code, importer or exporter is required.
string
A customs HS code of 4 or more digits (a 2-digit chapter code needs another filter alongside it).
string
An importing company name to filter records by.
string
An exporting company name to filter records by.
string[]
Restrict to these origin countries, as ISO 3166 alpha-3 codes (e.g. COL, USA). Pick from the list; English country names are also accepted.248 allowed values, for example AFG (Afghanistan), ALA (Aland Islands), ALB (Albania), DZA (Algeria), ASM (American Samoa), AND (Andorra), AGO (Angola), AIA (Anguilla), ATA (Antarctica), ATG (Antigua and Barbuda). Fetch the full list with GET /v1/data/customs/trade-stats?expand=options.
string[]
Restrict to these destination countries, as ISO 3166 alpha-3 codes (e.g. COL, USA). Pick from the list; English country names are also accepted.248 allowed values, for example AFG (Afghanistan), ALA (Aland Islands), ALB (Albania), DZA (Algeria), ASM (American Samoa), AND (Andorra), AGO (Angola), AIA (Anguilla), ATA (Antarctica), ATG (Antigua and Barbuda). Fetch the full list with GET /v1/data/customs/trade-stats?expand=options.
date
Start of the query window, defaults to one year before the end date.
date
End of the query window, defaults to today.
string
default:"months"
Bucket size used only when grouping by time period.Allowed values: months (Months), quarters (Quarters), years (Years).
integer
default:"100"
How many aggregate buckets to return in total. Defaults to 100; use 0 for all.Max 100.

Example

Response fields

Each row in data is one aggregate bucket, keyed by these fields.

Example response

Abridged: long text and lists are shortened.
For the companies behind the trade use customs/companies; for individual shipments use customs/shipments.