Product trade

Top markets for a product

https://docs.importexportapi.com/endpoints/getproductmarkets
gethttps://api.importexportapi.com/products/{pid}/markets

Top exporting and importing countries for a product over a period.

curl -X GET "https://api.importexportapi.com/products/example/markets" \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx"

Authorization

Authorizationstringheaderrequired

Bearer token. API key from your importexportapi dashboard Format: `Bearer sk_live_xxxxxxxxxxxxxxxxxxxx`.

Path parameters

pidstringrequired

Query parameters

fromstring | null
tostring | null
limitintegerdefault 20

min 1 · max 200

Response

200Successful Responseapplication/json
dataMarketsrequired
request_idstringdefault ""
duration_msintegerdefault 0
401Missing or invalid API keyapplication/json
errorstring
messagestring
request_idstring
422Validation Errorapplication/json
detailValidationError[]
429Rate limit exceededapplication/json
errorstring
messagestring
request_idstring
Response
{
  "data": {
    "top_exporters": [
      {
        "period": "2026-01-01",
        "partner": "example",
        "exporter": "example",
        "importer": "example",
        "hs6": "example",
        "value_usd": 0,
        "quantity": 0,
        "flow_count": 3
      }
    ],
    "top_importers": [
      {
        "period": "2026-01-01",
        "partner": "example",
        "exporter": "example",
        "importer": "example",
        "hs6": "example",
        "value_usd": 0,
        "quantity": 0,
        "flow_count": 3
      }
    ]
  },
  "request_id": "",
  "duration_ms": 0
}