# US Tariff HTS Lookup & Duty Rate Change Monitor (`datacrate/us-tariff-hts-lookup`) Actor

Look up US import duty rates by keyword, HTS code or chapter from the official USITC Harmonized Tariff Schedule: general, special and column 2 rates, units, footnotes. Delta mode flags new, changed and removed lines.

- **URL**: https://apify.com/datacrate/us-tariff-hts-lookup.md
- **Developed by:** [Data Crate](https://apify.com/datacrate) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 tariff line returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Lookup & Duty Rate Change Monitor – official USITC duty rates by keyword, HTS code or chapter

Look up **US import duty rates** straight from the official **Harmonized Tariff Schedule (HTS)** published by the US International Trade Commission. Search by product keyword ("lithium battery"), by HTS code (`8507.60.00`) or export whole chapters (`85`), and get one clean row per tariff line: **general (MFN), special (FTA) and column 2 rates, units of quantity, footnotes, parent description, inherited rates for statistical-suffix lines** and references to the chapter 99 lines that carry additional duties. Switch on **delta mode** and the actor flags every line that is **new, changed or removed** since your last run, with the previous rates next to the new ones. That makes it a tariff change monitor you can schedule.

It is for importers, ecommerce and Amazon/eBay/Shopify sellers estimating landed cost, customs brokers and freight forwarders, trade-compliance and finance teams, and analysts or AI agents that need machine-readable HTS data. No scraping of web pages, no browser, no API key, no proxies: it calls the same public REST service that the USITC HTS website uses.

**First run:** press Start. The prefill (keyword `lithium battery`, 50 lines) costs about **$0.075 at $0.0015 per tariff line** and finishes in well under two minutes. **Empty input also works:** it runs the same example search.

> **Rates change and this is not customs advice.** The HTS lists the base duty rates. Section 232, Section 301, IEEPA and other additional duties are applied through chapter 99 lines and depend on country of origin, product and date; this actor shows the chapter 99 references it finds (`chapter99Refs`) but does **not** work out the duty you owe. Always confirm the classification and the duty with a licensed customs broker or US Customs and Border Protection before you import, quote or price anything.

### What you can do with it

- **Landed-cost research:** search a product keyword and read the candidate HTS lines with their general, special and column 2 rates and units.
- **Look up a code:** `htsCodes: ["8507.60.00"]` returns the line and everything below it. A 4-digit heading such as `8507` returns the whole heading with its parent path.
- **Chapter export:** `chapters: ["85", "99"]` exports whole chapters (chapter 99 holds the additional-duty and temporary-provision lines).
- **Tariff change monitor:** schedule the actor with `onlyChangedSinceLastRun: true`. Each run returns only lines that are `new`, `changed` (with `changedFields` and the previous general, special and column 2 rates) or `removed`. Run it after each HTS revision.
- **Cheaper runs:** `rateLinesOnly: true` skips headings and statistical-suffix lines that publish no rate of their own.

### Input

| Field | What it does |
|---|---|
| `queries` | Product keywords to search, one search each (e.g. `lithium battery`, `steel pipe`) |
| `htsCodes` | HTS codes with 4, 6, 8 or 10 digits, dots optional. Returns the code and every line below it |
| `chapters` | Whole chapters `01` to `99`. One request per chapter (chapter 85 is about 1,500 lines) |
| `onlyChangedSinceLastRun` | Delta mode: return only new, changed or removed lines versus the last run with the same State name. The first run returns everything (up to the max) |
| `stateKey` | Name of the saved snapshot (default `default`). Use one name per watchlist and keep the same keywords, codes and chapters for the same name |
| `rateLinesOnly` | Skip lines that have no rate of their own |
| `includeParentContext` | Add `parentDescription` and inherited rates to keyword and code searches (a few extra requests, no extra charge). Default on |
| `maxItems` | Cap on tariff lines returned (default 50). You pay per line. Results are spread across your keywords, codes and chapters |

Leave `queries`, `htsCodes` and `chapters` all empty to run the example search `lithium battery`.

Example: `{ "queries": ["lithium battery"], "maxItems": 50 }`

Monitor example: `{ "chapters": ["85", "87", "99"], "onlyChangedSinceLastRun": true, "stateKey": "my-imports", "maxItems": 2000 }`

### Output

One dataset row per HTS line (sample, trimmed):

```json
{
  "htsno": "8507.60.00.10",
  "lineType": "statistical-suffix",
  "chapter": "85",
  "heading": "8507",
  "statisticalSuffix": "10",
  "indent": 2,
  "description": "Of a kind used as the primary source of electrical power for electrically powered vehicles of subheadings 8703.40, 8703.50, 8703.60, 8703.70 or 8703.80",
  "parentDescription": "Electric storage batteries, including separators therefor, whether or not rectangular (including square); parts thereof > Lithium-ion batteries",
  "generalRate": null,
  "specialRate": null,
  "otherRate": null,
  "effectiveGeneralRate": "3.4%",
  "effectiveSpecialRate": "Free (A,AU,B,BH,C,CL,CO,D,E,IL,JO,KR,MA,OM,P,PA,PE,S,SG)",
  "effectiveOtherRate": "40%",
  "ratesInheritedFrom": "8507.60.00",
  "hasOwnRates": false,
  "units": ["No.", "kg"],
  "additionalDuties": null,
  "quotaQuantity": null,
  "footnotes": [],
  "chapter99Refs": [],
  "changeStatus": null,
  "changedFields": [],
  "previousGeneralRate": null,
  "previousSpecialRate": null,
  "previousOtherRate": null,
  "firstSeenAt": null,
  "matchedQueries": ["lithium battery"],
  "htsRelease": "Revision 23 (2026)",
  "url": "https://hts.usitc.gov/search?query=8507.60.00.10",
  "fetchedAt": "2026-11-19T15:00:00.000Z",
  "source": "USITC Harmonized Tariff Schedule of the United States (hts.usitc.gov, REST service)",
  "license": "US government work, not covered by copyright (USITC)"
}
```

Notes on fields:

- `generalRate`, `specialRate`, `otherRate` are the text exactly as published (`general` = normal trade relations/MFN, `special` = preferential programs and FTAs with the program codes in brackets, `other` = column 2). Rates such as `3.4%`, `Free`, `1¢/kg` or compound rates are kept as text; they are not converted to numbers.
- In the HTS, a statistical-suffix line (10 digits) shows no rate of its own: it takes the rate of the 8-digit line above. `effective*Rate` fills that in and `ratesInheritedFrom` names the source line. `hasOwnRates` tells you which is which. `generalRate` etc. stay exactly as the USITC publishes them.
- `chapter99Refs` lists chapter 99 line numbers (for example `9903.88.03`) found in the footnotes, additional-duty text and rate text. They point you to the additional-duty lines; they do not mean the duty applies to your shipment.
- `changeStatus` is `null` until a baseline exists for your State name, then `new`, `changed`, `unchanged` or `removed`. `changedFields` lists what changed (`generalRate`, `specialRate`, `otherRate`, `units`, `additionalDuties`, `footnotes`, `quotaQuantity`, `description`). `removed` rows carry the last known description and rates and are only reported for chapters you export in full.
- The run summary (HTS release, counts per change status, request log, disclaimer) is saved in the key-value store as `SUMMARY`.

### Terms and licence evidence

Checked on 2026-11-19. Everything comes from `hts.usitc.gov/reststop/` (`search`, `exportList` and `currentRelease`), the public REST service behind the official HTS website.

- **Public domain / US Government Work.** The USITC's own open-data catalog (`https://www.usitc.gov/data.json`, read from an Internet Archive copy dated 2025-11-19) lists "Harmonized Tariff Schedule (HTS) Archive" and "Harmonized Tariff Schedule of the United States" for each year 2019 to 2025. Every one of these entries states: "This dataset is a U.S. Government Work and is not covered by copyright in the United States of America" and carries the licence label `http://www.usa.gov/publicdomain/label/1.0/` (USA.gov public domain label). The USITC Open Data page defines its purpose: "Open data refers to publicly available data structured in a way that enables data to be discoverable and usable by end users."
- **No access restriction found.** `https://hts.usitc.gov/robots.txt` returns HTTP 200 with the site's web-app page and contains no `Disallow` rules. The robots.txt of the main site `www.usitc.gov` (Internet Archive copy, 2026-05-01) has `User-agent: *`, `Crawl-delay: 10`, and only disallows CMS paths such as `/admin/`, `/search/` and `/user/`; it does not mention the HTS service. The USITC Web Site Disclaimers page (Internet Archive copy, 2025) contains no prohibition on automated access or reuse.
- **Accuracy disclaimer from the USITC.** "The information provided using this web site is only intended to be general summary information to the public. It is not intended to provide legal advice to an individual or entity. We make no guarantees about the accuracy or completeness of the contents of this site, and expressly disclaims liability for errors and omissions in these contents."
- **What we could not read.** `www.usitc.gov` returned HTTP 403 "Access Denied" to automated requests on the day of checking, so the live policy pages could not be opened; we did not work around that and used the archived copies above. The USITC has not published a licence statement for the REST endpoints specifically; the evidence above is for the HTS datasets the endpoints serve. If the USITC asks for different terms, we will follow them.
- **Polite access.** The actor sends at most one request every 2 seconds (the main-site `Crawl-delay` is 10 seconds for page crawling; this actor makes a handful of API calls per run, not a crawl), identifies itself as `datacrate-actor/1.0`, retries with backoff on errors and caps the number of searches per run.
- **No personal data.** The HTS describes goods and duty rates only.

Not affiliated with, endorsed by or sponsored by the US International Trade Commission, US Customs and Border Protection or any government agency.

### FAQ

**Is this the official duty I will pay?** No. It is the base rate schedule. Duties you actually owe depend on classification, country of origin, trade programs, valuation and additional duties (Section 232, 301, IEEPA, antidumping and countervailing duties). Confirm with a licensed customs broker or CBP.

**How current is the data?** The actor reads the USITC's current release on every run and writes it in `htsRelease` (for example "Revision 23 (2026)"). The USITC publishes numbered revisions through the year (the current one was Revision 23 of 2026 when we tested on 2026-11-19).

**How does the keyword search work?** It is the USITC's own HTS search, so results follow its matching. Use specific product words, or search by code. A keyword search returns matching lines, which can include statistical-suffix lines; `parentDescription` shows where each line sits.

**Why do some rows have empty `generalRate` but a filled `effectiveGeneralRate`?** Statistical-suffix lines inherit the rate of the line above. See the field notes above.

**How does delta mode decide a line changed?** It compares each line with the snapshot saved under your State name: rates, units, additional-duty text, footnotes, quota text and description. A new HTS revision that re-words a description will show as `changed` with `changedFields: ["description"]`.

**Why did delta mode return many `new` lines?** The State name keeps one snapshot. If you change the keywords, codes, chapters or `rateLinesOnly` for the same State name, the lines the snapshot has not seen yet are `new`. Use a separate State name per watchlist.

**Can I monitor the whole schedule?** Yes: list the chapters you care about in `chapters` (chapter 99 is useful for additional-duty changes). Each chapter is one request.

**What if the USITC service is down?** Failed searches are logged and listed in `SUMMARY`; the run fails only if every request fails.

### Integrations

- **Schedule** the actor (for example daily or weekly) with `onlyChangedSinceLastRun: true` and the same `stateKey`.
- **Webhook** on run success to push changed lines to Slack, email, Zapier or Make.
- **API and MCP:** call it from the Apify API, or use it as a tool for AI agents through the Apify MCP server (ask an agent for the duty rate of a product keyword).
- Export the dataset as JSON, CSV or Excel from the Console. The `changes` view shows old and new rates side by side.

### Pricing

Pay per result: **$0.0015 per tariff line** ($1.50 per 1,000), no start fee. Higher Apify plans get lower per-line prices. The first run above (50 lines) costs about $0.075.

**How do I keep control of cost?** Set `maxItems` (you are only charged for lines returned), use `rateLinesOnly`, and in delta mode you pay only for new, changed or removed lines, not for unchanged ones.

**Am I charged for the extra lookups used for parent context?** No. You pay per returned tariff line only.

### Related actors

- **US Code Violations Feed** (`datacrate/us-code-violations-feed`) and other DataCrate open-data feeds built on official government sources.

### Changelog

- **1.0** First version: keyword, HTS code and chapter lookups from the USITC HTS; parent path and inherited rates; chapter 99 references; delta mode (new, changed, removed) with previous rates.

# Actor input Schema

## `queries` (type: `array`):

Product keywords to search in the Harmonized Tariff Schedule, e.g. "lithium battery", "steel pipe", "bluetooth speaker". One search per keyword. Leave all three inputs empty to run the example "lithium battery".

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

Look up specific codes with 4, 6, 8 or 10 digits (dots optional), e.g. 8507, 8507.60 or 8507.60.00.10. Returns that code and every line below it.

## `chapters` (type: `array`):

Whole HTS chapters, 01 to 99, e.g. 85 (electrical machinery) or 99 (additional duty and special provisions). Best for tariff change monitoring. One request per chapter; chapter 85 has about 1,500 lines.

## `onlyChangedSinceLastRun` (type: `boolean`):

Return only lines that are new, whose rates, units, footnotes or text changed, or that disappeared since the last run with the same State name. The first run returns everything (up to the max). Every row carries changeStatus and the previous rates.

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

Name of the saved snapshot to compare against. Use a different name for each watchlist, and keep the same keywords, codes and chapters for the same name.

## `rateLinesOnly` (type: `boolean`):

Skip headings and statistical-suffix lines that publish no rate of their own (they inherit the rate of the line above). Cuts the number of results and the cost.

## `includeParentContext` (type: `boolean`):

For keyword and code searches, add the parent path (e.g. "Electric storage batteries > Lithium-ion batteries") and the inherited rate for statistical-suffix lines. Costs a few extra requests (about 2 seconds each, free of charge).

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

Stop after this many tariff lines (spread across keywords, codes and chapters). You are charged per line returned.

## Actor input object example

```json
{
  "queries": [
    "lithium battery"
  ],
  "htsCodes": [],
  "chapters": [],
  "onlyChangedSinceLastRun": false,
  "stateKey": "default",
  "rateLinesOnly": false,
  "includeParentContext": true,
  "maxItems": 50
}
```

# Actor output Schema

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

One row per Harmonized Tariff Schedule line (default dataset items).

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

HTS release, counts by change status, request log and the disclaimer.

# 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 = {
    "queries": [
        "lithium battery"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacrate/us-tariff-hts-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 = {
    "queries": ["lithium battery"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("datacrate/us-tariff-hts-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 '{
  "queries": [
    "lithium battery"
  ],
  "maxItems": 50
}' |
apify call datacrate/us-tariff-hts-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datacrate/us-tariff-hts-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/fgKfDAQn3zglxZySg/builds/9nLNZBy2qDdbgMJOo/openapi.json
