POST /v1/data/customs/trade-stats/run
Pricing: $0.04 per aggregate bucket ($35.00 per 1,000).
Request
Send the inputs underparams. Only the keys below are accepted; any other key returns 422 invalid_params.
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).Whether to aggregate import records or export records.Allowed values:
imports (Imports), exports (Exports).Product description keywords to match; one of product, HS code, importer or exporter is required.
A customs HS code of 4 or more digits (a 2-digit chapter code needs another filter alongside it).
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.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.Bucket size used only when grouping by time period.Allowed values:
months (Months), quarters (Quarters), years (Years).How many aggregate buckets to return in total. Defaults to 100; use 0 for all.Max
100.Example
Response fields
Each row indata is one aggregate bucket, keyed by these fields.
Example response
Abridged: long text and lists are shortened.Related APIs
For the companies behind the trade usecustoms/companies; for individual shipments use customs/shipments.