# US Tariff & HTS Tracker | Duty Rates, Changes, Notices (`taiw/us-tariff-hts-tracker`) Actor

Look up US Harmonized Tariff Schedule (HTS) codes with duty-rate text, detect changes between HTS revisions, and monitor Federal Register trade notices. Watchlists and webhook alerts included. Official public sources only.

- **URL**: https://apify.com/taiw/us-tariff-hts-tracker.md
- **Developed by:** [ThinkAIWorks](https://apify.com/taiw) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 hts record saveds

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

## US Tariff & HTS Tracker

Look up US Harmonized Tariff Schedule (HTS) codes with their duty-rate text, see what changed between HTS revisions, and follow trade notices from the Federal Register. A built-in monitor mode reports only what is new and can call your webhook.

Data comes from two official public sources: the US International Trade Commission (USITC) HTS API and the Federal Register API. No login, no proxy, no scraping of web pages.

### What you can do

| Mode | What it returns |
|---|---|
| `htsLookup` (default) | HTS lines for the codes or keywords you give: description, General / Special / Column 2 rate text, units, footnotes, literal related HTS codes, link to the official page |
| `htsChanges` | Lines that were added, removed or changed (rate, description, footnotes, units) between two HTS revisions |
| `federalRegisterNotices` | Notices, rules, proposed rules and presidential documents from trade agencies (USTR, CBP, ITA, BIS, USITC by default) |
| `monitor` | Watchlist of HTS prefixes, keywords, countries and agencies. Returns only items you have not received before and can POST them to your webhook |

### Quick start

Look up a code and everything under it:

```json
{ "mode": "htsLookup", "htsCodes": ["8712.00"], "maxItems": 50 }
```

Search by words:

```json
{ "mode": "htsLookup", "keywords": ["lithium battery"], "maxItems": 100 }
```

Recent USTR notices:

```json
{ "mode": "federalRegisterNotices", "noticeAgencies": ["trade-representative-office-of-united-states"], "fromDate": "2026-10-01" }
```

### Output

Every item is one row in the dataset (view them as tables on the Output tab).

**HTS item (excerpt)**

```json
{
  "hts_code": "8712.00.15",
  "description": "Bicycles having both wheels not exceeding 63.5 cm in diameter",
  "general_rate_text": "11%",
  "general_rate_percent": 11,
  "special_rate_text": "Free (A+,AU,BH,CL,CO,D,E,IL,JO,KR,MA,OM,P,PA,PE,S,SG) 5.5% (JP)",
  "other_rate_text": "30%",
  "related_hts_codes": [],
  "revision": "2026HTSRev23",
  "source_url": "https://hts.usitc.gov/search?query=8712.00.15"
}
```

- Rate text is kept exactly as USITC publishes it. `general_rate_percent` is filled only when the text is a plain percentage or "Free". Compound and specific rates ("1.5¢/kg + 3%") are never turned into a percentage.
- Lines without their own rates (statistical suffix lines) show the parent line's rates and say which line they came from in `rates_inherited_from_hts_code`.
- `related_hts_codes` lists only HTS numbers literally written in that line's footnotes and rate text. `additional_duty_references` adds the published heading text of Chapter 99 headings that are referenced that way.

**Change item (excerpt)**

```json
{
  "hts_code": "8712.00.15",
  "change_type": "rate_changed",
  "changes": [{ "field": "general_rate", "old": "10%", "new": "11%" }],
  "from_revision": "2026HTSRev22",
  "to_revision": "2026HTSRev23"
}
```

Change types: `added`, `removed`, `rate_changed`, `description_changed`, `footnotes_changed`, `other_changed`. A line with several kinds of change appears once, with all of them in `change_types`.

**Notice item**: `document_number`, `title`, `type`, `agencies`, `publication_date`, `effective_on`, `comments_close_on`, `abstract`, `mentioned_hts_codes`, `html_url`, `pdf_url`. The optional full text is described below.

Every run also writes a `RUN_SUMMARY` record to the key-value store: status, revisions compared, counts, source errors, webhook result and what was charged.

### How HTS change detection works (read this)

USITC publishes the HTS as structured data **only for the current revision**. Older revisions are available only as PDF documents. So this Actor builds its own history:

1. Every run that reads the HTS stores the current revision in a named key-value store in your account (`us-tariff-hts-tracker-snapshots`, about 0.6 MB per revision).
2. `htsChanges` compares a stored revision with the one after it. By default it compares the previous stored revision with the current one.
3. **The first run only stores a baseline and reports no changes.** Changes show up from the next USITC revision onward. USITC publishes a revision roughly every 2 to 4 weeks.
4. You can only compare revisions your account has stored. Asking for another one returns a clear error that lists the revisions you do have.

To start the history, run any mode once now, and schedule the Actor (see below). For changes before your first run, USITC's own Change Record PDF for each revision is the official source; the run summary links to it.

### How to monitor tariffs automatically

1. Open the Actor, choose mode **Monitor**, and fill the watchlist, for example:

```json
{
  "mode": "monitor",
  "monitorName": "bikes-and-steel",
  "watchlist": {
    "htsPrefixes": ["8712", "7208"],
    "keywords": ["bicycle", "steel"],
    "countries": ["China"],
    "agencies": ["trade-representative-office-of-united-states"]
  },
  "webhookUrl": "https://your-endpoint.example/hook"
}
```

2. Save it as a Task and add a **Schedule** (for example every day at 08:00). Notices are published daily; HTS revisions come every few weeks, so a daily schedule is enough.
3. Each run saves only items it has not delivered before for that `monitorName` and, if there are any, POSTs one JSON message to your webhook with the new HTS changes and notices. Use a different `monitorName` per task.
4. Or skip the webhook and connect the dataset to Zapier, Make, n8n or Slack with Apify's integrations.

How the watchlist matches: an item is reported when it matches **any** rule. HTS prefixes and keywords match HTS changes (code and wording). Notices match on keywords and countries in the title and abstract, on HTS codes written in the title or abstract, and on agency. The first monitor run delivers notices from the last 14 days (change this with `fromDate`).

Webhook body:

```json
{
  "source": "us-tariff-hts-tracker",
  "monitorName": "bikes-and-steel",
  "summary": { "newHtsChanges": 4, "newNotices": 2 },
  "htsChanges": [ ... ],
  "notices": [ ... ],
  "disclaimer": "..."
}
```

If the webhook is down, the run still succeeds, the items stay in the dataset, and the failure is recorded in `RUN_SUMMARY`. Alerts are not charged.

### Input

| Field | Used by | Notes |
|---|---|---|
| `mode` | all | `htsLookup`, `htsChanges`, `federalRegisterNotices`, `monitor` |
| `htsCodes` | lookup (required unless keywords), changes, notices | 2 to 10 digits, dots optional. Prefix search by default |
| `keywords` | lookup, changes, notices | In lookup, all words of one keyword must appear in the description |
| `includeChildren` | lookup | On by default. Off = exact code only |
| `countryOfOrigin` | lookup | Two-letter code. See "Country of origin" |
| `compareFromRevision`, `compareToRevision` | changes | Revision names such as `2026HTSRev22`, from your stored history |
| `changeTypes` | changes | Keep only these change types |
| `noticeAgencies`, `noticeTypes` | notices, monitor | Federal Register agency slugs; `NOTICE`, `RULE`, `PRORULE`, `PRESDOCU` |
| `fromDate`, `toDate` | notices, monitor | `YYYY-MM-DD`. Default: last 14 days |
| `maxItems` | all | Default 100, maximum 10,000. Also caps what you can be charged |
| `onlyNew`, `monitorName` | notices, changes, monitor | Skip items already delivered to this monitor. Default on in monitor mode |
| `watchlist`, `webhookUrl` | monitor | See above |
| `includeFullText` | notices | Best effort, see below |

**Country of origin.** With `countryOfOrigin` set, each HTS item gets the general rate plus any entries in the Special column whose country code literally matches (for example `KR` or `JP`). Programs coded with letters (such as `A` or `S`) are not mapped to countries, and Chapter 99 additional duties are not evaluated. It is a lookup aid, not a duty calculation.

**Full text.** The Federal Register limits automated downloads of notice text. With `includeFullText` on, the Actor tries each notice and marks the result in `full_text_status`; after repeated refusals it stops asking and saves the remaining notices without text. You are charged per notice either way. The notice page and PDF links are always included.

### Pricing

Pay per result, no start fee:

| Event | Price | When |
|---|---|---|
| HTS record saved | $0.005 | each line saved by `htsLookup` |
| HTS change saved | $0.005 | each change saved by `htsChanges` or `monitor` |
| Trade notice saved | $0.005 | each notice saved by `federalRegisterNotices` or `monitor` |

Nothing is charged for baseline runs, duplicates, items already delivered to a monitor, errors, or webhook alerts. Set a maximum cost per run in the Apify run options and the Actor stops at that limit. Lookup by code is billed per line, so a 4-digit heading returns every child line under it.

### Frequently asked questions

#### Which HTS revision does a lookup use?

Always the current one published by USITC. Each item shows `revision` and `revision_date`, plus a link to the official page for that code.

#### Why did my first `htsChanges` run return nothing?

USITC serves the HTS as structured data only for the current revision, so the Actor builds its own history. The first run stores a baseline and charges nothing. Changes appear from the next USITC revision, usually 2 to 4 weeks later. Schedule the Actor so it never misses one.

#### Can I compare older revisions?

Only revisions your account has already stored (every run stores the current one). If you ask for another, the run stops with a message listing the revisions you do have. The run summary also links USITC's official Change Record for the revision.

#### Does it calculate the duty I will pay?

No. It returns the published rate text for each line, the Chapter 99 headings referenced by footnotes, and the notices. Section 301, 232 and IEEPA product lists sit in HTS notes and Federal Register annexes, so whether a product is covered, and the final duty, are not decided here. Confirm with the official source or a licensed customs broker.

#### Why is `general_rate_percent` empty?

It is filled only when the published rate is a plain percentage or "Free". Compound and specific rates such as "1.5¢/kg + 3%" stay as text in `general_rate_text`, so nothing is rounded or guessed.

#### What does `countryOfOrigin` do?

It adds the general rate and any Special-column entry whose country code literally matches, for example `KR` or `JP`. Letter-coded programs such as `A` or `S` are not mapped to countries, and Chapter 99 duties are not evaluated.

#### How does the monitor decide what is new?

Each `monitorName` keeps its own list of delivered notices and changes. A second run with the same name returns only items not seen before, and charges only for those. Use one name per scheduled task.

#### How are notices matched to my watchlist?

An item is reported when it matches any rule. Keywords and countries are matched in the notice title and abstract, HTS prefixes in the code or in codes written in the title and abstract, and agencies by Federal Register slug. A notice that mentions a product only deep inside its body may not match.

#### Why is the notice full text sometimes missing?

The Federal Register limits automated text downloads. With `includeFullText` on, each notice is tried and marked in `full_text_status`. After repeated refusals the Actor stops asking and saves the rest without text. The notice page and PDF links are always included.

#### What does it cost, and what is free?

You pay $0.005 per saved HTS record, HTS change or notice, with no start fee. Not charged: baseline runs, duplicates, items a monitor already delivered, errors, and webhook alerts. Set a maximum cost per run and the Actor stops there.

#### What happens if a source is down?

The run stops with a clear message and a structured `RUN_SUMMARY`, and nothing is charged. In monitor mode, if only one source is down the other still runs and the failure is listed in the summary. A failing webhook never fails the run.

#### How fresh is the data?

It is whatever USITC and the Federal Register had published when the Actor ran. It is not a live feed, and CBP CSMS messages are not included because CBP offers no machine-readable feed.

#### Is this official data?

It comes straight from the official USITC and Federal Register APIs, with a link to the official page on every item. Always confirm against the official source before relying on it.

### Legal note

This Actor is not customs, legal or trade advice, and it does not calculate duties or admissibility. It is not affiliated with or endorsed by the USITC, the Federal Register, USTR, CBP or any other US government agency. It reads public government data; you are responsible for how you use the results.

# Actor input Schema

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

htsLookup: find HTS codes and duty-rate text. htsChanges: what changed between two HTS revisions. federalRegisterNotices: trade notices from the Federal Register. monitor: watchlist + only-new alerts (HTS changes and notices), with optional webhook.

## `htsCodes` (type: `array`):

htsLookup: codes or prefixes to look up, with or without dots (8712, 8712.00, 8712.00.15, 8712001500). htsChanges and federalRegisterNotices: optional filter.

## `keywords` (type: `array`):

htsLookup: search words in the HTS descriptions (all words of one keyword must appear). htsChanges and federalRegisterNotices: optional filter on descriptions / notice titles and abstracts.

## `includeChildren` (type: `boolean`):

htsLookup: also return every more specific line under the code (for example the 8-digit and 10-digit lines under a 4-digit heading). Turn off for an exact code match only.

## `countryOfOrigin` (type: `string`):

htsLookup: optional ISO country code such as KR or MX. Adds the general rate and any special-rate program entries that literally list that code. Not a duty calculation: Chapter 99 additional duties are not evaluated.

## `compareFromRevision` (type: `string`):

htsChanges: older revision name, for example 2026HTSRev22. Must be a revision this Actor has stored (every run stores the current one). Default: the revision before the newest.

## `compareToRevision` (type: `string`):

htsChanges: newer revision name. Default: the current USITC revision.

## `changeTypes` (type: `array`):

htsChanges: keep only these change types. Empty = all.

## `noticeAgencies` (type: `array`):

federalRegisterNotices / monitor: Federal Register agency slugs. Default: USTR, CBP, International Trade Administration, BIS and USITC.

## `noticeTypes` (type: `array`):

NOTICE, RULE (final rules), PRORULE (proposed rules), PRESDOCU (presidential documents). Empty = all four.

## `fromDate` (type: `string`):

federalRegisterNotices / monitor: earliest publication date. Default: 14 days ago.

## `toDate` (type: `string`):

Latest publication date. Default: today.

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

Maximum number of results saved (and charged) in one run.

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

Skip notices and changes this monitor already delivered in earlier runs (nothing is charged for them). Default: on in monitor mode, off in other modes. Leave unset for that default.

## `monitorName` (type: `string`):

Name of the 'already seen' list used by Only new items. Use different names for different scheduled tasks. Default: default.

## `watchlist` (type: `object`):

Rules for monitor mode. An item is reported when it matches any rule: htsPrefixes (e.g. \["8712","7208"]), keywords (e.g. \["bicycle","steel"]), countries (e.g. \["China"], matched in notice text), agencies (Federal Register agency slugs).

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

monitor mode: receives a JSON POST when there are new matching items. A failing webhook never fails the run and costs nothing extra.

## `includeFullText` (type: `boolean`):

federalRegisterNotices: try to add the plain text of each notice. The Federal Register limits automated text downloads, so some notices may come without text (marked in full_text_status).

## Actor input object example

```json
{
  "mode": "htsLookup",
  "htsCodes": [
    "8712.00"
  ],
  "includeChildren": true,
  "noticeAgencies": [
    "trade-representative-office-of-united-states",
    "u-s-customs-and-border-protection"
  ],
  "maxItems": 100,
  "monitorName": "default",
  "watchlist": {
    "htsPrefixes": [
      "8712"
    ],
    "keywords": [
      "bicycle"
    ],
    "countries": [
      "China"
    ],
    "agencies": []
  },
  "includeFullText": false
}
```

# Actor output Schema

## `hts` (type: `string`):

Results of htsLookup mode.

## `changes` (type: `string`):

Results of htsChanges mode and HTS changes found by monitor mode.

## `notices` (type: `string`):

Results of federalRegisterNotices mode and notices found by monitor mode.

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

Status, revisions compared, counts, source errors and webhook result for this run.

# 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 = {
    "htsCodes": [
        "8712.00"
    ],
    "noticeAgencies": [
        "trade-representative-office-of-united-states",
        "u-s-customs-and-border-protection"
    ],
    "watchlist": {
        "htsPrefixes": [
            "8712"
        ],
        "keywords": [
            "bicycle"
        ],
        "countries": [
            "China"
        ],
        "agencies": []
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("taiw/us-tariff-hts-tracker").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 = {
    "htsCodes": ["8712.00"],
    "noticeAgencies": [
        "trade-representative-office-of-united-states",
        "u-s-customs-and-border-protection",
    ],
    "watchlist": {
        "htsPrefixes": ["8712"],
        "keywords": ["bicycle"],
        "countries": ["China"],
        "agencies": [],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("taiw/us-tariff-hts-tracker").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 '{
  "htsCodes": [
    "8712.00"
  ],
  "noticeAgencies": [
    "trade-representative-office-of-united-states",
    "u-s-customs-and-border-protection"
  ],
  "watchlist": {
    "htsPrefixes": [
      "8712"
    ],
    "keywords": [
      "bicycle"
    ],
    "countries": [
      "China"
    ],
    "agencies": []
  }
}' |
apify call taiw/us-tariff-hts-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,taiw/us-tariff-hts-tracker"
        }
    }
}
```

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/jPKwIr8oXFZEVc4vW/builds/IAX0sEojbdGgylnUr/openapi.json
