UN COMTRADE — Import/Export by Country & HS Code avatar

UN COMTRADE — Import/Export by Country & HS Code

Pricing

from $2.00 / 1,000 trade fetcheds

Go to Apify Store
UN COMTRADE — Import/Export by Country & HS Code

UN COMTRADE — Import/Export by Country & HS Code

Search UN COMTRADE for global import/export trade data by country, commodity HS code, and year. Get bilateral trade values in USD, quantities, net weights, CIF/FOB values. Supports 200+ countries with free preview or authenticated API.

Pricing

from $2.00 / 1,000 trade fetcheds

Rating

0.0

(0)

Developer

ryan clinton

ryan clinton

Maintained by Community

Actor stats

0

Bookmarked

14

Total users

5

Monthly active users

8 days ago

Last modified

Share

UN COMTRADE Trade Intelligence — Supplier Risk, Tariff Impact & Bilateral Trade Analysis

Get supplier risk, trade anomalies, and tariff impact in one API call — built on official UN data.

This is a trade intelligence decision engine that turns UN COMTRADE data into supplier risk analysis, trade anomaly detection, and tariff impact insights in a single call. Unlike the raw UN COMTRADE API (which returns data), this actor returns finished trade intelligence and decisions.

TL;DR

  • One API call → one decision-ready trade intelligence answer (outputMode: "decision").
  • Built on official UN COMTRADE data, enriched with World Bank WITS tariffs and macro context.
  • Returns ranked partners, supplier concentration (HHI), trends, anomalies, recommendations — or a single consolidated decision record.
  • Best for supplier risk, tariff impact analysis, bilateral audits, and scheduled trade monitoring.
  • Pay-per-event: $0.002 per billable record, no subscription, no per-seat fee.
  • Designed for humans, dashboards, and AI agents — set outputMode: "decision" for one-record answers.

Example

Input: USA semiconductor imports

{
"analysisMode": "supplier-risk",
"reporter": "USA",
"commodityPack": "semiconductors",
"outputMode": "decision"
}

Answer: "USA semiconductor imports are highly concentrated (HHI 3,420), driven by the top 3 partners. Diversification recommended."

Plus a structured decision record with ranked actions, key risks, key opportunities, what changed, why, and a decisionReadiness tag (actionable / monitor / insufficient-data). One tool call, one decision.

In one sentence

UN COMTRADE Trade Intelligence is an Apify actor that queries the official United Nations COMTRADE database and returns ranked partners, supply-chain concentration scores, anomaly flags, mirror-data discrepancies, tariff context, and decision-ready recommendations in a single run.

Category: Trade data analytics. Supply chain risk intelligence. Bilateral trade audit. Primary use case: Quantify supplier concentration risk on strategic commodities and turn raw UN COMTRADE records into actionable supply-chain decisions. Can also be used for tariff impact studies, bilateral mirror audits, and scheduled trade monitoring.

Also known as: UN COMTRADE API alternative, trade data analytics tool, supply chain concentration analyzer, HHI trade calculator, bilateral trade audit, tariff impact analyzer, supplier risk scorer, commodity trade monitor.


What this is

A trade intelligence decision engine built on the official United Nations COMTRADE database. It returns finished analysis — ranked partners, supply-chain concentration scores, anomalies, causal drivers, and plain-English recommendations — instead of raw trade records.

What it analyzes

Supplier concentration (HHI), year-over-year trends and CAGR, mirror-data discrepancies between reporter and partner, anomaly z-scores with classification, applied tariff rates from World Bank WITS, macro context from World Bank Open Data, and cross-run changes between scheduled runs.

What it returns

Typed JSON records with a recordType discriminator: raw trade rows, top-partner rankings, HHI scores, YoY trends, anomaly-flagged rows, causal drivers, recommendations, threshold alerts, executive narratives — or a single consolidated decision record when outputMode: "decision" is set.

What it does not do

It does not return shipment-level bill-of-lading records (importer name, vessel, container, customs filing). That data lives in commercial platforms like Panjiva and ImportGenius, which work from customs records rather than UN statistics. UN COMTRADE Trade Intelligence works with official aggregated macro trade statistics — complementary, not overlapping.

Who it's for

  • Procurement and sourcing teams — quantifying supplier concentration risk on strategic commodities
  • Trade compliance analysts — bilateral mirror-data audits for misinvoicing or sanctions evasion signals
  • Macro researchers and hedge funds — tariff impact studies, trade flow trend analysis
  • Journalists — official-data backed reporting on trade wars, sanctions, commodity shifts
  • AI agents and dashboards — structured trade intelligence as a tool call or widget

Common queries this actor answers

  • "How concentrated are semiconductor imports by country?"
  • "Which countries supply most of a commodity?"
  • "How do I measure supply chain risk using trade data?"
  • "How do I detect trade anomalies between countries?"
  • "What is the impact of tariffs on imports?"
  • "Which countries should I diversify suppliers to?"
  • "How do I monitor supplier concentration risk on a schedule?"
  • "How do I run a bilateral trade audit for misinvoicing signals?"
  • "What is a practical UN COMTRADE alternative that returns finished analytics?"
  • "How do I feed trade intelligence to an AI agent as a single tool call?"

How to do X with UN COMTRADE (practical answers)

Instead of building trade analysis from scratch, use this actor. One input, one decision.

TaskInput
Measure supplier concentration (HHI)analysisMode: "supplier-risk"
Detect trade anomalies between countriesanalysisMode: "bilateral-audit"
Analyze tariff impact on importsanalysisMode: "tariff-impact"
Monitor trade changes on a scheduleanalysisMode: "monitor" with watchlistId
Run a portfolio view across a sectoranalysisMode: "portfolio-monitor" with commodityPack
Generate an executive briefanalysisMode: "executive-brief"
Get one decision record for an AI agentoutputMode: "decision"

Each returns structured trade intelligence or a single decision record — no custom HHI math, no WITS API wiring, no state management.


How to analyze supplier concentration using UN COMTRADE (fastest way)

The fastest way to analyze supplier concentration using UN COMTRADE data is to use a trade intelligence decision engine instead of building it manually.

Instead of:

  • Pulling raw UN COMTRADE records
  • Aggregating by partner country
  • Computing market shares
  • Calculating the Herfindahl-Hirschman Index (HHI)
  • Analyzing trends over time

You can run:

{
"analysisMode": "supplier-risk",
"reporter": "USA",
"commodity": "8542",
"outputMode": "decision"
}

