# UK Trade Tariff — Commodity Codes & Duty Rates (`sourcerow/uk-trade-tariff`) Actor

Look up UK commodity codes — what the goods are, the third-country duty rate, VAT, trade preferences, quotas and import controls, from the official UK Trade Tariff service.

- **URL**: https://apify.com/sourcerow/uk-trade-tariff.md
- **Developed by:** [SourceRow](https://apify.com/sourcerow) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 commodity resolveds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Look up UK commodity codes and what it costs to import: the third-country duty
rate, VAT, trade preferences, quotas, and the import controls that apply before
the goods can move at all.

### What it does

Give it a commodity code. It returns what the goods are, where the code sits in
the tariff hierarchy, and the numbers that determine the landed cost. One row
per code, 26 fields on every row.

### What you get

26 fields per row, including `commodity_code`, `description`, `chapter`,
`third_country_duty`, `vat_rate`, `preferences_count`, `preference_areas`,
`controls_count`, `quotas_count`, `quotas_apply`, `measures_count` and
`declarable`.

The table view shows 11 of them; all 26 are in the JSON, CSV and Excel
downloads.

### Input

| Field | Meaning |
|---|---|
| `commodityCodes` | Ten-digit UK commodity codes. |
| `codesText` | A pasted list instead, one per line. |
| `maxCommodities` | Stop after this many. `0` removes the cap. |

```json
{
  "codesText": "0901110000\n8703231900\n6109100010",
  "maxCommodities": 50
}
```

### Sample output

One complete record:

```json
{
  "query": "0901110000",
  "commodity_code": "0901110000",
  "description": "Not decaffeinated",
  "chapter": "COFFEE, TEA, MATÉ AND SPICES",
  "third_country_duty": "0.00 %",
  "vat_rate": "0.00 %",
  "preferences_count": 54,
  "controls_count": 2,
  "quotas_count": 0,
  "measures_count": 61,
  "issues": "import_controls_apply"
}
```

### Pricing

| Event | Per 1,000 | Notes |
|---|---|---|
| Commodity resolved | $4.00 | Codes that find nothing are not charged |

There is no start fee and no per-row dataset fee.

### What it does not do

**It does not tell you whether you qualify for a preference.**
`preference_areas` lists which trade agreements reduce the rate. Whether a
particular shipment qualifies depends on rules of origin, which no code lookup
can answer.

**It does not classify goods.** Choosing the right commodity code for a product
is a judgement with legal consequences. This Actor tells you what a code means,
not which code to use.

**Quota rates depend on timing.** `quotas_apply` means a reduced rate exists
until the quota is exhausted. Whether it is still open when the goods arrive is
not in this data.

**Headings are not declarable.** `not_declarable_on_its_own` means the code is a
branch of the hierarchy, not a leaf. A more specific code is needed to declare.

### Notes

Check `controls_count` before `third_country_duty`. A licence you do not hold
costs more than a duty you do pay.

`issues` reports `import_controls_apply` whenever controls exist. That flag is
the one to read first on any code you have not imported before.

The UK Trade Tariff changes as measures are added and withdrawn. Every run
queries the service directly; nothing is cached between runs.

### Support

Open the **Issues** tab with the specific commodity code and the `issues` value
from the row.

### Licence and attribution

Tariff data from the UK Trade Tariff service, operated by HM Revenue & Customs.
Contains public sector information licensed under the Open Government Licence
v3.0. HMRC does not endorse this Actor.

# Actor input Schema

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

Ten-digit commodity codes. Shorter codes are padded with zeros, and spaces or dots are cleaned up for you.

## `codesText` (type: `string`):

Paste a list here instead, one per line or comma-separated.

## `maxCommodities` (type: `integer`):

Stop after this many. **0 removes the cap.**

## Actor input object example

```json
{
  "commodityCodes": [
    "0901110000",
    "8703231900",
    "6109100010"
  ],
  "maxCommodities": 50
}
```

# Actor output Schema

## `commodities` (type: `string`):

No description

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

No description

# 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": [
        "0901110000",
        "8703231900",
        "6109100010"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sourcerow/uk-trade-tariff").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": [
        "0901110000",
        "8703231900",
        "6109100010",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("sourcerow/uk-trade-tariff").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": [
    "0901110000",
    "8703231900",
    "6109100010"
  ]
}' |
apify call sourcerow/uk-trade-tariff --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sourcerow/uk-trade-tariff"
        }
    }
}

```

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/3LcUhhn24cMbEdgyY/builds/SsZm683BMFQlDMBHH/openapi.json
