All data sources

UN Comtrade

No authcomtrade

UN Comtrade — global bilateral trade flows (free preview tier). No auth. DATA: getTradeFlows (trade value + weight by reporter, partner, commodity, period). Energy HS codes: 2709 crude, 2710 refined, 2711 petroleum gases (LNG/LPG), 2701 coal, 2716 electricity. RULES: 1. reporterCode/partnerCode are UN M49 numeric codes (842=USA, 0=World, 156=China). period = YYYY (annual) or YYYYMM (monthly). flowCode M=import, X=export. 2. Preview tier is row-capped; descriptions may be null (codes only). Additive to census-trade (US-only).

Provenance

Freshness & coverage

FreshnessFreshness not declared
GeographicNot declared
TemporalNot declared
AuthenticationNo credentials required

Methods (2)

  • getTradeFlows

    read

    Bilateral trade flows by reporter, partner, HS commodity, period (value in USD, weight in kg).

    Required paramsreporterCodeperiod
    Input schema
    {
      "type": "object",
      "properties": {
        "reporterCode": {
          "type": "string"
        },
        "period": {
          "type": "string"
        },
        "cmdCode": {
          "type": "string"
        },
        "flowCode": {
          "type": "string"
        },
        "partnerCode": {
          "type": "string"
        },
        "frequency": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "A"
              ]
            },
            {
              "type": "string",
              "enum": [
                "M"
              ]
            }
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "reporterCode",
        "period"
      ]
    }
  • getServiceInfo

    read

    Energy HS codes, flow codes, common country codes, and caveats.

    Input schema
    {
      "type": "object",
      "properties": {},
      "additionalProperties": false
    }