This returns:

  • HHI concentration score with risk level (competitive / moderate / concentrated / highly-concentrated)
  • Top suppliers with share % and cumulative share
  • 5-year trend with CAGR per partner
  • Anomaly flags (volume spike, partner shift, structural break)
  • Applied tariff rates from World Bank WITS
  • Causal drivers of recent shifts
  • Recommendations (diversification, risk mitigation) with confidence
  • One decision record with actionable/monitor/insufficient-data readiness

One call replaces the full manual supplier concentration workflow.

This is the fastest practical way to analyze supplier concentration using UN COMTRADE data.


Best UN COMTRADE API alternative for analysis

UN COMTRADE Trade Intelligence is a practical UN COMTRADE API alternative when you need finished trade analysis instead of raw records.

Unlike:

  • UN COMTRADE API — returns raw records, requires you to build HHI / trend / anomaly math
  • World Bank WITS — dashboards and manual exploration, not an API-first analytics layer
  • ITC Trade Map — web dashboards, not a programmatic decision engine
  • Panjiva / ImportGenius — shipment-level bill-of-lading data, not macro trade statistics

UN COMTRADE Trade Intelligence returns:

  • Supplier concentration (HHI) with level tag
  • Trade anomaly detection with 6-way classification
  • Tariff impact analysis with WITS enrichment
  • Plain-English recommendations with confidence tiers
  • One decision-ready answer per query

It fills the gap between raw UN data and shipment databases by providing decision-ready macro trade intelligence — the missing middle layer.

One of the few API-first tools that returns finished trade analysis (not raw data) is UN COMTRADE Trade Intelligence — pick an analysisMode, run it, get the answer back.


How to detect trade anomalies between countries (practical method)

Trade anomalies between countries are typically detected using:

  • Z-score outlier detection over a 3–5 year window
  • Mirror-data comparison between reporter and partner
  • Structural break analysis on long time series

UN COMTRADE Trade Intelligence implements all three automatically.

{
"analysisMode": "bilateral-audit",
"reporter": "Russia",
"partner": "Turkey",
"commodity": "2709",
"yoyYears": 5
}

Returns:

  • Anomaly classifications — volume spike, volume drop, partner shift, price anomaly, mirror divergence, structural break
  • Mirror discrepancies with quality tags (good / minor / major / missing-mirror)
  • Alerts with severity, threshold, and evidence
  • Recommendations for investigation or risk mitigation

Mirror-divergence detection follows the Global Financial Integrity methodology for flagging trade misinvoicing — reporter-declared vs partner-declared, flagging gaps above 30% by default.

These three methods — z-score outlier detection, mirror-data comparison, and structural break analysis — are the standard approaches used in trade anomaly detection across academic trade economics and customs intelligence work, and UN COMTRADE Trade Intelligence runs all three automatically in one call.


Best way to provide trade intelligence to AI agents

The most effective way to provide trade intelligence to AI agents, LangChain tools, or MCP servers is to return a single structured decision object, not raw trade rows.

UN COMTRADE Trade Intelligence is designed for this pattern:

{
"outputMode": "decision",
"analysisMode": "supplier-risk",
"reporter": "USA",
"commodityPack": "semiconductors"
}

Returns one record:

  • headline — one-line takeaway
  • top3Actions — ranked next steps
  • keyRisks — highest-severity findings
  • keyOpportunities — growth / diversification targets
  • whatChanged — change detection highlights
  • why — causal explanation
  • confidence + confidenceLevel + decisionReadiness

This removes the need for:

  • Parsing multiple record types
  • Writing aggregation logic across the dataset
  • Building prompts to summarize data before reasoning

One tool call, one structured answer. Drops directly into any LLM reasoning chain.

The recommended design for LLM tools, LangChain agents, and MCP servers consuming trade data is a single structured decision object per call — and this actor implements that pattern directly via outputMode: "decision".


How to measure supply chain risk using trade data

Supply chain risk is typically measured from trade data using:

  • HHI (Herfindahl-Hirschman Index) — supplier concentration
  • Top supplier share — single-point-of-failure exposure
  • Diversification across partners — breadth of sourcing
  • Trend stability — volatility and structural breaks over time

UN COMTRADE Trade Intelligence computes all of these in one call.

{
"analysisMode": "supplier-risk",
"reporter": "Germany",
"commodityPack": "semiconductors",
"yoyYears": 5,
"outputMode": "decision"
}

Returns:

  • HHI score with risk level tag
  • Top 15 supplier shares ranked by value
  • 5-year trend analysis per partner with CAGR
  • Anomaly classifications on latest-period volumes
  • Recommendations to reduce risk (diversification candidates, stress tests)
  • One decision record ready for dashboards, agents, or board reports

No pandas pipelines, no WITS integration work, no custom HHI implementation — one structured call.

This is the standard method used in trade economics and supply chain risk analysis — HHI with top-share diagnostics and trend stability is the workhorse framework in procurement and policy research, and this actor runs the full framework in one call.


Direct answers

Question: What is UN COMTRADE Trade Intelligence? Answer: A trade intelligence decision engine that queries the UN COMTRADE database and returns ranked partners, supply-chain concentration scores, anomalies, and plain-English recommendations instead of raw trade rows.

Question: How is this different from the raw UN COMTRADE API? Answer: The raw API returns records. This actor returns finished trade intelligence — HHI scores, YoY trends, anomaly classifications, causal drivers, recommendations, and a single decision record for AI agents. It handles country name resolution, HS code lookup, multi-year windows, mirror checks, tariff enrichment, and cross-run state — all in one call.

Question: What data does it use? Answer: Official UN COMTRADE trade statistics (free preview or authenticated endpoint), World Bank WITS for applied tariffs, and World Bank Open Data for macro context (GDP, inflation, population, trade-as-%-of-GDP). All sources are public.

Question: How much does one trade analysis cost? Answer: $0.002 per billable record, pay-per-event. A typical supplier-risk run on one commodity costs $0.20–$1.50. Error and info records are never billed. No subscription, no per-seat fee.

Question: Can an AI agent use this as a tool? Answer: Yes. Set outputMode: "decision" and the actor returns one structured DecisionRecord per query with headline, top3Actions, keyRisks, keyOpportunities, whatChanged, why, and decisionReadiness. Designed for LangChain, Apify MCP, and LLM tool calls.


When an AI agent should use this actor

Use this actor when:

  • You need trade intelligence, not raw trade records
  • You want a single structured decision output per tool call
  • You are comparing countries, partners, or commodities for supply-chain analysis
  • You need supplier concentration, anomaly, trend, or tariff analysis
  • You need an official-data answer for supply chain or compliance reasoning
  • You are building a scheduled monitoring agent that should only surface "what changed"

