Firecrawl Alexandria

UN Comtrade (comtradeplus.un.org)

UN Comtrade international merchandise and services trade statistics through the anonymous public API behind comtradeplus.un.org: trade value, quantity and weight by reporter, partner, flow and commodity (HS/SITC/BEC/EBOPS), national tariff lines, dataset availability and metadata, recent releases, world shares, MBS total-trade series and the reference code tables.

Try UN Comtrade (comtradeplus.un.org) now.

Choose an example or ask your own question.

UN Comtrade (comtradeplus.un.org)
TRY ASKING
1Request
stringRequired

Period(s): YYYY (annual) or YYYYMM (monthly); a comma-separated list and/or inclusive ranges (2012-2019, 201901-201906). At most 12 periods after expansion; each costs one upstream request.

stringRequired

UN M49 numeric reporter code(s), comma-separated (156 China, 842 USA, 276 Germany). Look codes up with reference_codes table=Reporters.

string

Product classification in the URL path: HS (as reported, any HS edition), H0-H6 (a specific HS edition), S1-S4 (SITC), BE/BE5 (BEC), EB/EB10/EB02/EBS (EBOPS, services).

string

One commodity code: TOTAL, an HS/SITC/BEC/EBOPS code at any level (85, 8504, 850440), or an aggregate alias AG2/AG4/AG6 for every code at that digit level. Default TOTAL.

string

Trade flow code(s), comma-separated: M import, X export, RM re-import, RX re-export, MIP/XIP/MOP/XOP/MIF/XIF/DX/FM sub-flows. Omit for every flow.

string

Partner area code(s), comma-separated. 0 is World (the reporter's total); omit for a breakdown by every partner. Look codes up with reference_codes table=partnerAreas.

5 credits
Codefollows the fields above
const result = await firecrawl.scrape({
  alexandria: {
    provider: "comtradeplus-un-org",
    capability: "trade-statistics/trade_data",
    options: {
      cmd_code: "850440",
      flow_code: "M",
      partner_code: "0",
      period: "2019",
      reporter_code: "156",
    },
  },
});
2Response example

This is a sample shape. Press Run to see live data from UN Comtrade (comtradeplus.un.org).

{
  "count": 1,
  "observed_at_ms": 1792433616822,
  "periods": [
    {
      "count": 1,
      "period": "2019",
      "source_url": "https://comtradeapi.un.org/public/v1/preview/C/A/HS?reporterCode=156&period=2019&partnerCode=0&flowCode=M&cmdCode=850440&includeDesc=true",
      "truncated": false
    }
  ],
  "records": [
    {
      "aggr_level": 6,
      "alt_qty": 2189054044,
      "alt_qty_unit_abbr": "u",
      "cif_value": 7111977093,
      "classification_code": "H5",
      "cmd_code": "850440",
      "cmd_desc": "Electrical static converters",
      "customs_code": "C00",
      "customs_desc": "TOTAL CPC",
      "flow_code": "M",
      "flow_desc": "Import",
      "fob_value": 0,
      "freq_code": "A",
      "gross_wgt": 0,
      "is_aggregate": true,
      "is_leaf": true,
      "is_net_wgt_estimated": true,
      "is_qty_estimated": true,
      "is_reported": false,
      "mot_code": 0,
      "mot_desc": "TOTAL MOT",
      "net_wgt": 142925552.458,
      "partner2_code": 0,
      "partner2_desc": "World",
      "partner_code": 0,
      "partner_desc": "World",
      "partner_iso": "W00",
      "period": "2019",
      "primary_value": 7111977093,
      "qty": 2189051044.308,
      "qty_unit_abbr": "u",
      "qty_unit_code": 5,
      "reporter_code": 156,
      "reporter_desc": "China",
      "reporter_iso": "CHN",
      "type_code": "C"
    }
  ],
  "request": {
    "classification": "HS",
    "cmd_code": "850440",
    "flow_code": "M",
    "freq_code": "A",
    "include_desc": true,
    "partner_code": "0",
    "periods": [
      "2019"
    ],
    "reporter_code": "156",
    "type_code": "C"
  },
  "truncated": false
}

Quality, speed and cost, last 24 hours, across every agent call to UN Comtrade (comtradeplus.un.org) through Alexandria.

Quality
88.6%
Calls answered without a tool error
Speed
27.6 s
95% of successful calls finish faster
Cost
5 credits
Firecrawl credits per call
Calls
580
Last 24 hours, every Alexandria user
Browse the library
//
Get started
//
Give your agent UN Comtrade (comtradeplus.un.org).
One API key for the live web and every provider in Alexandria.
Are you an AI agent? See setup options