# Tariff & HS Code Lookup: US HTS and UK Import Duty Rates (`nightwave-owner/tariff-hs-code-lookup`) Actor

Returns import duty rates for HS and HTS codes: look up codes or search by product word in the US Harmonized Tariff Schedule (general, special and column 2 rates, units, footnotes) or the UK Trade Tariff (third country duty, VAT, preferential rates, supplementary unit).

- **URL**: https://apify.com/nightwave-owner/tariff-hs-code-lookup.md
- **Developed by:** [Viktor Wiberg](https://apify.com/nightwave-owner) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 tariff lines

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

## Tariff & HS Code Lookup: US HTS and UK Import Duty Rates

Every product that crosses a border is classified under a tariff code. The first six digits are the international Harmonized System (HS), and each country adds its own digits and its own duty rates: the US in the Harmonized Tariff Schedule of the United States (HTSUS, usually called HTS), the UK in the UK Global Tariff.

This actor looks up those codes in the official open sources and returns one clean row per tariff line, with the description, the duty rates, the unit of quantity and the footnotes. Give it codes you already have, or search by a product word. Use it to fill in duty rates in a product catalogue or landed cost calculation, to check the codes on supplier invoices, to compare the US and UK rate for the same HS code, or to get told when a rate changes.

It covers two tariffs:

- **us**: the Harmonized Tariff Schedule of the United States from the U.S. International Trade Commission (USITC). General (normal trade relations) rate, special rate with the trade program codes, column 2 rate, units and footnotes.
- **uk**: the UK Trade Tariff from GOV.UK. Third country duty (the UK Global Tariff rate), VAT, preferential rates per country or trade agreement, supplementary unit, additional duties and footnotes.

### Example from a real run

Run `gdHWu7Q9GVUItMcXf` on Apify on 5 October 2026, with this input:

```json
{
  "codes": ["8471.30.01.00", "0901.21.00", "6109.10.00"]
}
```

It returned 25 lines in 3 seconds of run time: the laptop line, the roasted coffee line with its 8 statistical lines, and the cotton T-shirt line with its 14 statistical lines. The first three rows from the dataset, with the long `fullDescription` and `headingDescription` left out here:

```json
[
  {
    "code": "8471.30.01.00",
    "country": "us",
    "description": "Portable automatic data processing machines, weighing not more than 10 kg, consisting of at least a central processing unit, a keyboard and a display",
    "unit": "No.",
    "generalRate": "Free",
    "specialRate": null,
    "column2Rate": "35%",
    "footnotes": [],
    "parentCode": "8471",
    "sourceUrl": "https://hts.usitc.gov/search?query=8471.30.01.00",
    "source": "USITC Harmonized Tariff Schedule of the United States, 2026 HTS Revision 20"
  },
  {
    "code": "0901.21.00",
    "country": "us",
    "description": "Not decaffeinated",
    "unit": null,
    "generalRate": "Free",
    "specialRate": null,
    "column2Rate": "Free",
    "parentCode": "0901"
  },
  {
    "code": "0901.21.00.15",
    "country": "us",
    "description": "Certified organic",
    "fullDescription": "Coffee, whether or not roasted or decaffeinated; coffee husks and skins; coffee substitutes containing coffee in any proportion > Coffee, roasted > Not decaffeinated > In retail containers weighing 2 kg or less > Arabica > Certified organic",
    "unit": "kg",
    "generalRate": "Free",
    "specialRate": null,
    "column2Rate": "Free",
    "parentCode": "0901.21.00"
  }
]
```

A UK row from run `dHTJ5mauY1ESE2E1q` on the same day (input `{"country": "uk", "codes": ["0902", "6109"], "onlyNew": true}`, 8 lines), with the list of 56 preferential rates and the footnotes shortened:

```json
{
  "code": "6109100010",
  "country": "uk",
  "description": "T-shirts",
  "fullDescription": "T-shirts, singlets and other vests, knitted or crocheted > Of cotton > T-shirts",
  "headingDescription": "T-shirts, singlets and other vests, knitted or crocheted",
  "chapterDescription": "Articles of apparel and clothing accessories, knitted or crocheted",
  "unit": "items (p/st)",
  "generalRate": "12.00%",
  "thirdCountryDuty": "12.00%",
  "vatRate": "0.00%, 20.00%",
  "supplementaryUnit": "items (p/st)",
  "preferentialRates": [
    { "area": "AL", "areaName": "Albania", "rate": "0.00%" },
    { "area": "AD", "areaName": "Andorra", "rate": "0.00%" }
  ],
  "additionalDuties": "35.00% (Belarus); 35.00% (Russia)",
  "footnotes": ["TN207: The Democratic People’s Republic of Korea (Sanctions) (EU Exit) Regulations 2019 impose trade ..."],
  "parentCode": "6109100000",
  "sourceUrl": "https://www.trade-tariff.service.gov.uk/commodities/6109100010",
  "source": "UK Trade Tariff (GOV.UK)",
  "license": "Contains public sector information licensed under the Open Government Licence v3.0."
}
```

The VAT field holds two rates because UK VAT on clothing depends on the goods: children's clothing is zero rated, other clothing pays the standard 20 %. The same input run again right after (run `CAxhfXw2DJydnRHvw`) returned 0 lines, since no rate had changed. See "Monitoring and scheduling".

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `country` | string | `us` | `us` for the US HTS, `uk` for the UK Trade Tariff. |
| `codes` | array | | Codes with 4 to 10 digits, with or without dots: `8471`, `8471.30`, `0901210000`. A short code returns every line under it. Trailing zeros are read as padding, so `8471000000` is heading 8471. |
| `search` | string | | A product word, for example `coffee`. Uses the search of the official source. Can be combined with `codes`. |
| `maxResults` | integer | `50` | Maximum number of lines, 1 to 5 000. |
| `onlyNew` | boolean | `false` | Return only lines that are new or whose rates changed since earlier runs with the same input. |

With empty input the actor returns heading 8471 (computers) in the US tariff: 38 lines in 9 seconds in a test on 5 October 2026 (run `8d2QBxpooSXSing2u`).

Example input: every UK line for roasted coffee and green tea.

```json
{
  "country": "uk",
  "codes": ["0901.21", "0902.10"]
}
```

Example input: search the US tariff.

```json
{
  "country": "us",
  "search": "coffee",
  "maxResults": 20
}
```

### Output

| Field | us | uk | Description |
|---|---|---|---|
| `code` | yes | yes | The tariff code as the source writes it: `8471.30.01.00` in the US, `8471300000` in the UK |
| `country` | yes | yes | `us` or `uk` |
| `description` | yes | yes | Description of the line itself, often just "Other" |
| `fullDescription` | yes | yes | Every description from the heading down to the line, joined with `>`, so "Other" gets its meaning |
| `headingDescription` | yes | yes | Description of the 4 digit heading |
| `chapterDescription` | | yes | Title of the chapter. `null` for the US, since the USITC API has no chapter titles |
| `unit` | yes | yes | Unit of quantity (US) or supplementary unit (UK), for example `kg`, `No.`, `items (p/st)` |
| `generalRate` | yes | yes | The normal rate: column 1 general in the US, third country duty in the UK |
| `specialRate` | yes | | US special rate with the codes of the trade programs that give it, for example `Free (A+,AU,BH,CL,CO,...)` |
| `column2Rate` | yes | | US column 2 rate, for countries without normal trade relations (today Cuba, North Korea, Russia and Belarus) |
| `thirdCountryDuty` | | yes | UK Global Tariff rate for countries without a preference |
| `vatRate` | | yes | UK import VAT. Several rates when VAT depends on the goods |
| `supplementaryUnit` | | yes | UK supplementary unit for the customs declaration |
| `preferentialRates` | | yes | UK preferential rates: `area` (country or group code), `areaName`, `rate` |
| `additionalDuties` | yes | yes | Additional, anti-dumping or retaliatory duties the source lists on the line, with the country |
| `footnotes` | yes | yes | Footnotes as plain text |
| `parentCode` | yes | yes | The line above. UK grouping lines that share a code are written with their product line suffix, `0901210000-10`, as GOV.UK does |
| `sourceUrl` | yes | yes | Link to the line on the official site |
| `source` | yes | yes | The official source of the line. The US source names the HTS revision, for example `USITC Harmonized Tariff Schedule, 2026 Revision 20` |
| `license` | yes | yes | The license of the data: US Government work (17 U.S.C. 105) or the Open Government Licence v3.0 attribution for UK rows |
| `retrievedAt` | yes | yes | When the line was read |

US statistical lines (10 digits) show the rates of the 8 digit line they belong to, the way the printed schedule is read. Rates are given as text exactly as the source writes them (`Free`, `6.00%`, `1.5¢/kg`), since many duties are specific or compound and do not fit in a number.

### Monitoring and scheduling

Set `onlyNew` to `true` to watch a set of codes. The actor then remembers which lines it has delivered for the same input, in a named key-value store in your Apify account (`nightwave-state-tariff-hs-code-lookup`, one record per input). The key of a line is the country, the code and a hash of its rates (general, special, column 2, third country duty, VAT, preferential rates and additional duties). A line comes again only when one of its rates changes, or when a new line appears under your codes. Changes to descriptions or footnotes alone do not count. Each run returns and charges only those lines. The first run returns everything. A run without changes finishes successfully with 0 rows.

`onlyNew` and `maxResults` are not part of the remembered input, so you can change them without starting over. Changing any other field starts a fresh state. To start over with the same input, delete the record in the key-value store.

A second run straight after the first, with `onlyNew` and the same input, returns 0 rows and is not charged, since no rate has changed in between.

Example: a daily check at 07:00 of the lines your company imports under. In Apify Console, open **Schedules**, create a schedule with the cron expression `0 7 * * *` and add this actor with the input below.

```json
{
  "country": "uk",
  "codes": ["0901.21", "6109.10", "8471.30"],
  "onlyNew": true
}
```

The same schedule through the Apify API:

```sh
curl -X POST "https://api.apify.com/v2/schedules?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"name": "daily-tariff-check", "cronExpression": "0 7 * * *", "timezone": "Europe/London", "isEnabled": true, "isExclusive": true,
       "actions": [{"type": "RUN_ACTOR", "actorId": "nightwave-owner~tariff-hs-code-lookup",
                    "runInput": {"contentType": "application/json; charset=utf-8", "body": "<the input above as a JSON string>"}}]}'
```

The USITC publishes a new HTS revision whenever duties change: revision 20 of 2026 took effect on 28 September 2026. The UK tariff changes when trade agreements, suspensions or trade remedies start or end. Connect the schedule to a webhook or an email integration in Apify to hear about it the same day.

### Use cases

- **Landed cost:** fill in the duty rate and VAT for each product in a catalogue or quote, so the price at the border is known before the goods are ordered.
- **Classification check:** compare the codes on supplier invoices and customs declarations with the official description of the line, and find codes that do not exist or describe something else.
- **Tariff change monitoring:** a daily run with `onlyNew` on the codes you import under, which returns a line only when its duty, VAT or preferential rate changes.
- **US and UK side by side:** the same 6 digit HS code in both tariffs, to compare the rates in two markets.

### Limitations

- **This is a lookup of the published tariff, not customs advice.** The actor does not classify products and does not tell you which code is right for your goods. Search results come from the search of each source and can include lines that only mention the word. A binding classification comes from the customs authority (a CBP ruling in the US, an Advance Tariff Ruling in the UK).
- **EU TARIC is not included.** The European Commission's TARIC consultation is a web form without an official open API, and we found no key free JSON API to build on. HS codes are the same worldwide to 6 digits, so the UK lines give the HS structure for EU goods, but the UK rates are not EU rates.
- US rates are the HTS columns. The actor does not add Chapter 99 measures (for example Section 301 or Section 232 duties) to the rate of a line. Those are their own lines in chapter 99, which you can look up with codes such as `9903`, and the HTS footnotes on a line often point to them.
- UK rates are the measures for imports into Great Britain as listed by GOV.UK today. Quotas, conditions, additional codes and the Northern Ireland tariff are not expanded. Open `sourceUrl` for the full picture.
- `generalRate` and the other rates are text, not numbers, since many duties are specific (`1.5¢/kg`) or compound.
- At most 4 requests per second are sent to each source. A UK line needs one request, so 1 000 UK lines take at least 4 minutes. A US heading is read in one request.
- Requests are retried three times on network errors, rate limits and server errors. A response in an unexpected format stops the run with a clear message instead of storing broken rows. Codes that do not exist give a warning in the log and no row.

### Source and license

- **US:** the [USITC HTS REST API](https://hts.usitc.gov/) (`https://hts.usitc.gov/reststop`), which needs no key. The HTS is a work of the U.S. Government. Under 17 U.S.C. 105, "Copyright protection under this title is not available for any work of the United States Government", so the data can be reused freely.
- **UK:** the [UK Trade Tariff API](https://api-docs.trade-tariff.service.gov.uk/) (`https://www.trade-tariff.service.gov.uk/api/v2`), which needs no key. The data is published under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/), which allows commercial reuse with this attribution, carried in every UK row: "Contains public sector information licensed under the Open Government Licence v3.0."

This actor is not affiliated with or endorsed by the USITC, HMRC or the UK Government.

### Pricing

Pay per event: 0.005 USD per tariff line returned (event `tariff-line`), which is 5.00 USD per 1 000 lines. Apify platform usage for the run comes on top and is small, since the actor only makes API requests. A search without matches costs nothing per line. `maxResults` caps how many lines, and therefore how much, a run can charge.

### Contact

Built and maintained by Nightwave AB. Questions, bugs and feature requests: kontakt@nightwave.se

### På svenska

Actorn slår upp tulltaxenummer (HS, HTS och brittiska varukoder) i de officiella öppna källorna och ger en rad per tulltaxerad varupost med beskrivning, tullsatser, enhet och fotnoter.

- Tulltaxor: USA:s Harmonized Tariff Schedule från USITC (allmän tullsats, särskild tullsats med frihandelsprogram, kolumn 2, enheter, fotnoter) och Storbritanniens UK Trade Tariff från GOV.UK (tullsats för tredje land, moms, förmånstullsatser per land eller avtal, kompletterande enhet, tilläggstullar, fotnoter).
- Input: koder med 4-10 siffror, med eller utan punkter, och ett sökord. En kort kod ger alla rader under den. Standard är 50 rader per körning, högst 5 000. Tom input ger HTS-rubrik 8471 (datorer) i USA.
- EU:s TARIC ingår inte, eftersom kommissionen inte har något öppet API för den. HS-koden är gemensam till och med 6 siffror, men de brittiska tullsatserna är inte EU:s.
- Bevakning: med `onlyNew` kommer actorn ihåg vilka rader och tullsatser den redan har levererat för samma input (key-value store `nightwave-state-tariff-hs-code-lookup`). Varje körning levererar och debiterar bara rader som är nya eller där någon tullsats har ändrats. Lägg actorn på ett dagligt schema i Apify under Schedules, se avsnittet "Monitoring and scheduling".
- Det här är ett uppslag i den publicerade tulltaxan, inte tullrådgivning. Actorn klassificerar inga varor. Bindande klassificering ges av tullmyndigheten.
- Källor och licens: USITC (amerikanskt statligt verk, fritt enligt 17 U.S.C. 105) och UK Trade Tariff (Open Government Licence v3.0).
- Pris: 0,005 USD per rad (5,00 USD per 1 000), plus Apifys plattformsanvändning.
- Kontakt: kontakt@nightwave.se

# Actor input Schema

## `country` (type: `string`):

Which tariff to read: us for the US Harmonized Tariff Schedule (USITC), uk for the UK Trade Tariff (GOV.UK). Defaults to us.

## `codes` (type: `array`):

HS, HTS or UK commodity codes with 4 to 10 digits, with or without dots, for example \["8471.30", "0901210000"]. A short code returns every line under it, so 8471 gives the whole heading. With no codes and no search word the actor returns heading 8471 (computers).

## `search` (type: `string`):

Product word to search the tariff for, for example "coffee" or "cotton t-shirts". Uses the search of the official source and returns the matching lines with their rates. Can be combined with codes.

## `maxResults` (type: `integer`):

Maximum number of tariff lines to return, for example 50. Each line is one billable result. 1 to 5 000, defaults to 50.

## `onlyNew` (type: `boolean`):

For scheduled runs. When true, lines that an earlier run with the same input already delivered with the same rates are skipped and not charged, so a daily run returns only lines whose duty, VAT or preferential rates have changed. The first run returns everything. Defaults to false.

## Actor input object example

```json
{
  "country": "uk",
  "codes": [
    "8471.30",
    "0901.21",
    "6109.10"
  ],
  "search": "coffee",
  "maxResults": 50,
  "onlyNew": true
}
```

# Actor output Schema

## `results` (type: `string`):

All tariff lines produced by the run, as JSON. Open in Apify Console or download via the dataset API.

# 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 = {
    "country": "us",
    "codes": [
        "8471"
    ],
    "search": "",
    "maxResults": 50,
    "onlyNew": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("nightwave-owner/tariff-hs-code-lookup").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 = {
    "country": "us",
    "codes": ["8471"],
    "search": "",
    "maxResults": 50,
    "onlyNew": False,
}

# Run the Actor and wait for it to finish
run = client.actor("nightwave-owner/tariff-hs-code-lookup").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 '{
  "country": "us",
  "codes": [
    "8471"
  ],
  "search": "",
  "maxResults": 50,
  "onlyNew": false
}' |
apify call nightwave-owner/tariff-hs-code-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nightwave-owner/tariff-hs-code-lookup"
        }
    }
}
```

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/PYGkPgTRrgkxrOCK9/builds/d4wzSUNeMW6paThSf/openapi.json