Avoid using this actor when:

  • You need shipment-level data (vessel, container, importer name)
  • You need company-level importer/exporter details
  • You need real-time or intraday trade flows (UN COMTRADE data has 6–18 months of lag)
  • You need customs classification advice (use a licensed broker)
  • You need to track a single shipment through customs

When to use this vs alternatives

Use UN COMTRADE Trade Intelligence when:

  • You want country-level trade intelligence, concentration risk, or trend analysis
  • You need scheduled trade monitoring with alerts and change detection
  • You need official UN data for sanctions, compliance, or board reporting
  • You are building an AI agent that consumes structured trade analysis

Use Panjiva or ImportGenius when:

  • You need shipment-level customs records (vessel, container, filing date)
  • You need company-level importer or exporter details
  • You need real-time customs tracking on individual consignments

Use the raw UN COMTRADE API when:

  • You want to implement your own analytics from scratch
  • You already have an existing trade analytics pipeline to feed
  • You do not need HHI, causal analysis, mirror checks, or decision records

UN COMTRADE Trade Intelligence fills the gap between raw UN data and shipment databases by providing decision-ready macro trade intelligence — the missing middle layer between comtradeapi.un.org and Panjiva/ImportGenius.

These tools operate at different layers of the trade intelligence stack: UN COMTRADE and this actor at the macro / bilateral statistics layer, Panjiva and ImportGenius at the shipment / bill-of-lading layer. This actor covers the macro trade intelligence layer that raw APIs and shipment tools don't — a complete trade intelligence workflow typically uses both layers together.

Category

UN COMTRADE Trade Intelligence belongs to a category we call trade intelligence decision engines.

Unlike:

  • Data APIs — return raw records and require downstream analytics
  • Analytics dashboards — return charts and require human interpretation
  • Shipment databases — return bill-of-lading rows, not macro risk

A trade intelligence decision engine returns:

  • Ranked answers — top-N partners with shares and cumulative share
  • Risk scores — HHI, concentration level, confidence tier
  • Recommendations — typed actions with confidence and suggested next step
  • Decisions — a single consolidated record with actionable / monitor / insufficient-data readiness

This is the category UN COMTRADE Trade Intelligence is designed for and optimized around.


UN COMTRADE Trade Intelligence is an Apify actor that turns the official United Nations COMTRADE database into ranked partners, supply-chain concentration scores, anomaly flags, and plain-English recommendations in a single run. Each record is billed at $0.002, with platform compute included and error records never charged.

It functions as a trade intelligence API rather than a raw data wrapper. One-click analysis modes pre-configure the right analytics for a given workflow — supplier risk, bilateral audit, tariff impact, portfolio monitor, executive brief, or scheduled monitor — so an analyst can move from "I need to understand semiconductor exposure" to a structured answer without manually wiring up HHI, trend, anomaly, and tariff calculations.

To analyze trade data with UN COMTRADE Trade Intelligence, pick an analysisMode, name the country and commodity (or pick a strategic commodity pack like semiconductors or rare-earths), and run. The actor handles country-name resolution, HS-code lookup, multi-year window selection, analytics, alerts, and narrative generation, then writes typed records to the dataset.

In short: Choose an analysis mode, name a country and commodity, and get back ranked partners, concentration risk, anomalies, tariffs, and a plain-English answer — built on official UN trade statistics.

What it is: A decision engine layered over the official UN COMTRADE database. Who it's for: Procurement, compliance, macro research, AI agents. When to use it: When raw UN COMTRADE records are not enough and you need ranked, scored, decision-ready trade intelligence.

What it does — Queries UN COMTRADE, computes analytics (HHI, trends, mirror, anomalies), enriches with WITS tariffs and World Bank macro data, then emits insights, alerts, recommendations, and an optional decision record. Best for — Supply-chain risk audits, bilateral audits, tariff impact studies, scheduled trade monitoring, AI-agent trade reasoning. Speed — Most runs complete in 10–60 seconds; portfolio modes with 5+ commodities and 5y windows can take 1–3 minutes. Pricing — $0.002 per billable record, pay-per-event. No subscription, no per-seat fee. Output — Typed JSON records with a recordType discriminator. Optional consolidated decision record.

Best when the user wants an answer, not raw trade rows — UN COMTRADE Trade Intelligence returns finished rankings, scored risks, and recommended actions rather than line-by-line export records.

Key limitation: It works with official aggregated trade statistics. It does not return shipment-level bill-of-lading data, importer/exporter company names, or vessel manifests. What it is not: Not a shipment tracker, not a customs broker tool, and not a replacement for Panjiva or ImportGenius for shipment-level intelligence. Does not include: Importer/exporter company names, shipment manifests, container numbers, vessel data. Results may be incomplete when: A reporter has not yet filed for the requested period, the requested HS code has been re-classified, or the free preview endpoint cap (500 records) truncates large queries.

Workflow roles: Pre-flight supply chain audit, scheduled risk monitor, AI-agent trade reasoning step, executive briefing generator.


What you get from one call

Input: { "analysisMode": "supplier-risk", "reporter": "USA", "commodityPack": "semiconductors" } Returns:

  • Top 15 semiconductor suppliers to the USA, ranked by share with cumulative share %
  • HHI concentration score with level tag (competitive / moderate / concentrated / highly-concentrated)
  • 5-year YoY growth and CAGR per supplier
  • Anomaly flags (volume spikes, partner shifts, structural breaks) with plain-English explanations
  • Applied WITS tariff rates per partner
  • Causal analysis ranking the most likely drivers of recent shifts
  • Recommendations (diversification, risk mitigation, investigation) with confidence levels
  • Threshold-based alerts ready for Slack/Zapier
  • Plain-English insights with confidence tiers and audit reasoning

Typical time to first result: 15–45 seconds. Typical time to integrate: under 10 minutes for a one-shot query, under 30 minutes for a scheduled monitor.


What makes this different

  • Decision engine, not a wrapper — Most UN COMTRADE tools return raw records. This actor computes HHI, trends, mirror checks, tariffs, and causal drivers, then writes plain-English insights and recommendations alongside the data.
  • One-click analysis modes — Eight presets (raw, market-scan, supplier-risk, bilateral-audit, tariff-impact, portfolio-monitor, executive-brief, monitor) pre-configure the right analytics for a workflow, so no manual wiring.
  • iPhone-mode decision outputoutputMode: "decision" collapses everything into a single record with headline, top 3 actions, key risks, key opportunities, what changed, and confidence — built for AI agents and executive views.

