Bilateral trade

Aggregated trade metrics

https://docs.importexportapi.com/endpoints/gettradesummary
gethttps://api.importexportapi.com/trade/summary

Total value, quantity, growth, unit value, top partners and partner concentration (HHI) for any reporter/partner/product/period selection.

curl -X GET "https://api.importexportapi.com/trade/summary" \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx"

Authorization

Authorizationstringheaderrequired

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

Query parameters

reporterstring | null
partnerstring | null
productstring | null
flowstring | null
fromstring | null
tostring | null

Response

200Successful Responseapplication/json
dataTradeSummaryrequired
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": {
    "trade_value": 0,
    "quantity": 0,
    "growth": 0,
    "unit_value": 0,
    "top_partners": [
      {
        "partner": "example",
        "value_usd": 0,
        "share": 0
      }
    ],
    "partner_concentration": 0,
    "periods": [
      {
        "period": "example",
        "value_usd": 0
      }
    ]
  },
  "request_id": "",
  "duration_ms": 0
}