# UK Importers & Exporters Finder: HMRC Traders by HS Code (`moment-data/uk-importers-exporters-finder`) Actor

Find UK companies that import or export a product, by HS / CN8 commodity code or keyword, from HMRC's official uktradeinfo traders data (monthly, OGL). Post town, postcode district, trade profile, new-importer signal. Organisations only, no API key.

- **URL**: https://apify.com/moment-data/uk-importers-exporters-finder.md
- **Developed by:** [Luke Miller](https://apify.com/moment-data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 trader records

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

## UK Importers & Exporters Finder: HMRC Traders by HS Code (official, no key)

Find **UK companies that import or export a product**. Search by **HS / CN8 commodity code** (or a product keyword) and get back the companies HMRC lists as trading that code each month. Each record has the company name, post town, postcode district, the matching commodity codes and months, and the company's wider **import/export profile**.

The data comes from **HM Revenue & Customs' uktradeinfo traders data**, read through HMRC's official open API (`api.uktradeinfo.com`). It's published monthly under the **Open Government Licence v3.0**. No API key, no login, no scraping of a private site.

Main uses: **importer lead lists** for freight forwarders, customs brokers, 3PLs, trade-finance, FX, insurance and packaging sellers; **competitor and supplier research**; and a **"new importer" signal** (companies that started importing a product this month).

**Organisations only.** HMRC's list also includes sole traders and individuals. Their records are **dropped**: only names with a clear organisation marker (Ltd, PLC, LLP, GmbH, Co, Group, University...) are returned. Street address lines are never output. You get the post town, county and postcode district only.

### Who it's for

- **Freight forwarders, customs brokers, 3PL and fulfilment:** every UK importer of furniture (9403), wine (2204) or bicycles (8712) in your postcode areas, refreshed monthly.
- **B2B sales (trade finance, FX payments, cargo insurance, packaging, compliance software):** companies that import at all, ranked with their HS chapters so you can tailor the pitch.
- **Brands and manufacturers:** who else imports your product category in the UK, and who just started (`newTradersOnly`).
- **Analysts and journalists:** company-level who-trades-what, straight from HMRC.

### Output (one record per company)

`traderId`, `companyName` (fixed-width splits like "LIM ITED" repaired), `companyNameRaw`, `flows` (import / export), `postTown`, `county`, `postcodeDistrict`, `postcodeArea`, `matchedCommodityCount`, `matchedCommodities[]` (code, level CN8/HS2, description, flows, months), `matchedHs4Codes[]`, `monthsActive[]`, `firstMonthActive`, `lastMonthActive`, `isNewTrader` (when `newTradersOnly`), `newTraderLookbackMonths`, plus the trade profile (`isImporter`, `isExporter`, `importCn8Count`, `exportCn8Count`, `importChapters[]`, `exportChapters[]`), `windowStart`, `windowEnd`, `companiesHouseSearchUrl`, `source`, `licence`, `retrievedAt`.

Sample (input `{"commodityCodes":["2204"],"postcodeAreas":["EH","G"],"maxItems":3}`; see `sample-output.json`):

```json
{
  "traderId": 4763,
  "companyName": "CHIVAS BROTHERS LIMITED",
  "flows": [
    "import"
  ],
  "postTown": "Dumbarton",
  "county": null,
  "postcodeDistrict": "G82",
  "postcodeArea": "G",
  "matchedCommodityCount": 1,
  "matchedHs4Codes": [
    "2204"
  ],
  "monthsActive": [
    "2026-09"
  ],
  "isNewTrader": null,
  "isImporter": true,
  "isExporter": false,
  "importCn8Count": 22,
  "exportCn8Count": 0,
  "windowStart": "2026-09",
  "windowEnd": "2026-09",
  "companiesHouseSearchUrl": "https://find-and-update.company-information.service.gov.uk/search/companies?q=CHIVAS%20BROTHERS",
  "matchedCommodities": [
    {
      "code": "22041011",
      "level": "CN8",
      "description": "Champagne, with PDO",
      "flows": [
        "import"
      ],
      "months": [
        "2026-09"
      ]
    }
  ],
  "importChapters": [
    "22 Beverages, spirits and vinegar",
    "39 Plastics and plastic products",
    "44 Wood and articles of wood; wood charcoal",
    "..."
  ]
}
```

### Input

| Field | What it does |
|---|---|
| `commodityCodes` | 2-8 digit HS/CN8 codes or prefixes: `84` (chapter), `8471` (heading), `847130`, `84713000`. Empty = a sample across 6 popular headings |
| `productKeywords` | Words matched to official CN8 descriptions (`bicycle`, `coffee`, `solar`). The codes found are listed in OUTPUT |
| `flow` | `import` (default), `export` or `both` |
| `monthsBack` / `fromMonth` / `toMonth` | Latest published month by default; up to 24 months back, or an explicit `YYYY-MM` range |
| `newTradersOnly`, `lookbackMonths` | Only companies with **no** trade in these codes in the previous N months (default 12): new importers/exporters |
| `postcodeAreas` / `postcodeDistricts` | `M`, `LS`, `EC`, `G`, `BT` / `M1`, `LS11`, `EC1V` |
| `nameKeywords` / `excludeNameKeywords` | Keep or drop names containing words (e.g. drop `logistics`, `freight`, `customs` to skip forwarders) |
| `includeTradeProfile` | Adds the full import/export profile for the window (default on) |
| `maxItems` | Companies to return (default 30) |
| `maxRowsToScan` | Safety cap on rows read from HMRC (default 30,000) |
| `mode` / `stateKey` | `window` (default, stateless) or `sinceLastRun`: skip companies already delivered for that state key. Good for a monthly schedule |

Examples:

- Wine importers in London and the South East: `{"commodityCodes":["2204"],"postcodeAreas":["E","EC","N","NW","SE","SW","W","WC","BN","GU","RH","TN","ME","CT"],"maxItems":500}`
- Companies that **started** importing furniture this month: `{"commodityCodes":["9403"],"newTradersOnly":true,"lookbackMonths":12,"maxItems":200}`
- Bicycle and e-bike importers and exporters, last 6 months, no forwarders: `{"commodityCodes":["8711","8712","8714"],"flow":"both","monthsBack":6,"excludeNameKeywords":["logistics","freight","shipping","customs"],"maxItems":1000}`
- Monthly delta of new cosmetics importers for a CRM: `{"commodityCodes":["3304"],"mode":"sinceLastRun","stateKey":"cosmetics","maxItems":2000}`

### Pricing (pay per event)

- `apify-actor-start`: $0.005 per run
- `trader-record`: **$0.004 per company returned**

The default `{}` run (30 companies) costs about **$0.125**. 1,000 importers cost about $4. Set a maximum charge on the run and the Actor stops cleanly when it's reached.

### Data notes and limits

- **Source and licence:** HMRC uktradeinfo traders data via the official open API ([documentation](https://www.uktradeinfo.com/api-documentation)), Open Government Licence v3.0. The source is credited in every record. This Actor is not affiliated with HMRC.
- **What HMRC publishes:** which VAT-registered businesses imported or exported goods under which commodity codes in each month. **No values, quantities or countries per trader** (HMRC doesn't publish them). Some rows are only at HS2 chapter level (`level: "HS2"`). Businesses can ask HMRC not to be listed, so coverage isn't complete.
- **Timing:** monthly, about 6-7 weeks after the month ends (the run OUTPUT shows the latest published month).
- **Rate limit:** HMRC allows 60 requests per minute, so the Actor stays just under one request per second. A default run takes about 10-20 s. Large runs read 1,000 rows per request.
- **Keywords vs codes:** keyword matching uses official descriptions, so `bicycle` also matches bicycle tyres and lamps. Use codes for precise lists.
- **Privacy:** individuals and sole traders are dropped by an organisation-name screen. It's conservative: some small businesses with person-like names are dropped too (counted in OUTPUT `dropped`). No street lines are output.

### FAQ

**Is this like ImportYeti / bill-of-lading data?** No. Those show US customs shipments. This is the **UK**: HMRC's official list of which companies traded which commodity codes, with no shipment details. It's also legal, open data under OGL.

**Can I get contact details?** No. Use `companiesHouseSearchUrl` to look up the company on Companies House, or pair the list with our UK Company List Builder.

# Actor input Schema

## `commodityCodes` (type: `array`):

2-8 digit codes or prefixes: chapter (84), HS4 heading (8471), HS6 (847130) or CN8 (84713000). Examples: 2204 wine, 8471 computers, 3304 cosmetics, 9403 furniture, 6109 T-shirts, 8712 bicycles, 8703 cars. Leave empty (and no keywords) for a sample across six popular headings.

## `productKeywords` (type: `array`):

Words matched against official CN8 commodity descriptions (English), e.g. 'bicycle', 'coffee', 'solar'. Matching codes are added to the search (listed in the run OUTPUT). Codes are more precise than keywords.

## `flow` (type: `string`):

Find importers, exporters or both.

## `monthsBack` (type: `integer`):

Number of most recent published months to search (HMRC publishes trader data monthly, about 6-7 weeks after month end). Ignored if fromMonth is set.

## `fromMonth` (type: `string`):

Optional start month, e.g. 2026-01.

## `toMonth` (type: `string`):

Optional end month (default: latest published month).

## `newTradersOnly` (type: `boolean`):

Only companies that traded these codes in the window but NOT in the previous lookbackMonths months - a 'just started importing X' signal.

## `lookbackMonths` (type: `integer`):

How far back to check for previous trade when newTradersOnly is on.

## `postcodeAreas` (type: `array`):

1-2 letter UK postcode areas, e.g. M (Manchester), LS (Leeds), B (Birmingham), EC, G (Glasgow), BT (Northern Ireland).

## `postcodeDistricts` (type: `array`):

Outward codes, e.g. M1, LS11, EC1V.

## `nameKeywords` (type: `array`):

Keep only companies whose name contains one of these words, e.g. 'wine', 'cycles'.

## `excludeNameKeywords` (type: `array`):

Drop names containing these words, e.g. 'logistics', 'freight', 'customs' (to skip forwarders).

## `includeTradeProfile` (type: `boolean`):

Adds each company's full import/export profile for the window (number of CN8 codes, HS chapters). Costs a few extra API calls per 15 companies.

## `maxItems` (type: `integer`):

Maximum companies to return. You pay per company record.

## `maxRowsToScan` (type: `integer`):

Safety cap on trader x commodity x month rows read from HMRC (the API allows 60 requests/minute; 1,000 rows per request).

## `mode` (type: `string`):

window = every matching company. sinceLastRun = skip companies already delivered for this stateKey (stored in a named key-value store), ideal for a monthly schedule.

## `stateKey` (type: `string`):

Separate delta memory per saved search (sinceLastRun mode only).

## Actor input object example

```json
{
  "commodityCodes": [
    "2204"
  ],
  "flow": "import",
  "monthsBack": 1,
  "newTradersOnly": false,
  "lookbackMonths": 12,
  "includeTradeProfile": true,
  "maxItems": 30,
  "maxRowsToScan": 30000,
  "mode": "window",
  "stateKey": "default"
}
```

# Actor output Schema

## `traders` (type: `string`):

One record per company.

## `summary` (type: `string`):

Window, codes searched, rows scanned, drops, requests.

# 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 = {
    "commodityCodes": [
        "2204"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("moment-data/uk-importers-exporters-finder").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 = { "commodityCodes": ["2204"] }

# Run the Actor and wait for it to finish
run = client.actor("moment-data/uk-importers-exporters-finder").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 '{
  "commodityCodes": [
    "2204"
  ]
}' |
apify call moment-data/uk-importers-exporters-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moment-data/uk-importers-exporters-finder"
        }
    }
}
```

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/bVTq0MZhqqt527x0U/builds/CcauPoWL34vMTevOR/openapi.json