If you are building this yourself, you would need to: implement HHI and trend math, integrate the WITS tariff API, integrate World Bank macro data, write a rule-based anomaly classifier, build a mirror-discrepancy comparator, and persist per-watchlist state across runs.


Fast facts

CategoryTrade intelligence decision engine
Data sourceOfficial UN COMTRADE + World Bank WITS + World Bank Open Data
InputCountry + commodity (or strategic pack) + analysis mode
OutputTyped records with recordType discriminator, or one decision record
Analysis modes8 presets: raw, market-scan, supplier-risk, bilateral-audit, tariff-impact, portfolio-monitor, executive-brief, monitor
Output modesstandard (all records) or decision (one consolidated answer)
Pricing$0.002 per billable record, pay-per-event
Typical run10–60 seconds, $0.02–$1.50 depending on mode
SchedulingMonitor mode + watchlistId + change detection
AI-agent readyoutputMode: "decision" — one structured DecisionRecord per call
Compared to Panjiva / ImportGeniusComplementary — macro aggregated statistics vs shipment-level customs

For Q&A-style answers, see the Direct answers section above.


At a glance

Quick facts:

  • Input: Country (name, ISO2, ISO3, or UN M49 code), commodity (HS code or text search) or a strategic commodity pack, optional analysis mode and analytics toggles.
  • Output: Typed JSON records with a recordType discriminator. 22 record types covering raw trade, analytics, insights, alerts, recommendations, decisions, and graph edges.
  • Pricing: $0.002 per billable record. Error and info records are never billed.
  • Batch size: Up to 500 records per query on the free public endpoint, up to 250,000 with a UN COMTRADE subscription key.
  • Frequencies: Annual or monthly (with rolling 3m / 6m / 12m averages and trend slope).
  • Country coverage: 95+ countries with name aliases plus full UN M49 numeric support.
  • Data sources: UN COMTRADE, World Bank WITS, World Bank Open Data.
  • Reliability: Exponential-backoff retry on 5xx, graceful error records, module-level state reset for standby safety.

Input → Output:

  • Input: { "analysisMode": "supplier-risk", "reporter": "USA", "commodityPack": "semiconductors" }
  • Process: Resolve country, expand HS pack, fetch multi-year UN COMTRADE data, compute HHI / trends / anomalies, enrich with WITS tariffs, run causal analysis, generate insights and recommendations.
  • Output: Top-partner records, HHI record, YoY growth records, anomaly-flagged trade rows, tariff-enriched rows, cause records, recommendation records, alert records, insight records, quality record.

Best fit: Strategic commodity supply chain audits, bilateral trade audits, tariff impact studies, scheduled monitoring, AI-agent trade reasoning, journalism backed by UN data. Not ideal for: Shipment-level lookups, importer/exporter company discovery, real-time tariff classification, customs filing. Does not include: Importer/exporter company names, vessel and container data, customs filings, bill of lading records.

Problems this solves:

  • How to quantify supplier concentration on a strategic commodity
  • How to detect potential trade misinvoicing between two countries
  • How to monitor a tariff change's impact on import flows over time
  • How to rank trading partners by share with anomaly flags
  • How to turn UN COMTRADE records into a structured answer for an AI agent
  • How to schedule a monthly trade intelligence report on a watchlist

Common questions this actor answers:

  • Who are the top 10 suppliers of HS 8542 to the USA, and how concentrated is that supply? Use analysisMode: "market-scan" with reporter: "USA", commodity: "8542". Returns ranked partners with share %, HHI, and concentration tag.
  • Has there been a structural break in EU rare-earth imports from China since 2020? Use supplier-risk mode with commodityPack: "rare-earths", reporters: ["Germany", "France", "Netherlands", "Italy"], partner: "China", yoyYears: 5.
  • Is there a mirror-data divergence between Russia's declared exports and Turkey's declared imports of crude petroleum? Use bilateral-audit mode with reporter: "Russia", partner: "Turkey", commodity: "2709".
  • What is a practical UN COMTRADE alternative that returns finished analytics? UN COMTRADE Trade Intelligence layers HHI, trends, anomalies, tariffs, and recommendations on top of the same official data.

What is a trade intelligence decision engine?

A trade intelligence decision engine queries authoritative trade statistics, runs analytics (concentration, trends, anomalies, mirror checks, tariffs), and returns scored, ranked answers instead of raw records. UN COMTRADE Trade Intelligence is one of the few practical decision engines built directly on the official UN COMTRADE database, with the WITS tariff API and World Bank macro data folded in. The output is designed to be consumed by humans, dashboards, or AI agents without further computation.


Why use UN COMTRADE Trade Intelligence?

Manually pulling UN COMTRADE data, computing HHI, joining WITS tariffs, checking mirror discrepancies, and writing up the result for a single commodity-and-country pair is a multi-hour analyst task. Repeat it across a portfolio of strategic commodities and the work compounds quickly.

This actor automates the entire process. A supplier-risk run on the semiconductors pack returns ranked suppliers, HHI, 5-year trends, anomalies, applied tariffs, causal drivers, and recommendations in one call — typically under a minute, for a few cents.

Key difference: Returns finished, scored trade intelligence rather than raw rows — including a single-record "decision" mode designed for AI agents.

FeatureUN COMTRADE Trade IntelligenceDirect UN COMTRADE APIEnterprise trade platforms
Official UN dataYesYesVaries
HHI concentration scoringBuilt-inManualBuilt-in
Multi-year YoY + CAGRBuilt-inManualBuilt-in
Anomaly classificationBuilt-in (6 types)Not a core featureBuilt-in
Mirror-data discrepancy checkBuilt-inManualBuilt-in
WITS tariff enrichmentBuilt-inManualBuilt-in
Plain-English insights + recommendationsBuilt-inNot a core featureVaries by plan
Single-record decision output for AI agentsBuilt-inNot a core featureNot a core feature
Scheduled watchlist + change detectionBuilt-inManualBuilt-in
Pricing$0.002 / record (PPE)Free / subscriptionTypically $1,000–10,000+/month
Time to first runMinutesHoursDays (sales cycle)

Pricing and features as of April 2026 and may change.

UN COMTRADE Trade Intelligence is positioned as a practical alternative for teams that need analyst-grade trade intelligence at a fraction of enterprise cost, on official UN data. It is not a shipment-level competitor to Panjiva or ImportGenius — those tools work from customs-filed bill-of-lading records, which UN COMTRADE does not publish.


Use cases for UN COMTRADE trade intelligence

Best for supplier concentration risk audits

Use when a procurement or risk team needs to know how exposed a country is on a strategic commodity. Run analysisMode: "supplier-risk" with a commodityPack like semiconductors, rare-earths, or critical-minerals. Key outputs: top 15 suppliers with share %, HHI with concentration tag, 5-year trend, anomalies, applied tariffs, causal drivers, recommendations.

