# UN Comtrade Trade Data: Best Export Markets per HS Code (`rich_minds/export-market-finder-ai`) Actor

First 25 export markets free. UN Comtrade export market finder, pay per qualified market — raw rows never charged here: every country importing your HS code, ranked by demand, growth, your share vs rivals and price per kg. A Trade Map alternative with an API, MCP & AI agents. Free demo on any plan.

- **URL**: https://apify.com/rich_minds/export-market-finder-ai.md
- **Developed by:** [Rich Minds](https://apify.com/rich_minds) (community)
- **Categories:** Business, E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.30 / 1,000 ranked export market (rules only)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UN Comtrade Trade Data: Best Export Markets per HS Code

**Every country that buys your product, ranked — each new year in your inbox or Telegram.**

⚡ First **25 export markets free** · 💵 **$0.0033** per ranked market · 🤖 **≈ $0.013 per market all in with AI** · ⏱️ demo in seconds, 5 live markets with duties in 107 s on Apify

![One row per importing country — imports, CAGR, your share, the market's price per kg, score and note](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/shortlist.svg)

> **Try it in 30 seconds.** Click **Try it** — the form holds a free demo (real Comtrade rows, HS 610910, India).
> Type your own HS code and country and press Start.
> → [What a run costs](#-pricing--what-a-run-really-costs) · [What the AI adds](#-what-the-ai-tier-adds) · [Run it weekly](#-run-it-weekly)

### ⚡ At a glance

| | |
|---|---|
| **What you get** | One row per importing country for your HS code: demand, growth, your share vs the top rivals, price per kg, the duty you pay, a score and a note |
| **You provide** | An HS code (or a product description) and your country |
| **Output** | A ranked sheet, best first — Excel, CSV or Google Sheets — plus a digest of what is new |
| **Typical run** | HS 610910, India: 30 markets in 85 s on Apify (2026-10-23) plus ≈ 58 s for their duties (2026-11-22); 5 markets with duties in 107 s (2026-11-21) |
| **Cost of that run** | $0.12 rules only · ≈ $0.41 with AI (incl. the $0.02 digest when it reaches you) — after your 25 free markets |
| **Free tier** | Your first 25 ranked markets on this Actor — one free tier per Apify account |
| **Keys / setup** | No key on Apify Starter and up (model access; not measured on the platform yet) — Free plan: your own Gemini key, 5 AI verdicts per run on a free key (2026-11-21) |
| **Which plan** | Any plan: the demo, your own rows ([template](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/list-template.json)) and the live search. The e-mail digest runs Apify's send-mail Actor, so it needs a plan that runs Store Actors — Telegram / Slack work on any plan |
| **Works with** | Schedules, webhooks, Google Sheets, Slack, Teams, Discord, Telegram, Make / n8n / Zapier, MCP & AI agents |

### 🎯 What this Actor does

An export market finder for HS code trade data: type a product, get every country that imports it, ranked.

- **Where demand is and grows** — import value in the latest year, 1-year growth and the CAGR.
- **Your share next to your rivals** — your value and share in each market, and the top 5 rival supplier countries.
- **What the market pays, and what you pay to enter** — the import price per kg (yours, each rival's) and the market's
  duty on your goods with your landed price per kg — the **Price benchmark** view.
- **The HS code from a description** — "frozen shrimp" becomes HS 030617, a low-confidence match flagged `hs_guessed`.
- **A note a sales head can read** — up to three sentences per market, citing only that row's numbers.

#### Best countries to export to, ranked

The **opportunity score** (0–100): demand 30 points (log scale, $1 M → $10 B), growth 25, share gap to the top
supplier 20, your **landed** price (duty paid) vs the market's per kg 15, data recency 10. Markets under $1 M, outside
your list or your own country are dropped first — never charged by us, no source bill; `OUTPUT.skips` names them and
**Always keep** brings one back.

#### Find export markets from your goal alone

No HS code? Write your goal ("Frozen shrimp from Andhra Pradesh") in **Your brief**: its first sentence is matched to
an HS code and searched (`OUTPUT.termsFromGoal`).

### 🚀 How to use it

1. **Click Try it** — the form opens on the free demo; Start it as is to see five ranked markets.
2. **Type your HS code** (or describe the product, or pick a ready search) and "Your country" — that starts the live
   search. Leave "AI assessment" on ([which AI your plan gets](#-at-a-glance)).
3. **Press Start and open the Shortlist** — best opportunity first; the Price benchmark view has the $/kg per rival.
4. **Schedule it** with your e-mail in "E-mail me the new export markets" — a market returns with each newer year.

![The Price benchmark view — what each market pays per kg, your price there and each rival's](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/prices.svg)

📚 **Learn more:** [Step-by-step tutorial — how to find the best countries to export to with UN Comtrade](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/tutorial.html)

### 🆚 Why this instead of running thirdwatch yourself?

Ranking one HS code's 30 markets from raw rows takes ≈ 4,730 Comtrade records (≈ 158 per market) and a spreadsheet.

| | [UN Comtrade Trade Data Scraper (`thirdwatch/trade-data-scraper`)](https://apify.com/thirdwatch/trade-data-scraper) | UN Comtrade website / [ITC Trade Map](https://www.trademap.org/) | **This Actor** |
|---|---|---|---|
| **Same 30 export markets (one HS code), all in** | ≈ $7.10 (4,730 rows × $0.0015) | free | **$0.12 rules only · ≈ $0.41 with AI (incl. the $0.02 digest)** |
| **Your time per 100 export markets** | ≈ 13 h, an estimate: 8 min a market on 5 sample markets, 2026-10-23 | ≈ 13 h; Trade Map has rankings, no API | ≈ 0 h — ranked, with rivals, $/kg, duty and a note |
| **Repeat runs** | the same rows again | by hand | only markets with a newer year |

#### vs other UN Comtrade Actors

| Actor | Price | 100 ranked markets, all in | What you get per run |
|---|---|---|---|
| **This Actor** | $0.0033 / market ($0.01 AI) | $0.35 rules only · ≈ $1.32 with AI | every market ranked, rivals' $/kg, duty |
| `ryanclinton/un-comtrade-search` | $0.002 / row + start | ≈ $31.60 | one corridor per query, with tariffs (its README) |
| `logiover/comtrade-trade-data-scraper` | $0.0035 / row + start | ≈ $55.30 | raw rows, no shares or $/kg |
| `taroyamada/un-comtrade-trade-flow-change-report` | $0.006 / row, $12 / report | ≈ $94.80 | change reports |

### 💵 Pricing — what a run really costs

Pay per result: **one event per ranked export market, one digest fee per run whose digest reached you.**

| Event | When it is charged | Price |
|---|---|---|
| `free-tier` | your first 25 ranked markets on this Actor, in any mode | **$0.00** |
| `qualified-export-market-basic` | AI off — figures, rivals, $/kg, duty, flags, score, rule note | **$0.0033** |
| `qualified-export-market-ai` | AI on — plus the AI fit score, reasons, summary, note, next step | **$0.01** |
| `digest-delivered` | once per run that billed ≥ 1 market AND e-mailed or posted its digest; no e-mail / chat set = never; first 3 free | **$0.02** |

**Never charged here:** raw Comtrade records, markets below your score or size, outside your list, markets with no
newer year, the duty lookup. No source bill — the reader calls UN Comtrade directly.

**How that compares** — $0.0033 is 1.47× the $0.00225 median of the Actors next to it in the Store search for "un
comtrade", but one ranked market replaces ≈ 158 raw Comtrade records: about $0.00002 per raw-row equivalent.

**Worked example** — HS 610910, India, AI on, the form's defaults: 30 markets on the first run = 25 free + 5 × $0.01 +
30 × ≈ $0.003 tokens = **≈ $0.14**. The next HS code: 30 × $0.013 + the $0.02 digest = **≈ $0.41** ($0.12 rules only, incl. the $0.02 digest).

**At volume** — a consultant's client report replaces a day of Trade Map work: one task per client, your free
`comtradeKey`.

**AI tier, all in:** ≈ $0.013 per market ($0.01 + ≈ $0.003 tokens: 1,404 in / 342 out measured on
`google:gemini-3.5-flash-lite` with an own Gemini key, 2026-11-21, priced at Claude Haiku 4.5 rates) — 3.9× basic.

### 🤖 What the AI tier adds

The same market (Netherlands, HS 610910, India), AI **off** — the rules' figures and note:

```json
{"name": "Netherlands · HS 610910", "importValueUsd": 1339230500, "cagrPct": 2.2, "growth1yPct": 11.4, "exporterSharePct": 6.48, "unitValueUsdPerKg": 21.09, "ruleScore": 66, "score": 66, "label": "warm", "assessedBy": "rules", "generatedText": "Netherlands imported $1.34 B of HS 610910 in 2025, +2.2 % a year since 2022 (+11.4 % on the year before). India supplied $86.78 M (6.5 % share). Top supplier: Bangladesh with 23.1 %; the market pays $21.09/kg on average."}
```

<details><summary>AI <b>on</b> — the same market (run 2026-10-23 on the AI example)</summary>

```json
{"name": "Netherlands · HS 610910", "ruleScore": 66, "fitScore": 76, "score": 76, "label": "hot", "assessedBy": "ai", "generatedText": "The Netherlands is a massive $1.34 B market that grew 11.4 % in 2025, offering a strong foothold where India already holds a 6.48 % share ($86.78 M). …", "recommendedNextStep": "Verify distributor margins for Indian cotton T-shirts against Bangladesh's $13.04 per kg price point before outreach.", "aiModel": "google:gemini-3.5-flash-lite"}
```

</details>

An invented figure, a forecast or a rate the row lacks drops the sentence; the rule note takes its place. Writing it
by hand takes ≈ 8 min per market (our estimate on 5 sample markets, 2026-10-23).

**Which AI your plan gets:** every market on Apify Starter and up (model access, not measured on the platform yet);
otherwise your own key — a free Gemini key gave 5 AI verdicts per run (5 of 5 markets, 2026-11-21) and hits its rate limit on large
runs, a paid key assesses every market. The demo shows labelled sample verdicts (`aiModel: "sample"`) on any plan.

### ⚙️ Input

```json
{"hsCodes": ["610910"], "exporterCountry": "IN", "minScore": 35, "maxQualified": 30, "enableAi": true}
```

**The mode that runs = `sourceMode`, except `{}` = the free demo** — over the API nothing switches; only in the
Console do the untouched sample rows next to a typed HS code start the live search.

<details><summary>The fields you decide on, with their defaults</summary>

| Field | Default | What it does |
|---|---|---|
| `hsCodes` / `products` | — (form: `610910`) | HS codes (≈ 5 a run keyless, 10 with `comtradeKey`) or descriptions matched to one |
| `exporterCountry` | `IN` | Your country: its share, price and rivals on every row |
| `view` | `markets` | `flows` = supplier rows per importer from national sources (see Supplier flows) |
| `minScore` | `35` | The field that decides what you pay: below it = not delivered, not charged |
| `maxQualified` | `30` | Cap on markets delivered (and spend) |
| `enableAi` | `true` | AI fit score, reasons, note; HS matching and the run summary |
| `markets` / `allowList` | — | Only these importing countries / markets the size rule never drops |
| `minImportValueUsd` | `1000000` | Markets importing less are skipped, never charged |
| `includeTariffs` | `true` | The duty each market charges you, your landed $/kg, duty flags |
| `comtradeKey` | — | Your free UN Comtrade key — recommended for every scheduled run |
| `censusApiKey` | — | Flows view: your free US Census key for the US rows |
| `sourceMode` | `live` | `live` = the UN Comtrade search; `list` / `dataset` = rows you have |

</details>

Also: `preset`, `goalDescription`, `notifyEmail`, `suppressionList` (an exclude always wins), `sendAlertsTo`; API only:
`years`, `frequency` (monthly), `months`, `excludeCountries`, `failOnSourceError`, the flows options — [API reference](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/api-reference.md).

#### Flags

<details><summary>The flags you can target</summary>

`fast_growing` · `shrinking` · `untapped` · `foothold` (< 5 % share) · `you_lead` · `price_competitive` (landed $/kg ≥
10 % below) · `premium_market` · `concentrated_supply` · `mirror_data` · `stale_period` · `no_weight_data` ·
`hs_guessed` · `duty_advantage` (preference below MFN) · `duty_disadvantage` (≥ 10 % duty) — meanings in the API
reference.

</details>

### 📤 Output

One dataset item per ranked market; the full row and the `OUTPUT` keys are in the [API reference](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/api-reference.md).

<details><summary>Output fields</summary>

| Fields | |
|---|---|
| `itemId`, `dedupeKey`, `name`, `url`, `hsCode`, `hsDescription`, `exporterCountry`, `exporterCountryCode` | Identity (`<hs>:<exporter>:<market>:<period>`), the comtradeplus query, your country |
| `marketCountry`, `marketCountryCode`, `marketComtradeCode`, `latestPeriod`, `periods`, `newestPeriod`, `dataPeriod` | The importer; its periods |
| `importValueUsd`, `growth1yPct`, `cagrPct`, `figureBasis`, `exporterValueUsd`, `exporterSharePct` | Imports, growth, your sales and share |
| `topSuppliers`, `origins`, `monthly`, `unitValueUsdPerKg`, `unitValueUsdPerUnit`, `quantityUnit`, `weightEstimated` | Rivals, every origin's $/t, the monthly series, prices |
| `exporterUnitValueUsdPerKg`, `exporterWorldUnitValueUsdPerKg`, `exporterUnitValueUsdPerMt`, `landedUnitValueUsdPerKg` | Your prices; duty paid |
| `mfnDutyPct`, `preferentialDuty`, `tariffYear`, `tariffSource`, `mirror`, `mirrorOnly`, `dataSource` | Duties (WITS); mirror data; source |
| `flags`, `targetFlagsMatched`, `ruleScore`, `fitScore`, `score`, `label`, `assessedBy` | Sort by `score`, trend on `ruleScore` |
| `scoreReasons`, `summary`, `generatedText`, `recommendedNextStep`, `aiModel` | AI assessment; note; next action |
| `chargedEvent`, `billedAs`, `source`, `scrapedAt` | Billing; provenance; when this run read it (UTC) |

</details>

**Upsert key for a CRM or Sheet:** `dedupeKey` — HS code, your country, the market and its latest year; `itemId` is
the same value.

`OUTPUT` holds the funnel, `skips`, `summary`, `hsResolved`, `comtradeRecords`, `tariffs`, charges and `aiCoverage`;
a **`DIGEST`** (Markdown) and a client-ready **`REPORT`** (HTML) sit next to it. Views: **Shortlist**, **Price
benchmark**, **Score breakdown**, **Export**.

⭐ **Found it useful? A review on the Store helps others find it** — it takes a minute on the Actor's page.

### 🧭 Supplier flows — who supplies each importer (`view: flows`)

**`view: flows`** returns one row per importer × supplier × period — value in USD and the source's currency, tonnes,
USD per tonne, share and rank — from each importer's **own official source**, months fresher for the EU, UK and US.

**Cost:** one `qualified-export-market-basic` ($0.0033) per importer × period table, on its first row; the other
rows are `chargedEvent: same-unit`, free. No AI. Empty `markets` = the 10 biggest importers.

<details><summary>Sources and fields</summary>

| Importer (`markets`) | Source | Key |
|---|---|---|
| EU members, `EU27` | Eurostat Comext, monthly; EUR → USD at Eurostat's monthly rate | none |
| `GB` | UK HMRC, monthly; GBP → USD | none |
| `US` | US Census, monthly | free `censusApiKey`; else UN Comtrade |
| others | UN Comtrade; mirror rows for non-reporters | `comtradeKey` |

HS 090411, 2024: Germany (Eurostat) — India 5th of 62, 4.22 % at €6,249/t; UK (HMRC) — 5.5 % at £4,720/t.

| Field | What it holds |
|---|---|
| `view`, `reporter`, `reporterName`, `partner`, `partnerName`, `hsCode`, `period`, `frequency`, `dataPeriod` | Who, when |
| `valueUsd`, `valueNative`, `currency`, `fxRate`, `fxSource`, `valueBasis` | Value; CIF / customs / FOB |
| `quantity`, `unit`, `netWeightKg`, `netWeightMt`, `weightEstimated`, `unitValueUsdPerMt`, `unitValueNativePerMt`, `sharePct`, `rank` | Weight, $/t, share |
| `mirror`, `source`, `sourceUrl`, `attribution`, `market`, `flags`, `flowFlags` | Provenance, summary, flags |

API only: `flowFrequency` (M / A), `flowPeriods`, `topSuppliers` (15), `minSharePct`, `includeMirror`. Or `frequency`, `months`.

</details>

Data: Eurostat (DS-045409) · HM Revenue & Customs, Open Government Licence v3.0 · U.S. Census Bureau · UN Comtrade.
This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.

### 🔁 Run it weekly

1. **Open the saved task and click Schedule** after your first real run — monthly for annual data — with your address
   in `notifyEmail` (or a Telegram / Slack URL): each run with new markets sends the digest and the trend. Add your
   free `comtradeKey`: a keyless schedule stops at 95,000 records and shares an hourly quota.
2. Leave `dedupeAcrossRuns: true` — a run delivers and charges only markets with a newer period. Adding an HS code
   keeps the memory; one `dedupeStoreName` per client.
3. `webhookUrl` gets the rows — start from the [tracker sheet](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/tracker.csv); `historyDatasetName` keeps the
   series.

Comtrade years arrive per reporter through the year; EU, UK and US monthly figures: `view: flows`.

#### 🎯 Try it for your niche

Pick one in **Start from a ready search** and press Start:

| Ready search | Input | Measured live 2026-10-23 (AI off, 10 markets) |
|---|---|---|
| [India · cotton T-shirts](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/preset-india-cotton-tshirts.json) | HS 610910, IN | 10 qualified, 10 hot |
| [Viet Nam · green coffee](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/preset-vietnam-green-coffee.json) | HS 090111, VN | 10 qualified, 10 hot |
| India · frozen shrimp | HS 030617, IN | 10 qualified, 4 hot |
| Kenya · cut roses | HS 060311, KE | 10 qualified, 4 hot |
| [Türkiye · shelled hazelnuts](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/preset-turkiye-hazelnuts.json) | HS 080222, TR | 10 qualified, 2 hot |
| India · textiles set (3 codes) | HS 610910, 610462, 620520, IN | 30 qualified, 19 hot (keyless: 2 of 3 codes) |

### 🔌 Integrations, automation and API

`{}` over the API runs the free demo — nothing charged; any HS code or product runs the live search.

- **Webhook** — `webhookUrl` POSTs `{"event": "export_market.qualified", "export_market": {…}, "runId": "…"}` per
  market, a batch `{"event": "export_markets.qualified", "export_markets": [{…}], "runId": "…"}`; a 429 / 5xx is retried once, a failed POST is re-sent next run, never
  charged again, and a webhook failure never fails the run. `webhookSecret` signs each POST.
- **Which delivery field wins** — each URL is posted once: `webhookUrl` the rows, `notifyEmail` / `sendAlertsTo`
  the digest; a per-service field wins for its service.
- **HubSpot / Pipedrive** — a Make / Zapier "create or update" deal per row, upsert on `dedupeKey`.

#### Run outcomes — what your integration sees

<details><summary>Every outcome: run status, dataset, <code>OUTPUT</code>, charged?, what to do</summary>

| Outcome | Run status | Dataset | `OUTPUT` | Charged? | What to do |
|---|---|---|---|---|---|
| Free demo | SUCCEEDED | 5 sample markets | `mode: demo` | no | type your HS code |
| Success | SUCCEEDED | ranked markets | `ok: true`, `chargedEvents` | per ranked market | — |
| Nothing matched / no newer year | SUCCEEDED | empty | `outcome: empty` | no — and no source bill | loosen `minScore` |
| Invalid input | FAILED | empty | — | no | fix the field the status names |
| Your plan cannot run the Store-scraper fallback | SUCCEEDED | Console: the sample on your brief | `ok: false`, `outcome: source_refused` | no | a scheduled / API run alerts `notifyEmail`; paste [list-mode rows](#list-mode-rows--what-a-pasted-record-needs) |
| Source failed (quota, outage, 95,000 keyless records) | FAILED | empty | `ok: false`, `outcome: source_failed` | no | later, or `comtradeKey` |
| Source partial (keyless quota) | SUCCEEDED | the codes read | `sourceStatus.codesNotRead` | per ranked market | re-run those codes |
| Crashed (rare) | FAILED | rows before it | `outcome: error` | only those rows | re-run |
| AI unavailable | SUCCEEDED | rule-scored markets | `aiError`, `aiCoverage` | free, then basic | your own key |
| Flows: one source down | SUCCEEDED | other importers | `refused[].code` | per table | alert on `failed` only |

</details>

Store-scraper fallback only: `discoveryInput`, `maxDiscoveryChargeUsd`, `failOnSourceError: true` (a refusal FAILS).

<details><summary>API snippets — Python and JavaScript</summary>

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("rich_minds/export-market-finder-ai").call(
    run_input={
        # free first call instead: {} (the demo) or {"sourceMode": "list", "itemsList": [<Comtrade rows>]}
        # the API never switches the mode (autoSwitchToLive is Console-only)
        "hsCodes": ["610910"],
        "exporterCountry": "IN",
        "maxQualified": 30,
        # "comtradeKey": "<your free UN Comtrade key>",  # 10 HS codes a run instead of ≈ 5
        # "maxDiscoveryChargeUsd": 0.5,  # Store-scraper fallback only
    },
    timeout_secs=1800,  # "How long does a run take?"
    # build="0.3.5",  # pin the build your pipeline was tested with
)
out = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("OUTPUT")["value"]
if not out.get("ok", True) or out.get("sourceError"):
    raise RuntimeError(out.get("outcome"), out.get("sourceError"))
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item["score"], item["label"], item["url"])
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('rich_minds/export-market-finder-ai').call({
    // free first call instead: {} (the demo) or { sourceMode: 'list', itemsList: [/* Comtrade rows */] }
    // the API never switches the mode (autoSwitchToLive is Console-only)
    hsCodes: ['610910'], exporterCountry: 'IN', maxQualified: 30,
    // comtradeKey: '<your free key>', maxDiscoveryChargeUsd: 0.5 (Store-scraper fallback only)
}, { timeout: 1800 /* , build: '0.3.5' — pin the build your pipeline was tested with */ });
const out = (await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('OUTPUT')).value;
if (out.ok === false || out.sourceError) throw new Error(`${out.outcome}: ${out.sourceError}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.name, i.score, i.label, i.url]));
```

</details>

**Use it from Claude, ChatGPT or any MCP client:**

```json
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=rich_minds/export-market-finder-ai"}}}
```

Ask: *"Run `{}` first (free), then HS 090111 for Viet Nam."* **Minimal agent input** (memory off):

```json
{"hsCodes": ["090111"], "exporterCountry": "VN", "maxQualified": 10, "enableAi": true, "dedupeAcrossRuns": false}
```

**Which call runs what** — `{}` = the free demo; your HS code, product or goal = the live search; your own rows =
`list` / `dataset`. Every run writes `OUTPUT.mode` and `OUTPUT.modeReason`.

#### List-mode rows — what a pasted record needs

<details><summary>Raw UN Comtrade records in <code>itemsList</code> (any plan)</summary>

`sourceMode: "list"` takes raw Comtrade records ([template](https://api.apify.com/v2/key-value-stores/klR3qbgzOx7gTm7AB/records/list-template.json)) — the API's names or another
scraper's (`reporter_country`, `trade_value_usd`, …).

| Field | Needed? | What it enables |
|---|---|---|
| `reporterCode` / `reporterDesc` | required | the importing market (Comtrade code, ISO or name) |
| `partnerCode` / `partnerDesc` | required | `0` / `World` = the market's total (needed for shares); a country = a supplier |
| `cmdCode`, `flowCode` (`M` / `X`), `period` | required | HS code, imports (or your exports, for mirror data), year or YYYYMM |
| `primaryValue` | required | every value, share and growth figure |
| `netWgt`, `qty`, `qtyUnitAbbr` | optional | price per kg / per unit |
| `cmdDesc`, `name` | optional | `hsDescription`; a label |

</details>

### 👥 Who is it for?

| You are… | You run it to… | Start with |
|---|---|---|
| An exporter or manufacturer (India first, any country) | find the 10 markets to target and what they pay per kg | your HS code + your country, AI on |
| A trade consultant or export-promotion body | market-selection reports for clients | one task per client's HS code, the `REPORT` page, your free `comtradeKey` |
| A trade platform, analyst or sourcing team | demand per HS × destination, each supplier's $/kg | AI off, a webhook, the Price benchmark view |

### 🧠 How the AI works

- **Grounded.** It sees one market row, its duty included; a sentence citing a number the row lacks or a forecast is
  dropped — the row's own MFN / preferential duty may be cited, any other rate may not.
- **Three jobs:** the HS code among up to 15 official headings (confidence < 0.5 → flagged); a fit score, reasons and
  note per market; a ≤ 80-word summary of the top 10.
- **No API key where your Apify plan includes model access — otherwise your own Gemini / Groq key.** Default
  `anthropic/claude-haiku-4.5`. A model error never fails the run; the market keeps its rule score and note.

### 🔒 Data, compliance and limits

- Data: **UN Comtrade** official statistics and the World Bank's WITS duties, derived figures, sources named. 100,000+
  Comtrade records in total need a licence: each run reports `comtradeRecords`; keyless runs stop at 95,000.
- Limits: without a key ≈ 180 calls an hour per IP (≈ 5 HS codes — the run names the codes left); the newest year has
  ≈ 120 of ≈ 170 reporters by October.

### ❓ FAQ

**What will my first real search cost?** HS 610910 for India: 25 free + 5 paid ≈ $0.14 with the AI; after that ≈ $0.41
per HS code with AI ($0.12 rules only), incl. the $0.02 digest when it reaches you. No source bill.

**Is this a Trade Map alternative?** ITC Trade Map and the Comtrade website are free — use them for one-off tables;
this Actor wins on API, schedules, many HS codes, duties and a note per market.

**How long does a run take?**

<details><summary>Run times and the `timeoutSecs` to set</summary>

| Mode | Measured | `timeoutSecs` |
|---|---|---|
| Free demo (5 markets) | 5.5 s on Apify; 51 s with AI (own Gemini key), 2026-11-21 | 120 |
| Live, 5 markets, duties | 107 s on Apify (2026-11-21) | 600 |
| Live, 30 markets | 85 s (2026-10-23) + ≈ 58 s of duties (2026-11-22) on Apify | 900 |
| AI, Apify's model access | not measured on the platform yet | 1800 |
| AI with a free own key | measured 2026-10-23 and 2026-11-21: ≈ 1.1–4 s per export market (google:gemini-3.5-flash-lite, own Gemini key) | 1800 |
| Worst case, 100 markets, rate-limited key | ≈ 300 s reads + ≈ 210 s AI + the 2-min rate-limit budget | 1800 |

</details>

**What does the flows view add, and cost?** Who supplies each importer, month by month from Eurostat, UK HMRC and the
US Census (your free key), plus UN Comtrade for the rest — one $0.0033 event per importer × period table.

**Which Apify plan do I need?** Any — the live search reads UN Comtrade directly; the e-mail digest needs a plan that
runs Store Actors (Telegram / Slack: any plan).

**Do rule-scored markets use my free ones?** Yes while the AI is unavailable: your first 25 are free, 5 of them kept
for your first AI-assessed ones (`OUTPUT.chargeSplit.freeKeptForAi`).

**Will I be charged for the same market twice?** No — with `dedupeAcrossRuns` on, a market is charged again only when
Comtrade publishes a newer year. Adding an HS code keeps the memory.

### 🧩 More Actors from the same developer

- **[Alibaba RFQ Leads AI](https://apify.com/rich_minds/alibaba-rfq-leads-ai)** — the market's buying requests, ready to quote.
- **[US Importers Finder](https://apify.com/rich_minds/us-importer-finder-ai)** — named US importers of your HS code.
- **[1688 Supplier Finder](https://apify.com/rich_minds/1688-supplier-finder-ai)** — your $/kg next to costed Chinese factories.
- **[OFAC Sanctions Screening](https://apify.com/rich_minds/counterparty-check-ai)** — screen new importers before the first shipment.
- **[DGFT Notification Watch](https://apify.com/rich_minds/trade-regulation-watch-ai)** — new export bans and restrictions for your HS codes.
- **[Food Import Refusals](https://apify.com/rich_minds/import-refusals-ai)** — food lots Japan refused, exporter named, weekly.
- **[Spice Association Members](https://apify.com/rich_minds/trade-association-members-ai)** — the spice companies in ESA, UK SSA and AISEF for the market you picked: named buyers to contact.
- **[ECGC Country Risk Classification](https://apify.com/rich_minds/country-risk-feed-ai)** — the ECGC rating and cover of each market you shortlist, and what the newest list changed.
- **[India Export Data by HS Code](https://apify.com/rich_minds/india-export-stats-ai)** — the monthly view: India's exports of your HS codes to each market up to last month, not last year.
- **[WTO ePing Alerts](https://apify.com/rich_minds/destination-rule-watch-ai)** — Your export markets' new rules by HS code, daily — food, cosmetics, electronics, chemicals.
- **[India Export Tariffs & Market Access](https://apify.com/rich_minds/india-trade-portal-ai)** — the duty and FTA rate each shortlisted market charges on your HS code, with the rules of origin.

### 🆘 Support

Something missing or wrong? Open an issue on the Actor's page — buyer requests ship first.

### 📝 Changelog

- **0.3.5** (2026-11-25) — `months` sets the window when flowPeriods is at its default — the platform fills every default into the input.
- **0.3.4** (2026-11-25) — US Census flows: quantity, tonnes, $/t; `months` honoured.
- **0.3.1 – 0.3.3** (2026-11-24) — the `view` field: supplier flows from Eurostat, UK HMRC, US Census (`censusApiKey`) and UN Comtrade; same prices; tuning options API only.
- **0.2.4 – 0.2.6** (2026-11-22/24) — More Actors links.

<details><summary>Older builds</summary>

- **0.2.1 – 0.2.3** (2026-11-21/22) — duties (WITS) in the ranking; monthly series and origins (API).
- **0.1.x** (2026-10-23) — first release.

</details>

# Actor input Schema

## `preset` (type: `string`):

Replaces the sample search: pick a ready search and press Start — it fills the HS code(s) and country (the untouched sample counts as empty) and runs the live UN Comtrade search. A value you typed yourself always wins. <b>Custom</b> = fill the fields yourself.

## `hsCodes` (type: `array`):

The 6-digit HS code (or 4 / 2 digits), e.g. <code>610910</code> cotton T-shirts. Typed next to the sample, it starts the live search — built in, any Apify plan; a plan that cannot run Store Actors gets the same. ≈ 5 codes a run without a key (the run names the codes left), 10 with your free <code>comtradeKey</code>.

## `products` (type: `array`):

Plain descriptions such as <code>frozen shrimp</code>, each matched to its 6-digit HS code (the AI, else the best text match; a low-confidence match is flagged <code>hs_guessed</code>). Any plan — a plan that cannot run Store Actors searches it the same way.

## `exporterCountry` (type: `string`):

The country you export from: every row shows its share, price per kg and rivals; its own market is left out.

## `view` (type: `string`):

<b>Ranked markets</b> (default): one scored row per importing country. <b>Supplier flows</b>: one row per importer × supplier × period from each importer's official source — Eurostat, UK HMRC, US Census (your <code>censusApiKey</code>), UN Comtrade — with USD per tonne, share and rank. Same price per importer table.

## `goalDescription` (type: `string`):

What makes a market right for you, e.g. "mid-price cotton T-shirts; growing markets where we hold under 5 %". The AI weighs every market against it; the rule score does not use it. No HS code or product typed? The goal's first sentence is searched as the product (its HS code in <code>OUTPUT.hsResolved</code>).

## `notifyEmail` (type: `string`):

The digest (top 10 new markets with numbers and links) is e-mailed here after every run with new markets — sent by Apify's send-mail Actor, so it needs a plan that runs Store Actors; any plan: a Slack / Teams URL in <b>Send alerts to</b>. Never sent for the free demo.

## `minScore` (type: `integer`):

The field that decides what you pay: markets whose opportunity score is below this are discarded and <b>not charged</b>. 35 keeps the top half of a typical product's markets; raise it to pay only for the strongest. Affects what you pay.

## `maxQualified` (type: `integer`):

Hard cap on results — and the ceiling of what <b>this Actor</b> charges: at most this many × $0.01 with AI on (× $0.0033 with AI off), e.g. 30 × $0.01 = $0.30. It also sizes the read: the 3 × this many biggest markets get the detailed supplier read (≈ 1 s per 3 markets). Affects what you pay. The best-scoring markets are output first.

## `maxDiscoveryChargeUsd` (type: `number`):

Only for the Store-scraper fallback (Source Actor input filled, Comtrade refused): the most that Store Actor's run may charge your account — $0.50 in the form and for an API call that leaves it out. The built-in UN Comtrade reader has no source bill. Affects what you pay.

## `enableAi` (type: `boolean`):

An AI fit score per market with reasons, and an opportunity note of up to 3 sentences citing only the market's own numbers (its duty too); it also matches product descriptions to HS codes and writes the run summary. <b>On = $0.01 per export market + AI tokens (≈ $0.003); off = $0.0033</b> (rule score and a rule-based note). Every market gets the AI where your Apify plan includes model access (Apify's model access: not measured on the platform yet); otherwise your own Gemini / Groq key (a free Gemini key read 5 of 5 markets on 2026-11-21; large runs hit its rate limit), and the demo shows labelled sample verdicts. Affects what you pay.

## `markets` (type: `array`):

Limit the ranking to these importing countries — e.g. the EU members you can ship to. Empty = every country that reports to UN Comtrade. Markets outside the list are never read in detail or charged.

## `excludeCountries` (type: `array`):

API only — hidden on the form. ISO codes or names of markets never read or charged (e.g. blocked or review-only markets); no Comtrade request is spent on them. An exclude always wins over <code>markets</code> and <code>allowList</code>.

## `months` (type: `integer`):

API only — hidden on the form. With <code>frequency: M</code>: how many months back from the newest published one each row's monthly series covers (one Comtrade call per month and HS code). Annual runs ignore it. With <code>view: flows</code> and <code>flowPeriods</code> at 1: the number of months per importer.

## `flowFrequency` (type: `string`):

API only — hidden on the form. With <code>view: flows</code>: <code>M</code> (default) = the newest months where the source publishes monthly (Eurostat, UK HMRC, US Census, Comtrade where reported; an importer without monthly Comtrade data falls back to annual, the row says <code>frequency</code>); <code>A</code> = calendar years (set <code>years</code> for specific ones).

## `flowPeriods` (type: `integer`):

API only — hidden on the form. With <code>view: flows</code>: the newest N months (or years) per importer; each is one supplier table (one charged event). One period before them is read for the change and never charged.

## `topSuppliers` (type: `integer`):

API only — hidden on the form. With <code>view: flows</code>: keep the top N suppliers per importer and period (0 = all); your own country's row always stays. Free filter.

## `minSharePct` (type: `number`):

API only — hidden on the form. With <code>view: flows</code>: drop supplier rows below this share of the importer's total (your own row stays). Free filter.

## `includeMirror` (type: `boolean`):

API only — hidden on the form. With <code>view: flows</code>: an importer that reported nothing to UN Comtrade gets rows built from its partners' exports to it (<code>mirror: true</code>, FOB — a lower bound of the import value).

## `includeTariffs` (type: `boolean`):

On (default): each likely market gets its standard (MFN) duty and your preferential duty from the World Bank's WITS tariff data, your landed price per kg, and the duty in the price points and the flags <code>duty_advantage</code> / <code>duty_disadvantage</code>. Free, no key, not what you pay; adds ≈ 1 s per market to the run.

## `minImportValueUsd` (type: `integer`):

Markets that imported less than this in their latest year are skipped before any detailed read — never charged. 1,000,000 keeps the markets worth a sales trip; 0 keeps every reporter.

## `years` (type: `array`):

API only — hidden on the form. The years to read, e.g. <code>2022</code> … <code>2025</code>. Empty = the latest 4 years UN Comtrade has published (a year counts once 25+ countries reported it) — 1-year growth and a 3-year CAGR. Annual data only; monthly runs read the newest month and the same month a year earlier.

## `frequency` (type: `string`):

API only — hidden on the form. <code>A</code> (default) = annual: yearly totals, every reporting country. <code>M</code> = monthly: the newest published month vs the same month a year earlier — fresher, but fewer countries report monthly.

## `rivalSuppliers` (type: `integer`):

API only — hidden on the form. How many of each market's biggest supplier countries (other than yours) are listed with their value, share and price per kg.

## `targetFlags` (type: `array`):

Only deliver markets that have at least one of these flags (e.g. <code>fast_growing</code>, <code>untapped</code>), and rank those with more of them higher. Leave empty to keep everything. An API call passes the flag names from the README's flag table (<code>fastGrowing</code> works too); an unknown name stops the run at once with the list of valid ones.

## `suppressionList` (type: `array`):

Markets to never output — country names, ISO codes (<code>CHN</code>) or dedupe keys. Skipped before any processing and never charged. With <b>Only these markets</b> and the API-only <code>excludeCountries</code>: the include lists are merged, an exclude always wins.

## `allowList` (type: `array`):

API only — hidden on the form. Markets (names or ISO codes) the size rule never drops — e.g. a small market a run skipped as below <b>Minimum market size</b>; <code>OUTPUT.skips</code> names every market each free rule dropped. They still need to pass <b>Minimum score</b>; an exclude list wins over this one.

## `llmProvider` (type: `string`):

<b>Apify (no keys)</b> — the AI runs through Apify's OpenRouter proxy where your plan includes model access (Starter and up); tokens are billed to your Apify account. <b>My own key</b> — your OpenAI / Anthropic / Gemini / Groq key: with a free Gemini key expect 5 AI checks per run (5 of 5 markets, 2026-11-21); on large runs it hits its rate limit (2 calls at a time, then the 3 borderline markets retried one by one) and the rest keep their rule score; a paid key (billing on) assesses every export market. Measured 2026-10-23 and 2026-11-21: ≈ 1.1–4 s per export market (google:gemini-3.5-flash-lite, own Gemini key).

## `llmModel` (type: `string`):

Leave empty for the default: <code>anthropic/claude-haiku-4.5</code> through Apify, <code>google:gemini-3.5-flash-lite</code> with your own key (a free Gemini key works). Apify mode takes an OpenRouter slug such as <code>openai/gpt-4.1-mini</code>; own-key mode takes <code>provider:model</code>, e.g. <code>anthropic:claude-haiku-4-5-20251001</code>.

## `llmApiKey` (type: `string`):

Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged.

## `aiCandidateMultiplier` (type: `integer`):

API only — hidden on the form. How many of the best rule-scored export markets get the AI pass, as a multiple of <b>Max qualified</b>. Higher = more thorough, slower, more tokens.

## `sendAlertsTo` (type: `string`):

Paste one or more URLs, one per line — the service is detected from the address: a Slack or Discord channel webhook, a Teams Workflows or Google Chat space webhook, your Telegram bot's send link (<code>https://api.telegram.org/bot\<token>/sendMessage?chat_id=@yourchannel</code>) or any other https URL (Zapier, Make, n8n, your CRM), which gets the export markets as JSON. After every run with at least one new export market, the digest (how many are new, the top 10 with links) is posted there. Never sent for the free demo. Headers, batching and signing: <i>Delivery details (advanced)</i>.

## `dedupeAcrossRuns` (type: `boolean`):

Remembers every export market you were charged for — keyed by HS code, your country, the market and its latest year — and skips it in future runs. A market comes back (and is charged once more) only when UN Comtrade publishes a newer year for it.

## `dedupeTtlDays` (type: `integer`):

API only — hidden on the form. 0 (default) = an export market whose latest year has not changed is never delivered or charged again. A number of days lets it reach you again after that many days — charged again.

## `historyDatasetName` (type: `string`):

Optional. Type a name (e.g. <code>export-market-finder-ai-seen-log</code>) and every run appends its new export markets with the date to that named dataset on your account — one list across months to connect to Google Sheets or your BI tool once. Empty = off. Costs nothing extra.

## `sourceMode` (type: `string`):

<code>{}</code> over the API runs the free demo — nothing charged. <b>live</b> (older name <code>actor</code>) — the built-in reader searches UN Comtrade for your HS codes, any plan, no source bill. <b>dataset</b> — a Comtrade scraper's dataset. <b>list</b> — raw Comtrade rows you paste in. The mode you choose always runs as chosen (over the API: the mode you send, except <code>{}</code> = the free demo); only in the Console do the untouched sample rows next to an HS code you typed switch to the live search. <code>OUTPUT.modeReason</code> says which rule picked the mode.

## `autoSwitchToLive` (type: `boolean`):

API only — hidden on the form. Console runs only: on (default), search terms typed next to the untouched sample records start the live search (<code>OUTPUT.switchedToLive</code> names them). An API call never switches — the mode you send is the mode that runs. Off: the Console keeps the sample as the free demo too.

## `failOnSourceError` (type: `boolean`):

API only — hidden on the form. Off (default): a plan that cannot run the source Store Actor ends SUCCEEDED with 0 rows and <code>OUTPUT.ok: false</code>. On: the same run ends FAILED with the same message, so a schedule's or an API pipeline's failed-run alert fires. Turn it on for every schedule.

## `comtradeKey` (type: `string`):

A free subscription key from comtradedeveloper.un.org (the 'comtrade - v1' product). With it the Actor reads the data API under your own quota: bigger calls, faster runs, and the records count against your subscription instead of the public preview. Recommended for every scheduled or repeat run: keyless reads stop at 95,000 records per account and share UN Comtrade's hourly quota per IP. A refused key falls back to the preview. Stored encrypted by Apify, never logged.

## `censusApiKey` (type: `string`):

Free in a minute at api.census.gov/data/key_signup.html (name + e-mail, the key arrives by e-mail). With <code>view: flows</code> the US rows come from the Census Bureau's monthly import data under your key; without it the US comes from UN Comtrade and <code>OUTPUT.refused</code> says so. Stored encrypted by Apify, never logged or written to a row. This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.

## `datasetId` (type: `string`):

Only for <b>dataset</b> mode. Pick the dataset so the Actor is granted read access to it.

## `itemsList` (type: `array`):

Only for <b>list</b> mode. Raw UN Comtrade records as a JSON array — the Comtrade API's fields (<code>reporterCode</code>, <code>partnerCode</code>, <code>cmdCode</code>, <code>flowCode</code>, <code>period</code>, <code>primaryValue</code>, <code>netWgt</code>, <code>qty</code>) or another scraper's (<code>reporter_country</code>, <code>trade_value_usd</code> …). The sample: HS 610910 imports of 5 markets, 2022–2025, real Comtrade figures.

## `discoveryActorId` (type: `string`):

API only — hidden on the form. The Store scraper the fallback runs (see Source Actor input) — the live search itself is the built-in UN Comtrade reader. Any Actor whose rows carry the fields listed in the README works.

## `discoveryInput` (type: `object`):

API only — hidden on the form. The Store-scraper fallback: leave empty (default) and a run that UN Comtrade refuses ends with the reason, nothing charged. Filled, that run starts the Store scraper (Source Actor) with this input on your Apify account instead (billed there, capped by Max source spend) — e.g. <code>{"reporterCountry": "USA", "partnerCountry": "India"}</code> for thirdwatch/trade-data-scraper — and its rows are ranked the same way. Needs a plan that runs Store Actors; a plan that cannot pastes rows into <code>itemsList</code> (<code>list</code> mode).

## `maxToProcess` (type: `integer`):

API only — hidden on the form. How many of the biggest importing markets per run get the partner breakdown (your share, the rivals) — about 1 s of Comtrade reads per 3 markets. Default = 3 × max export markets (at least 30).

## `webhookUrl` (type: `string`):

Ranked export markets are POSTed here as JSON (Zapier, Make, n8n, your CRM). For Google Sheets / Slack you can also use Apify's built-in Integrations tab. Stored encrypted — Zapier / Make hook URLs carry their secret in the path.

## `webhookHeaders` (type: `object`):

Extra HTTP headers for the webhook, e.g. <code>{"Authorization": "Bearer …"}</code>. Stored encrypted by Apify, never logged.

## `webhookBatchSize` (type: `integer`):

API only — hidden on the form. 1 = one POST per export market the moment it is ready. Higher = one POST per N export markets.

## `webhookSecret` (type: `string`):

Any random string. Every webhook POST then carries <code>X-Signature: sha256=\<HMAC-SHA256 of the raw body with this secret></code>, so your endpoint can verify it came from this Actor. Stored encrypted by Apify, never logged.

## `dedupeStoreName` (type: `string`):

API only — hidden on the form. Key-value store used for cross-run memory. Left at the default, the memory is kept per search (source and search terms): rewording <code>goalDescription</code> keeps it, so a scheduled run never re-delivers what you already have, and another search starts its own list. Running it for several clients on one account, type one name per client.

## `discoveryTimeoutSecs` (type: `integer`):

API only — hidden on the form. How long the source Store Actor may run before its partial results are used — never more than 60 % of the run's time left, so the AI, the charges and the digest keep the rest. Raise it (and the run timeout) when the status says the source stopped early.

## `slackWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Slack incoming-webhook URL for the digest.

## `discordWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Discord channel webhook URL for the digest.

## `teamsWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Teams Workflows webhook URL for the digest.

## `googleChatWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Google Chat space webhook URL for the digest.

## `telegramUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. The bot's sendMessage link with its chat_id.

## Actor input object example

```json
{
  "preset": "custom",
  "hsCodes": [
    "610910"
  ],
  "exporterCountry": "IN",
  "view": "markets",
  "minScore": 35,
  "maxQualified": 30,
  "maxDiscoveryChargeUsd": 0.5,
  "enableAi": true,
  "months": 12,
  "flowFrequency": "M",
  "flowPeriods": 1,
  "topSuppliers": 15,
  "minSharePct": 0,
  "includeMirror": true,
  "includeTariffs": true,
  "minImportValueUsd": 1000000,
  "frequency": "A",
  "rivalSuppliers": 5,
  "llmProvider": "apify",
  "aiCandidateMultiplier": 2,
  "dedupeAcrossRuns": true,
  "dedupeTtlDays": 0,
  "historyDatasetName": "",
  "sourceMode": "list",
  "autoSwitchToLive": true,
  "failOnSourceError": false,
  "itemsList": [
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 6565478237,
      "netWgt": 482258394,
      "qty": 2901503772,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 4881051603,
      "netWgt": 388810420,
      "qty": 2326223628,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 4942357447,
      "netWgt": 181050701,
      "qty": 2430334884,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 4864106098,
      "netWgt": 99916492,
      "qty": 2461220868,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 617338990,
      "netWgt": 15133609,
      "qty": 377687856,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 558,
      "partnerDesc": "Nicaragua",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 525067089,
      "netWgt": 13954237,
      "qty": 308907960,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 340,
      "partnerDesc": "Honduras",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 496978611,
      "netWgt": 10749628,
      "qty": 248403120,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 449341042,
      "netWgt": 10300547,
      "qty": 245623056,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 3528183874,
      "netWgt": 152525188,
      "qty": 921465244,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 3191050114,
      "netWgt": 148526886,
      "qty": 807689533,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 2946522022,
      "netWgt": 141149775,
      "qty": 853064915,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 3434767879,
      "netWgt": 154293772,
      "qty": 927100972,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1509632406,
      "netWgt": 89322717,
      "qty": 539701383,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 408303309,
      "netWgt": 12323528,
      "qty": 65947395,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 156,
      "partnerDesc": "China",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 208456884,
      "netWgt": 6143894,
      "qty": 40364300,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 295419949,
      "netWgt": 14438974,
      "qty": 98933383,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 1962389196,
      "netWgt": 89795063,
      "qty": 523494568,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 1836490381,
      "netWgt": 82456082,
      "qty": 441944740,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 1725523874,
      "netWgt": 80593852,
      "qty": 443065358,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1870880478,
      "netWgt": 91051426,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 664790653,
      "netWgt": 45438438,
      "qty": 272583442,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 154480071,
      "netWgt": 4917483,
      "qty": 21789086,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 620,
      "partnerDesc": "Portugal",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 136223041,
      "netWgt": 2370426,
      "qty": 10118137,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 168834659,
      "netWgt": 13242927,
      "qty": 56889039,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 1775827268,
      "netWgt": null,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 1527352885,
      "netWgt": 72565812,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 1468318057,
      "netWgt": 78792148,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1613313972,
      "netWgt": null,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 716143777,
      "netWgt": null,
      "qty": 291131207,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 182568657,
      "netWgt": 5510873,
      "qty": 24118712,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 620,
      "partnerDesc": "Portugal",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 85970368,
      "netWgt": 1176366,
      "qty": 4681342,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 145723630,
      "netWgt": 8158862,
      "qty": 48824106,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 1254035795,
      "netWgt": 108488507,
      "qty": 269600628,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 1119415620,
      "netWgt": 68882111,
      "qty": 227077624,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 1201788264,
      "netWgt": 66224046,
      "qty": 248557653,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1339230500,
      "netWgt": 63502251,
      "qty": 283887078,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 308944487,
      "netWgt": 23683759,
      "qty": 118631629,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 276,
      "partnerDesc": "Germany",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 234690287,
      "netWgt": 7289697,
      "qty": 33571073,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 90994513,
      "netWgt": 2816574,
      "qty": 12567487,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 85779792,
      "netWgt": 4201958,
      "qty": 22879189,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "India exports · HS 610910",
      "reporterCode": 699,
      "reporterDesc": "India",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "X",
      "period": "2025",
      "primaryValue": 1826232307,
      "netWgt": 51505627,
      "qty": 789840586,
      "qtyUnitAbbr": "u"
    }
  ],
  "discoveryActorId": "thirdwatch/trade-data-scraper",
  "discoveryInput": {},
  "webhookBatchSize": 1,
  "dedupeStoreName": "export-market-finder-ai-seen",
  "discoveryTimeoutSecs": 3600
}
```

# Actor output Schema

## `qualified` (type: `string`):

All qualified export markets as JSON, best-scoring first.

## `sheet` (type: `string`):

The same export markets as a spreadsheet.

## `runSummary` (type: `string`):

JSON record: markets loaded → filtered → qualified, skip counts per reason, the run summary, top markets, HS codes resolved (and how), periods read, Comtrade records and calls (the licence counter), charged events and free-tier markets used.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "hsCodes": [
        "610910"
    ],
    "maxDiscoveryChargeUsd": 0.5,
    "sourceMode": "list",
    "itemsList": [
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 6565478237,
            "netWgt": 482258394,
            "qty": 2901503772,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 4881051603,
            "netWgt": 388810420,
            "qty": 2326223628,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 4942357447,
            "netWgt": 181050701,
            "qty": 2430334884,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 4864106098,
            "netWgt": 99916492,
            "qty": 2461220868,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 617338990,
            "netWgt": 15133609,
            "qty": 377687856,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 558,
            "partnerDesc": "Nicaragua",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 525067089,
            "netWgt": 13954237,
            "qty": 308907960,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 340,
            "partnerDesc": "Honduras",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 496978611,
            "netWgt": 10749628,
            "qty": 248403120,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 449341042,
            "netWgt": 10300547,
            "qty": 245623056,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 3528183874,
            "netWgt": 152525188,
            "qty": 921465244,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 3191050114,
            "netWgt": 148526886,
            "qty": 807689533,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 2946522022,
            "netWgt": 141149775,
            "qty": 853064915,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 3434767879,
            "netWgt": 154293772,
            "qty": 927100972,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1509632406,
            "netWgt": 89322717,
            "qty": 539701383,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 408303309,
            "netWgt": 12323528,
            "qty": 65947395,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 156,
            "partnerDesc": "China",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 208456884,
            "netWgt": 6143894,
            "qty": 40364300,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 295419949,
            "netWgt": 14438974,
            "qty": 98933383,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 1962389196,
            "netWgt": 89795063,
            "qty": 523494568,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 1836490381,
            "netWgt": 82456082,
            "qty": 441944740,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 1725523874,
            "netWgt": 80593852,
            "qty": 443065358,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1870880478,
            "netWgt": 91051426,
            "qty": null,
            "qtyUnitAbbr": null
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 664790653,
            "netWgt": 45438438,
            "qty": 272583442,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 154480071,
            "netWgt": 4917483,
            "qty": 21789086,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 620,
            "partnerDesc": "Portugal",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 136223041,
            "netWgt": 2370426,
            "qty": 10118137,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 168834659,
            "netWgt": 13242927,
            "qty": 56889039,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 1775827268,
            "netWgt": null,
            "qty": null,
            "qtyUnitAbbr": null
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 1527352885,
            "netWgt": 72565812,
            "qty": null,
            "qtyUnitAbbr": null
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 1468318057,
            "netWgt": 78792148,
            "qty": null,
            "qtyUnitAbbr": null
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1613313972,
            "netWgt": null,
            "qty": null,
            "qtyUnitAbbr": null
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 716143777,
            "netWgt": null,
            "qty": 291131207,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 182568657,
            "netWgt": 5510873,
            "qty": 24118712,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 620,
            "partnerDesc": "Portugal",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 85970368,
            "netWgt": 1176366,
            "qty": 4681342,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 145723630,
            "netWgt": 8158862,
            "qty": 48824106,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 1254035795,
            "netWgt": 108488507,
            "qty": 269600628,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 1119415620,
            "netWgt": 68882111,
            "qty": 227077624,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 1201788264,
            "netWgt": 66224046,
            "qty": 248557653,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1339230500,
            "netWgt": 63502251,
            "qty": 283887078,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 308944487,
            "netWgt": 23683759,
            "qty": 118631629,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 276,
            "partnerDesc": "Germany",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 234690287,
            "netWgt": 7289697,
            "qty": 33571073,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 90994513,
            "netWgt": 2816574,
            "qty": 12567487,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 85779792,
            "netWgt": 4201958,
            "qty": 22879189,
            "qtyUnitAbbr": "u"
        },
        {
            "name": "India exports · HS 610910",
            "reporterCode": 699,
            "reporterDesc": "India",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "X",
            "period": "2025",
            "primaryValue": 1826232307,
            "netWgt": 51505627,
            "qty": 789840586,
            "qtyUnitAbbr": "u"
        }
    ],
    "discoveryInput": {}
};

// Run the Actor and wait for it to finish
const run = await client.actor("rich_minds/export-market-finder-ai").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "hsCodes": ["610910"],
    "maxDiscoveryChargeUsd": 0.5,
    "sourceMode": "list",
    "itemsList": [
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 6565478237,
            "netWgt": 482258394,
            "qty": 2901503772,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 4881051603,
            "netWgt": 388810420,
            "qty": 2326223628,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 4942357447,
            "netWgt": 181050701,
            "qty": 2430334884,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 4864106098,
            "netWgt": 99916492,
            "qty": 2461220868,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 617338990,
            "netWgt": 15133609,
            "qty": 377687856,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 558,
            "partnerDesc": "Nicaragua",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 525067089,
            "netWgt": 13954237,
            "qty": 308907960,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 340,
            "partnerDesc": "Honduras",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 496978611,
            "netWgt": 10749628,
            "qty": 248403120,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "USA · HS 610910",
            "reporterCode": 842,
            "reporterDesc": "USA",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 449341042,
            "netWgt": 10300547,
            "qty": 245623056,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 3528183874,
            "netWgt": 152525188,
            "qty": 921465244,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 3191050114,
            "netWgt": 148526886,
            "qty": 807689533,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 2946522022,
            "netWgt": 141149775,
            "qty": 853064915,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 3434767879,
            "netWgt": 154293772,
            "qty": 927100972,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1509632406,
            "netWgt": 89322717,
            "qty": 539701383,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 408303309,
            "netWgt": 12323528,
            "qty": 65947395,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 156,
            "partnerDesc": "China",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 208456884,
            "netWgt": 6143894,
            "qty": 40364300,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Germany · HS 610910",
            "reporterCode": 276,
            "reporterDesc": "Germany",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 295419949,
            "netWgt": 14438974,
            "qty": 98933383,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 1962389196,
            "netWgt": 89795063,
            "qty": 523494568,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 1836490381,
            "netWgt": 82456082,
            "qty": 441944740,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 1725523874,
            "netWgt": 80593852,
            "qty": 443065358,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1870880478,
            "netWgt": 91051426,
            "qty": None,
            "qtyUnitAbbr": None,
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 664790653,
            "netWgt": 45438438,
            "qty": 272583442,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 154480071,
            "netWgt": 4917483,
            "qty": 21789086,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 620,
            "partnerDesc": "Portugal",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 136223041,
            "netWgt": 2370426,
            "qty": 10118137,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "France · HS 610910",
            "reporterCode": 251,
            "reporterDesc": "France",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 168834659,
            "netWgt": 13242927,
            "qty": 56889039,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 1775827268,
            "netWgt": None,
            "qty": None,
            "qtyUnitAbbr": None,
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 1527352885,
            "netWgt": 72565812,
            "qty": None,
            "qtyUnitAbbr": None,
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 1468318057,
            "netWgt": 78792148,
            "qty": None,
            "qtyUnitAbbr": None,
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1613313972,
            "netWgt": None,
            "qty": None,
            "qtyUnitAbbr": None,
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 716143777,
            "netWgt": None,
            "qty": 291131207,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 182568657,
            "netWgt": 5510873,
            "qty": 24118712,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 620,
            "partnerDesc": "Portugal",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 85970368,
            "netWgt": 1176366,
            "qty": 4681342,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "United Kingdom · HS 610910",
            "reporterCode": 826,
            "reporterDesc": "United Kingdom",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 145723630,
            "netWgt": 8158862,
            "qty": 48824106,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2022",
            "primaryValue": 1254035795,
            "netWgt": 108488507,
            "qty": 269600628,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2023",
            "primaryValue": 1119415620,
            "netWgt": 68882111,
            "qty": 227077624,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2024",
            "primaryValue": 1201788264,
            "netWgt": 66224046,
            "qty": 248557653,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 1339230500,
            "netWgt": 63502251,
            "qty": 283887078,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 50,
            "partnerDesc": "Bangladesh",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 308944487,
            "netWgt": 23683759,
            "qty": 118631629,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 276,
            "partnerDesc": "Germany",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 234690287,
            "netWgt": 7289697,
            "qty": 33571073,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 792,
            "partnerDesc": "Türkiye",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 90994513,
            "netWgt": 2816574,
            "qty": 12567487,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "Netherlands · HS 610910",
            "reporterCode": 528,
            "reporterDesc": "Netherlands",
            "partnerCode": 699,
            "partnerDesc": "India",
            "cmdCode": "610910",
            "flowCode": "M",
            "period": "2025",
            "primaryValue": 85779792,
            "netWgt": 4201958,
            "qty": 22879189,
            "qtyUnitAbbr": "u",
        },
        {
            "name": "India exports · HS 610910",
            "reporterCode": 699,
            "reporterDesc": "India",
            "partnerCode": 0,
            "partnerDesc": "World",
            "cmdCode": "610910",
            "flowCode": "X",
            "period": "2025",
            "primaryValue": 1826232307,
            "netWgt": 51505627,
            "qty": 789840586,
            "qtyUnitAbbr": "u",
        },
    ],
    "discoveryInput": {},
}

# Run the Actor and wait for it to finish
run = client.actor("rich_minds/export-market-finder-ai").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "hsCodes": [
    "610910"
  ],
  "maxDiscoveryChargeUsd": 0.5,
  "sourceMode": "list",
  "itemsList": [
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 6565478237,
      "netWgt": 482258394,
      "qty": 2901503772,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 4881051603,
      "netWgt": 388810420,
      "qty": 2326223628,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 4942357447,
      "netWgt": 181050701,
      "qty": 2430334884,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 4864106098,
      "netWgt": 99916492,
      "qty": 2461220868,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 617338990,
      "netWgt": 15133609,
      "qty": 377687856,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 558,
      "partnerDesc": "Nicaragua",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 525067089,
      "netWgt": 13954237,
      "qty": 308907960,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 340,
      "partnerDesc": "Honduras",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 496978611,
      "netWgt": 10749628,
      "qty": 248403120,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "USA · HS 610910",
      "reporterCode": 842,
      "reporterDesc": "USA",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 449341042,
      "netWgt": 10300547,
      "qty": 245623056,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 3528183874,
      "netWgt": 152525188,
      "qty": 921465244,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 3191050114,
      "netWgt": 148526886,
      "qty": 807689533,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 2946522022,
      "netWgt": 141149775,
      "qty": 853064915,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 3434767879,
      "netWgt": 154293772,
      "qty": 927100972,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1509632406,
      "netWgt": 89322717,
      "qty": 539701383,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 408303309,
      "netWgt": 12323528,
      "qty": 65947395,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 156,
      "partnerDesc": "China",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 208456884,
      "netWgt": 6143894,
      "qty": 40364300,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Germany · HS 610910",
      "reporterCode": 276,
      "reporterDesc": "Germany",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 295419949,
      "netWgt": 14438974,
      "qty": 98933383,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 1962389196,
      "netWgt": 89795063,
      "qty": 523494568,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 1836490381,
      "netWgt": 82456082,
      "qty": 441944740,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 1725523874,
      "netWgt": 80593852,
      "qty": 443065358,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1870880478,
      "netWgt": 91051426,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 664790653,
      "netWgt": 45438438,
      "qty": 272583442,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 154480071,
      "netWgt": 4917483,
      "qty": 21789086,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 620,
      "partnerDesc": "Portugal",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 136223041,
      "netWgt": 2370426,
      "qty": 10118137,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "France · HS 610910",
      "reporterCode": 251,
      "reporterDesc": "France",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 168834659,
      "netWgt": 13242927,
      "qty": 56889039,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 1775827268,
      "netWgt": null,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 1527352885,
      "netWgt": 72565812,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 1468318057,
      "netWgt": 78792148,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1613313972,
      "netWgt": null,
      "qty": null,
      "qtyUnitAbbr": null
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 716143777,
      "netWgt": null,
      "qty": 291131207,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 182568657,
      "netWgt": 5510873,
      "qty": 24118712,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 620,
      "partnerDesc": "Portugal",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 85970368,
      "netWgt": 1176366,
      "qty": 4681342,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "United Kingdom · HS 610910",
      "reporterCode": 826,
      "reporterDesc": "United Kingdom",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 145723630,
      "netWgt": 8158862,
      "qty": 48824106,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2022",
      "primaryValue": 1254035795,
      "netWgt": 108488507,
      "qty": 269600628,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2023",
      "primaryValue": 1119415620,
      "netWgt": 68882111,
      "qty": 227077624,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2024",
      "primaryValue": 1201788264,
      "netWgt": 66224046,
      "qty": 248557653,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 1339230500,
      "netWgt": 63502251,
      "qty": 283887078,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 50,
      "partnerDesc": "Bangladesh",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 308944487,
      "netWgt": 23683759,
      "qty": 118631629,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 276,
      "partnerDesc": "Germany",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 234690287,
      "netWgt": 7289697,
      "qty": 33571073,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 792,
      "partnerDesc": "Türkiye",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 90994513,
      "netWgt": 2816574,
      "qty": 12567487,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "Netherlands · HS 610910",
      "reporterCode": 528,
      "reporterDesc": "Netherlands",
      "partnerCode": 699,
      "partnerDesc": "India",
      "cmdCode": "610910",
      "flowCode": "M",
      "period": "2025",
      "primaryValue": 85779792,
      "netWgt": 4201958,
      "qty": 22879189,
      "qtyUnitAbbr": "u"
    },
    {
      "name": "India exports · HS 610910",
      "reporterCode": 699,
      "reporterDesc": "India",
      "partnerCode": 0,
      "partnerDesc": "World",
      "cmdCode": "610910",
      "flowCode": "X",
      "period": "2025",
      "primaryValue": 1826232307,
      "netWgt": 51505627,
      "qty": 789840586,
      "qtyUnitAbbr": "u"
    }
  ],
  "discoveryInput": {}
}' |
apify call rich_minds/export-market-finder-ai --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rich_minds/export-market-finder-ai"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zOeBna9zkRb3rufFp/builds/wlJefmyto8OdWOk2B/openapi.json
