# US HTS Tariff & Customs Duty Finder (`song921619730/us-tariff-hts-finder`) Actor

Real-time search and duty lookup across the US Harmonized Tariff Schedule (HTS). Extract 8-digit and 10-digit codes, General Column 1 rates, Special trade preferences, and Column 2 rates ($0.010/call).

- **URL**: https://apify.com/song921619730/us-tariff-hts-finder.md
- **Developed by:** [song](https://apify.com/song921619730) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 HTS Tariff & Customs Duty Finder

> Real-time, official search and duty rate lookup across the US Harmonized Tariff Schedule (HTS). Pay only $0.010 per query with zero subscriptions.

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)
[![Pricing](https://img.shields.io/badge/Pricing-Pay--Per--Event%20\($0.010\)-green)](https://apify.com)
[![Container](https://img.shields.io/badge/Memory-256MB%20Optimized-orange)](https://apify.com)
[![Python](https://img.shields.io/badge/Python-3.11-blue?logo=python)](https://python.org)

***

### 💡 The Problem Solved

Cross-border eCommerce sellers on Amazon, Walmart, and Shopify face constant compliance hurdles when calculating landed costs and US customs duties:

- Misclassifying 10-digit Harmonized Tariff Schedule (HTS) codes leads to customs holds, seizure, and punitive Section 301 tariffs.
- Commercial customs brokerage platforms (e.g. Descartes, Thomson Reuters ONESOURCE) cost **$500 to $2,000+ per month**.
- Manual navigation of the 99 chapters of the USITC website is error-prone, slow, and impossible to integrate with automated inventory workflows.

This Actor connects directly to the official **US International Trade Commission (USITC)** Harmonized Tariff Schedule database:

- **Instant Search**: Look up tariffs by product keywords (e.g. *"laptop"*, *"cotton t-shirt"*, *"lithium-ion battery"*) or exact 4 to 10-digit HTS codes (*"8471.30.01.00"*).
- **Complete Duty Breakdown**: Extracts General Column 1 (MFN) rates, Special trade preferences (USMCA, GSP, FTA partner codes), and Column 2 statutory rates.
- **Pay-Per-Event (PPE)**: Pay exactly **$0.010 per lookup** ($10.00 per 1,000 queries) with zero monthly subscriptions.

***

### 💰 Pay-Per-Event (PPE) Pricing

| Billable Event | Unit Price (USD) | Description |
|---|---|---|
| `hts_tariff_lookup` | **$0.010** | Charged per successful HTS tariff query yielding structured duty rates and descriptions |

*No charge is incurred if the input fails validation or if the USITC service is temporarily unavailable.*

***

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `keyword` | `string` | **Yes** | — | Product search keyword (*"laptop"*, *"coffee"*) or HTS code (*"8471.30.01.00"*). |
| `maxResults` | `integer` | No | `10` | Maximum number of tariff records to return (1 to 100). |
| `onlyDutyBearing` | `boolean` | No | `true` | Filter out section/chapter header lines and only return actionable tariff lines. |
| `includeFootnotes` | `boolean` | No | `false` | Include legal footnotes and statistical notes. |

#### Sample Input JSON

```json
{
  "keyword": "8471.30.01.00",
  "maxResults": 5,
  "onlyDutyBearing": true
}
```

***

### 📤 Output Format

Tariff items are pushed directly to the Apify Default Dataset, and the full payload is saved to the Key-Value Store under `OUTPUT`.

#### Sample Output Record (Dataset Item)

```json
{
  "htsno": "8471.30.01.00",
  "htsDigits": "8471300100",
  "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",
  "general": "Free",
  "special": "Free (A, AU, BH, CL, CO, D, E, IL, JO, KR, MA, OM, P, PA, PE, S, SG)",
  "other": "35%",
  "units": ["No."],
  "statisticalSuffix": "00",
  "indent": "1",
  "quotaQuantity": null,
  "additionalDuties": null,
  "searchKeyword": "8471.30.01.00",
  "timestamp": "2026-10-18T19:40:00Z"
}
```

***

### 🔌 Integrations

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {"keyword": "8471.30.01.00", "maxResults": 5}

run = client.actor("username/us-tariff-hts-finder").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"HTS: {item['htsno']} | General Duty: {item['general']} | Col 2: {item['other']}")
```

#### Zapier / Make.com Webhook

Send a POST request to:
`https://api.apify.com/v2/acts/username~us-tariff-hts-finder/run-sync-get-dataset-items?token=YOUR_TOKEN`
Payload: `{"keyword": "{{trigger.product_code}}"}`

# Actor input Schema

## `keyword` (type: `string`):

Search keyword (e.g. 'laptop', 'coffee', 'cotton shirt') or 4 to 10-digit HTS code (e.g. '8471', '8471.30.01.00', '0901.21').

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

Maximum number of tariff records to return (1 to 100).

## `onlyDutyBearing` (type: `boolean`):

If enabled, filters out general chapter/subheading headers and only returns items with explicit duty rate specifications.

## `includeFootnotes` (type: `boolean`):

Include legal footnotes and statistical annotations associated with tariff lines.

## Actor input object example

```json
{
  "keyword": "8471.30.01.00",
  "maxResults": 10,
  "onlyDutyBearing": true,
  "includeFootnotes": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Link to USITC HTS codes, duty rates, and classification results

# 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 = {
    "keyword": "8471.30.01.00"
};

// Run the Actor and wait for it to finish
const run = await client.actor("song921619730/us-tariff-hts-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 = { "keyword": "8471.30.01.00" }

# Run the Actor and wait for it to finish
run = client.actor("song921619730/us-tariff-hts-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 '{
  "keyword": "8471.30.01.00"
}' |
apify call song921619730/us-tariff-hts-finder --silent --output-dataset

```

## MCP server setup

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