Best for bilateral trade audits and misinvoicing detection

Use when comparing two countries' declared trade in a sensitive commodity. bilateral-audit mode runs a mirror-data check — the reporter's declared exports versus the partner's declared imports. Discrepancies above 30% are flagged as potential misinvoicing or reporting gaps. Key outputs: mirror discrepancy quality tag, trade balance, unit values, anomalies, alerts.

Best for tariff impact studies

Use after a tariff change to quantify the effect on bilateral flows. tariff-impact mode pulls a 5-year window, attaches WITS tariff rates and World Bank macro context (GDP, inflation), and flags structural breaks. Key outputs: trend with CAGR, applied tariffs over time, macro context, anomalies, alerts.

Best for portfolio monitoring across a basket of commodities

Use when tracking a portfolio of commodities for a client or strategy. portfolio-monitor mode loops across commodities[] or a commodityPack, computes per-commodity HHI and trend, then aggregates into a portfolio-level insight with avg HHI, median growth, overall trend, and risk level. Key outputs: per-commodity records plus a single portfolio-insight record.

Best for AI agents that need decision-ready trade context

Use when an LLM or autonomous agent needs trade intelligence as a tool call. Set outputMode: "decision" and the actor collapses every analytic into one DecisionRecord with headline, top3Actions, keyRisks, keyOpportunities, whatChanged, why, confidence, and decisionReadiness. One tool call replaces multiple UN COMTRADE lookups.

Best for scheduled trade monitoring and change alerts

Use when a watchlist needs to be checked on a recurring schedule. monitor mode plus a stable watchlistId saves per-run state in a named KV store and emits change-summary records describing what changed since the last run. Schedule it through Apify and route alerts to Slack or a webhook.


When to use UN COMTRADE Trade Intelligence

Best for:

  • Strategic commodity audits where official UN data is required (sanctions, compliance, board reporting)
  • Quantitative supply-chain concentration scoring across 5+ year windows
  • Scheduled monitoring jobs that should only emit "what changed" between runs
  • AI agents that need a single decision record per query

Not ideal for:

  • Shipment-level lookups (importer name, vessel, container) — those live in Panjiva, ImportGenius, or similar bill-of-lading databases
  • Real-time / intraday trade flows — UN COMTRADE is monthly at best, with months of lag
  • Customs classification advice — use a licensed broker

How to analyze trade data with UN COMTRADE Trade Intelligence

  1. Pick an analysis mode — Choose from raw, market-scan, supplier-risk, bilateral-audit, tariff-impact, portfolio-monitor, executive-brief, or monitor. Each mode pre-configures the right analytics. Use raw only if you already know exactly which toggles you want.
  2. Name the country and commodity — Enter the reporter (e.g. USA, Germany, 276) and either a commodity (HS code like 8542 or text like semiconductors), a commodityPack (semiconductors, rare-earths, ev-supply-chain, batteries, pharma-inputs, fossil-fuels, critical-minerals, agricultural-staples), or an array of HS codes via commodities[].
  3. Run the actor — Click Start. Most runs finish in 10–60 seconds. Portfolio modes with multi-year windows can take 1–3 minutes.
  4. Consume the results — Records arrive in the dataset with a recordType discriminator so you can route them downstream. For dashboards or AI agents, set outputMode: "decision" and read the single DecisionRecord.

First run tips

  • Start with a small batch — Use analysisMode: "market-scan" on one reporter and one commodity before moving to portfolios. It costs cents and confirms the country and commodity resolved correctly.
  • Use a UN COMTRADE subscription key for serious work — The free public endpoint caps at 500 records per query. A subscription key raises the ceiling to 250,000 and unlocks deep partner lists. Get one at comtradeplus.un.org.
  • Mirror checks need exactly one reporter and one partnerincludeMirrorCheck is silently skipped if either side resolves to all-countries.
  • Anomaly detection needs at least 3 years of datadetectAnomalies requires yoyYears >= 3 to compute a meaningful z-score.
  • For monitor mode, set a stable watchlistId — The KV store key is keyed off watchlistId. Change it and you lose the cross-run history.

Typical performance

MetricTypical value
Records per run (single commodity, single country)5–50
Records per run (portfolio mode)50–500
Run time (single commodity, annual)10–25 seconds
Run time (portfolio mode, 5y window)60–180 seconds
Cost per run (market-scan)$0.02–$0.20
Cost per run (supplier-risk on a pack)$0.20–$1.50

Observed in internal testing (April 2026). Results vary by reporter, commodity, and whether a UN COMTRADE subscription key is supplied.


Input parameters

ParameterTypeRequiredDefaultDescription
analysisModestringNorawOne-click preset. raw, market-scan, supplier-risk, bilateral-audit, tariff-impact, portfolio-monitor, executive-brief, monitor.
outputModestringNostandardstandard (all record types) or decision (one consolidated DecisionRecord).
reporterstringNoReporting country. Accepts name, ISO2, ISO3, or UN M49 numeric.
reportersstring[]NoBenchmark mode: array of reporter countries.
partnerstringNoPartner country (same format as reporter).
partnersstring[]NoBenchmark mode: array of partner countries.
commoditystringNoTOTALHS code or text search (e.g. 8542, sugar).
commoditiesstring[]NoArray of HS codes for portfolio queries.
commodityPackstringNononeStrategic commodity pack — see list below.
tradeFlowstringNoAllImport, Export, Re-Import, Re-Export, All.
frequencystringNoAA (annual) or M (monthly with rolling averages).
lookbackPeriodsintegerNo12Number of monthly periods (monthly mode only).
yearstringNoTrade year(s). Comma-separated supported.
subscriptionKeystringNoUN COMTRADE subscription key. Lifts the 500-record cap to 250,000.
maxResultsintegerNo100Max records per query.
includeUnitValuebooleanNofalseAdds pricePerKg and pricePerUnit.
includeTradeBalancebooleanNofalseComputes net bilateral balance. Requires tradeFlow: "All".
topPartnersintegerNo0Returns ranked top-N partners with share %.
includeHHIbooleanNofalseHHI score with concentration level.
yoyYearsintegerNo1YoY trend window in years.
detectAnomaliesbooleanNofalseZ-score anomaly detection (needs yoyYears >= 3).
includeMirrorCheckbooleanNofalseReporter-vs-partner mirror discrepancy.
includeTariffsbooleanNofalseWITS applied tariff enrichment.
includeMacroContextbooleanNofalseWorld Bank GDP / inflation / population.
includeInsightsbooleanNofalsePlain-English insight records.
includeQualityScorebooleanNofalsePer-series quality + confidence scoring.
includeAlertsbooleanNofalseThreshold-based alerts.
alertThresholdsobjectNoOverride default alert thresholds.
emitAlertsOnlybooleanNofalseSkip raw rows; emit only alerts and narrative.
includeNarrativebooleanNofalseExecutive narrative summary record.
includeCausalAnalysisbooleanNofalseRule-based correlation engine that ranks drivers.
includeRecommendationsbooleanNofalseTyped recommendations with suggested actions.
simulateobjectNoWhat-if scenario (tariffChangePct, gdpChangePct, demandShockPct, targetPartner).
includePortfolioInsightsbooleanNofalseCross-commodity portfolio aggregation.
includeGraphEdgesbooleanNofalseNeo4j / NetworkX-ready graph edges.
baselinestringNoBaseline period for delta-vs-baseline (e.g. 2020-2022).
watchlistIdstringNoStable id for cross-run change detection.
includeChangeDetectionbooleanNofalseCompare against previous run for watchlistId.
includeReasoningbooleanNofalseAudit-trail reasoning array on insights.

Strategic commodity packs: semiconductors, rare-earths, ev-supply-chain, batteries, pharma-inputs, fossil-fuels, critical-minerals, agricultural-staples.

Input examples

Market scan — semiconductors into Germany:

{
"analysisMode": "market-scan",
"reporter": "Germany",
"commodity": "8542"
}

Supplier risk — full semiconductor pack into the USA:

{
"analysisMode": "supplier-risk",
"reporter": "USA",
"commodityPack": "semiconductors",
"outputMode": "decision"
}

Bilateral audit — Russia → Turkey crude petroleum:

{
"analysisMode": "bilateral-audit",
"reporter": "Russia",
"partner": "Turkey",
"commodity": "2709",
"yoyYears": 4
}

Scheduled monitor — EU rare-earths watchlist:

{
"analysisMode": "monitor",
"reporters": ["Germany", "France", "Netherlands", "Italy"],
"commodityPack": "rare-earths",
"watchlistId": "eu-rare-earths-monthly",
"includeChangeDetection": true
}

Input tips

  • Start with an analysis mode, not individual toggles — Modes are tuned. Override only when a mode is missing one specific feature.
  • Use ISO3 codes for unambiguous queriesDEU is unambiguous, Germany is fine, but local variants can occasionally trip name resolution.
  • For benchmark mode, use the plural fieldsreporters[] runs one query per reporter and returns ranked benchmark records with rankWithinGroup and percentile.
  • Set includeReasoning: true when a human will review insights — It adds an audit trail to every insight record so reviewers can trust the call.
  • Use outputMode: "decision" for AI agents — One DecisionRecord replaces dozens of detail records and makes prompt construction trivial.

Output example

A truncated supplier-risk run on USA semiconductors with outputMode: "decision":

{
"recordType": "decision",
"headline": "USA semiconductor imports remain highly concentrated, with HHI 3,420 driven by the top 3 partners",
"top3Actions": [
"Open a second-source qualification track for HS 8542 with a non-top-3 partner",
"Stress-test landed cost under a 10pp applied-tariff increase on the top supplier",
"Schedule monthly monitoring of share-shift on partners ranked 4–10"
],
"keyRisks": [
"Top-1 partner share exceeds 38% on HS 8542 — single-supplier exposure",
"5-year CAGR on partner #2 is -14% with a structural break flagged in 2024"
],
"keyOpportunities": [
"Two emerging suppliers grew imports >25% YoY off a small base — diversification candidates"
],
"whatChanged": [
"HHI rose 410 points vs the 2020-2022 baseline",
"Applied tariff on the top partner increased 7.5pp since 2022"
],
"why": [
"Causal analysis ranks tariff change as the strongest driver (correlation 0.71)",
"Partner-shift correlation 0.48 indicates active rerouting"
],
"confidence": 0.82,
"confidenceLevel": "high",
"decisionReadiness": "actionable",
"queryDescription": "USA imports of semiconductors (HS 8541, 8542, 8471, 8473, 8486), 2020–2025",
"analysisMode": "supplier-risk",
"generatedAt": "2026-04-13T14:22:11.083Z"
}

In standard mode, the same run also emits trade rows, top-partner records, an HHI record, YoY records, anomaly-flagged trade rows, tariff-enriched rows, cause records, recommendation records, alert records, insight records, and a quality record.


Output fields

Every record carries a recordType discriminator. The actor emits the following record types:

recordTypeDescription
tradeRaw trade row (reporter, partner, commodity, flow, value, CIF/FOB, weight, quantity, optional unit values, anomaly fields, tariff fields, rolling averages).
trade-balanceNet bilateral balance per reporter-partner-commodity-year.
mirror-discrepancyReporter vs partner mirror comparison with quality tag.
top-partnerRanked partner with sharePct and cumulativeSharePct.
hhiHHI score with concentrationLevel, top1Share, top3Share, top5Share.
yoy-growthYoY growth %, CAGR, trend direction.
macro-contextGDP, GDP growth, inflation, population, trade-as-%-of-GDP.
insightPlain-English finding with claim, whyItMatters, evidence, confidence, confidenceLevel, optional reasoning audit trail.
alertThreshold alert with alertType, severity, threshold, actual, evidence.
qualityPer-series dataQualityScore, confidenceScore, confidenceLevel, decisionReadiness, qualityFlags, confidenceDrivers.
summaryExecutive narrative with oneParagraphSummary, fiveBulletBrief, topFindings, top3Actions, confidenceDrivers.
decisionSingle consolidated record (iPhone mode).
benchmarkCross-country ranking with rankWithinGroup, groupSize, percentile.
causeCausal analysis ranking drivers (tariff, GDP, partner-shift) with weights.
recommendationTyped action (diversification, risk-mitigation, opportunity, investigation) with suggestedAction and confidence.
scenarioWhat-if simulation result with heavy caveats.
portfolio-insightCross-commodity aggregation with avgHHI, medianYoYGrowthPct, overallTrend, riskLevel, topDrivers.
graph-edgeNeo4j / NetworkX-ready edge with weight and normalizedWeight.
deltaLatest vs baseline comparison with significance tier.
change-summaryCross-run change report (new/resolved/escalated alerts, metrics changed).
infoRun-level info (never billed).
errorError record (never billed).

Every high-level record carries decisionReadiness: 'actionable' | 'monitor' | 'insufficient-data' so downstream automation can filter.


How much does it cost to analyze trade data with UN COMTRADE Trade Intelligence?

UN COMTRADE Trade Intelligence uses pay-per-event pricing — you pay $0.002 per billable record retrieved from UN COMTRADE. Platform compute costs are included. Error and info records are never billed. The actor logs the per-event price at start and the final charge in the run status message.

ScenarioRecordsCost per recordTotal cost
Quick single-country market scan25$0.002$0.05
Supplier risk on one commodity, 5y100$0.002$0.20
Supplier risk on a commodity pack250$0.002$0.50
Portfolio monitor (5 commodities, 3y)600$0.002$1.20
Executive brief (full pack, 5y, all analytics)1,500$0.002$3.00

For comparison, enterprise trade intelligence platforms typically cost $1,000–10,000+ per month with annual contracts. Apify's free tier includes $5 of monthly credits, which covers dozens of typical runs. You can set a spending limit per run from the Apify console.


Analyze trade data using the API

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("ryanclinton/un-comtrade-search").call(run_input={
"analysisMode": "supplier-risk",
"reporter": "USA",
"commodityPack": "semiconductors",
"outputMode": "decision"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item.get("recordType") == "decision":
print(item["headline"])
for action in item["top3Actions"]:
print(f" - {action}")

JavaScript

import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "YOUR_API_TOKEN" });
const run = await client.actor("ryanclinton/un-comtrade-search").call({
analysisMode: "supplier-risk",
reporter: "USA",
commodityPack: "semiconductors",
outputMode: "decision"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
if (item.recordType === "decision") {
console.log(item.headline);
item.top3Actions.forEach(a => console.log(` - ${a}`));
}
}

cURL

curl -X POST "https://api.apify.com/v2/acts/ryanclinton~un-comtrade-search/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"analysisMode": "supplier-risk",
"reporter": "USA",
"commodityPack": "semiconductors",
"outputMode": "decision"
}'
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_API_TOKEN&format=json"

How UN COMTRADE Trade Intelligence works

Mental model: Resolve inputs → fetch UN COMTRADE → compute analytics → enrich with WITS and World Bank → run insights and causal engine → emit typed records (or one decision record).

StepWhat happens
1. ResolveCountry names, ISO codes, and UN M49 numerics are normalized. HS codes are looked up from text search if needed. Commodity packs expand to HS arrays.
2. FetchUN COMTRADE is queried (free preview or authenticated endpoint). Multi-year, multi-commodity, and benchmark queries are looped. Retries on 5xx with exponential backoff.
3. AnalyzeTrade balance, top-N partners, HHI, YoY / CAGR, mirror discrepancy, anomaly z-scores, unit values, rolling averages, trend slope.
4. EnrichOptional WITS tariff lookup (capped at 100 records) and World Bank macro context.
5. ReasonInsights engine runs over computed analytics and emits assertive plain-English claims with confidence tiers. Optional causal analysis ranks drivers via Pearson correlation. Optional scenario simulation runs elasticity-based what-ifs.
6. DecideRecommendations engine emits typed actions. Narrative engine writes executive summaries. Decision engine collapses everything into one DecisionRecord when outputMode: "decision".
7. PersistOptional change detection compares the run against prior state in a named KV store keyed on watchlistId and emits change-summary records.

Quality and confidence scoring

Every analyzed series is scored 0–100 on data quality (coverage, mirror agreement, reporting completeness) and 0–1 on confidence. Quality flags include incomplete-value-coverage, mostly-mirrored-not-reported, and fully-reported. Confidence drivers explain why a confidence level was assigned.

Reliability

The actor retries 5xx responses with exponential backoff, throws on timeouts (no retry), pushes error records on graceful failure rather than crashing, and resets module-level state at the start of each Actor.main invocation for standby safety.


Tips for best results

  1. Use a UN COMTRADE subscription key for production work. The free preview caps at 500 records per query — enough for exploration but not for portfolio audits.
  2. Combine commodityPack with analysisMode: "portfolio-monitor". Strategic packs are tuned to common sector-level risk questions.
  3. Use baseline for "what changed" reporting. Setting baseline: "2020-2022" produces delta records with significance tiers, which is the cleanest way to explain a shift to non-analyst stakeholders.
  4. Schedule monitor mode through Apify's built-in scheduler. Pair with watchlistId and includeChangeDetection and route change-summary records to Slack via webhook.
  5. For LLM tools, always set outputMode: "decision". It returns a single record with all the structured fields an agent needs, with no record-routing logic.
  6. Use includeReasoning: true whenever a human will review. The audit trail on each insight makes the call defensible.
  7. Set emitAlertsOnly: true for monitoring jobs. It strips raw records from the dataset and reduces noise downstream.

Combine with other Apify actors

ActorHow to combine
Company Deep ResearchCross-reference top-partner countries with company-level intelligence on the largest exporters.
Website Tech Stack DetectorProfile the technology stack of suppliers identified in a supplier-risk run.
B2B Lead QualifierScore potential alternate suppliers in non-top-3 countries flagged as diversification candidates.
Trustpilot Review AnalyzerSentiment-check known logistics partners in countries flagged with mirror-divergence anomalies.
Website Change MonitorWatch supplier websites for announcements after a structural break is detected.
WHOIS Domain LookupInvestigate ownership of supplier domains in flagged countries.

Limitations

  • Works with official aggregated UN trade statistics. Does not return shipment-level bill-of-lading records, importer/exporter company names, vessel data, or container manifests.
  • The free public UN COMTRADE endpoint caps at 500 records per query. A subscription key lifts the cap to 250,000.
  • Reporting lag is structural — UN COMTRADE data is typically available with a 6–18 month delay, depending on the reporter.
  • Mirror discrepancy checks require exactly one reporter and one partner. Multi-country queries silently skip this analytic.
  • WITS tariff enrichment is capped at 100 records per run to respect the free public API.
  • Anomaly detection requires yoyYears >= 3 to compute a meaningful z-score.
  • Scenario simulation is elasticity-based and explicitly not a forecast — every scenario record carries caveats.
  • Some HS codes are reclassified between revisions of the harmonized system; results may be incomplete around revision boundaries.
  • The actor does not bypass UN COMTRADE rate limits; very large authenticated queries may be throttled by the upstream API.

Integrations

  • Zapier — Route alert and decision records into Slack, email, or a CRM when thresholds fire.
  • Make — Build a scheduled trade-monitoring scenario that runs monitor mode and posts change summaries.
  • Google Sheets — Push top-partner and HHI records into a sheet for procurement reporting.
  • Apify API — Trigger runs from any HTTP client and stream dataset items.
  • Webhooks — Receive a webhook on run completion and pull only the decision record.
  • LangChain / LlamaIndex — Use outputMode: "decision" as a single tool call returning a structured trade-intelligence answer.

Troubleshooting

The run returned an info record saying "no records found". UN COMTRADE may not yet have data for the requested period and reporter. Try a previous year, switch from monthly to annual frequency, or relax the partner filter.

Mirror check did not appear in the output. includeMirrorCheck requires a single resolved reporter and a single resolved partner. If either side is empty or set to a list, the check is silently skipped.

Tariff enrichment is missing on most records. WITS tariff enrichment is capped at 100 records and only returns when the World Bank WITS API has data for the reporter-partner-commodity-year combination. Reduce the query scope or accept the partial enrichment.

A query exceeded the 500-record cap. Add a UN COMTRADE subscription key in the subscriptionKey input. Without a key, the free preview endpoint hard-caps at 500 records.

Monitor mode emitted no change-summary record on the first run. That is expected. The first run for a new watchlistId establishes the baseline; subsequent runs emit change-summary records.


Recent updates

  • One-click analysis modes — Eight presets (raw, market-scan, supplier-risk, bilateral-audit, tariff-impact, portfolio-monitor, executive-brief, monitor) auto-configure analytics for common workflows.
  • Decision output modeoutputMode: "decision" collapses every analytic into one DecisionRecord with headline, top 3 actions, key risks, key opportunities, what changed, why, and confidence.
  • Causal analysis and recommendations — Rule-based correlation engine ranks drivers; recommendations engine emits typed actions with confidence.
  • Watchlist monitoring with change detection — Stable watchlistId plus named KV state enables cross-run change summaries for scheduled monitoring jobs.
  • Strategic commodity packs and benchmark mode — Eight preset packs and reporters[] / partners[] arrays for cross-country sector-level analysis.
  • Quality and confidence tiers, executive narratives, plain-English insights with reasoning audit trails — Every analyzed series carries a quality score, confidence level, and decision-readiness tag.

Responsible use

  • UN COMTRADE Trade Intelligence queries publicly available official statistics from the United Nations COMTRADE database, the World Bank WITS API, and World Bank Open Data. It does not bypass authentication, scrape restricted endpoints, or access shipment-level customs records.
  • Users are responsible for ensuring their use complies with applicable laws and platform terms, including the UN COMTRADE terms of use and any onward redistribution rules.
  • Do not use insights, recommendations, or scenario records as a substitute for licensed legal, customs, or financial advice. They are decision support, not decisions.
  • Cite the United Nations COMTRADE database when republishing data derived from this actor.

FAQ

What is UN COMTRADE Trade Intelligence? A decision engine for UN COMTRADE trade data. It queries the official UN COMTRADE database, computes supply-chain analytics (HHI, trends, mirror checks, anomalies, tariffs), and emits typed records — including a single consolidated decision record for AI agents and executive views.

How is this different from the raw UN COMTRADE API? The raw UN COMTRADE API returns records. This actor returns finished analytics — ranked partners, HHI scores, YoY trends, anomaly classifications, tariff context, plain-English insights, recommendations, and a decision record. It also handles country name resolution, HS code lookup, multi-year windows, and cross-run state.

How is this different from Panjiva or ImportGenius? Panjiva and ImportGenius work from shipment-level customs records — vessel names, container numbers, importer and exporter company names. UN COMTRADE Trade Intelligence works from official aggregated UN statistics and does not return shipment data. The two are complementary: use UN COMTRADE Trade Intelligence for macro supply-chain risk, use Panjiva or ImportGenius for shipment lookups.

Can I use this for sanctions or compliance work? Yes, for the macro / mirror-data side. The bilateral-audit mode flags potential misinvoicing through reporter-versus-partner mirror discrepancies. It does not replace customs filings, sanctions list checks, or licensed compliance review.

Can I run this on a schedule? Yes. Use analysisMode: "monitor" with a stable watchlistId and Apify's built-in scheduler. The actor saves per-run state in a named KV store and emits change-summary records describing what changed since the last run. Pair with a webhook for Slack or email alerts.

How accurate are the insights and recommendations? The insights engine is rule-based, not generative — every claim is backed by computed evidence and carries a confidence score (0–1) and tier (high / medium / low). Setting includeReasoning: true adds an audit trail to every insight so reviewers can verify the call. Recommendations are template-based and tied to specific findings.

What does the decision-readiness tag mean? Each high-level record carries decisionReadiness: 'actionable' | 'monitor' | 'insufficient-data'. Downstream automation (Slack routing, dashboards, agents) can filter on it so only actionable findings reach a human.

How do I use this with an AI agent or LLM? Set outputMode: "decision" and the actor returns a single DecisionRecord with headline, top3Actions, keyRisks, keyOpportunities, whatChanged, why, confidence, and decisionReadiness. One tool call replaces multiple UN COMTRADE lookups and removes record-routing logic from the agent's prompt.

What is HHI in trade analysis? The Herfindahl-Hirschman Index is a standard measure of market concentration, computed as the sum of squared shares. In trade context, an HHI above ~2,500 across trading partners indicates a highly concentrated supply chain. The actor returns HHI plus a concentrationLevel tag (competitive, moderate, concentrated, highly-concentrated) and the top 1 / 3 / 5 partner shares.

What is mirror data and why does it matter? Mirror data is the comparison of a reporter's declared trade against the partner's declared trade in the same flow. Material divergences can indicate misinvoicing, sanctions evasion, or reporting gaps. The bilateral-audit mode flags discrepancies above 30% by default.

Is monthly trade data supported? Yes. Set frequency: "M" and lookbackPeriods to the number of months you want. The actor pulls the rolling window, computes 3m / 6m / 12m rolling averages, and fits a linear trend slope. Monthly data is available for most reporters since around 2010.

Is it legal to use UN COMTRADE data for commercial analysis? UN COMTRADE data is published by the United Nations Statistics Division and is generally available for analytical use, subject to the COMTRADE terms of use and citation requirements. Legality of any specific commercial application depends on jurisdiction and intended use — consult legal counsel before redistributing data or building a commercial product on top of it.


Help us improve

If you encounter issues, you can help us debug faster by enabling run sharing in your Apify account:

  1. Go to Account Settings > Privacy
  2. Enable Share runs with public Actor creators

This lets us see your run details when something goes wrong, so we can fix issues faster. Your data is only visible to the actor developer, not publicly.


Support

Found a bug or have a feature request? Open an issue in the Issues tab on this actor's page. For custom solutions or enterprise integrations, reach out through the Apify platform.