HS Code Classifier – HTS Tariff & Duty Rate Lookup avatar

HS Code Classifier – HTS Tariff & Duty Rate Lookup

Pricing

$20.00 / 1,000 product classifieds

Go to Apify Store
HS Code Classifier – HTS Tariff & Duty Rate Lookup

HS Code Classifier – HTS Tariff & Duty Rate Lookup

Classify product names into official US HTS tariff codes with duty rates and units of quantity. Bulk HS code lookup for importers, e-commerce sellers and customs brokers - data from the USITC Harmonized Tariff Schedule. No API key, no login, JSON/CSV output.

Pricing

$20.00 / 1,000 product classifieds

Rating

0.0

(0)

Developer

Fakih

Fakih

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

HS / HTS Tariff Code Classifier

Turn a product name into an official US tariff code — with the duty rate — in one run.

Give it a list of product names. Get back the official HTS code, the duty rate, the unit of quantity and the full classification path for each one.

Data comes straight from the USITC Harmonized Tariff Schedule (hts.usitc.gov) — the official US government source. No API key, no login, nothing to maintain on your side.


Why people use it

Getting the tariff code wrong is expensive. It means shipments held at customs, unexpected duty bills, penalties and re-filed entries.

The code for a single product is easy to look up by hand. A catalog of 5,000 SKUs is not. This Actor classifies the whole catalog in one run and gives you a code you can defend, because every answer points back to the exact line of the official schedule it came from.

Built for:

  • E-commerce sellers shipping into the US who need codes for every SKU
  • Importers and freight forwarders preparing customs entries
  • Customs brokers pre-classifying client catalogs
  • Marketplaces and ERP teams enriching product data with tariff codes

What you get

For every product, one dataset item:

fieldmeaning
productthe name you supplied
htsCodebest-match HTS code, e.g. 8518.30.20.00
descriptionthe official tariff description of that code
dutyRateGeneral (MFN) duty rate, e.g. Free, 16.5%
unitunit of quantity used for duty calculation, e.g. No., kg
confidencehow decisive the match was, 0–1
paththe classification path, chapter → subheading
alternativesrunner-up codes with their own duty rates
needsDetailattributes the schedule splits on, when the name is too vague
source / sourceUrlwhere the answer came from, so you can verify it

Input

{
"products": [
"wireless bluetooth earbuds",
"16oz stainless steel water bottle",
"men cotton t-shirt"
],
"topN": 3
}
fieldtypedescription
productsarrayProduct names as they appear on a listing, invoice or storefront. A single string or a comma/newline separated list also works.
topNintegerHow many alternative codes to return per product (1–10, default 3).

Tip: include material, function or capacity when you know it.

"16oz stainless steel water bottle"
classifies far better than "bottle".


Output example

{
"product": "men cotton t-shirt",
"htsCode": "6109.10.00.12",
"description": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted:",
"dutyRate": "16.5%",
"unit": "doz., kg",
"confidence": 0.82,
"path": [
"T-shirts, singlets, tank tops and similar garments, knitted or crocheted:",
"Of cotton"
],
"alternatives": [
{
"htsCode": "6111.20.20.00",
"description": "T-shirts, singlets and similar garments, except those imported as parts of sets",
"dutyRate": "14.9%"
}
],
"needsDetail": null,
"source": "USITC Harmonized Tariff Schedule (official, hts.usitc.gov)",
"sourceUrl": "https://hts.usitc.gov/search?query=men%20cotton%20t-shirt"
}

Verified results

Every row below is a real run against the live USITC schedule:

productHTS codeduty rate
wireless bluetooth earbuds8518.30.20.00Free
laptop8471.30.01.00Free
16oz stainless steel water bottle9617.00.10.007.2%
men cotton t-shirt6109.10.00.1216.5%
vitamin c supplement tablets2936.27.00.00Free
led desk lamp9405.11.60.107.6%
led light bulb8539.52.002%
coffee maker8516.71.00.803.7%
backpack4202.92.31.2017.6%
sunglasses9004.10.00.002%
bluetooth speaker8518.21.00.00Free
pet food dog treats2309.10.00.10Free
silk scarf6117.10.40.001.5%
yoga mat9506.91.00.304.6%
usb-c charger 65w8504.40.95.20Free
sneakers running shoes6404.11.20.7110.5%

How it works

  1. The full HTS (about 35,800 rows, ~12 MB) is downloaded once per run and cached for 12 hours — so the first call pays the download and the rest are fast.
  2. The flat export is rebuilt into a real tree using code-prefix parenting, so inherited values (duty rate, unit of quantity) are correct.
  3. Products are matched with IDF-weighted term scoring against each row and its ancestors, so a specific line deep in the schedule is still reachable from a plain product name.
  4. Everyday language is bridged to tariff language (earbuds → headphones and earphones, air fryer → electric ovens).
  5. Age and gender branches are hard-filtered: a men's product never resolves into a babies' garment line.
  6. Physical specs decide between sibling branches — 16oz picks the capacity line, 2000W picks the power line.
  7. Rows that describe a part of a product are rejected as the product itself.
  8. When the schedule cannot be narrowed further, the item carries needsDetail naming the exact attributes that split the heading, instead of guessing.

Pricing

Pay per event — you are charged only for products that actually receive a code. Failed lookups are free.

eventprice
classification$0.02 per product classified

Classifying a 1,000-SKU catalog costs about $20.


FAQ

Is the data official? Yes. It comes from the USITC Harmonized Tariff Schedule, published by the US International Trade Commission. Every result carries a sourceUrl you can open and check.

Do I need an API key for the data? No. Nothing to sign up for.

What about the duty rates — are they current? The schedule is fetched live and cached for 12 hours, so rates track the published schedule. Note that the rate shown is the General (MFN) rate. Preferential rates under a free trade agreement, and Section 301 additional duties, are not included.

Can I run this on my whole catalog? Yes — pass as many product names as you like. This is the main use case.

What if a product comes back with a low confidence or needsDetail? That means the name is too generic for the schedule to decide. Add the attribute the field names (usually material, capacity or intended use) and run it again.

Is this a binding customs ruling? No. It is a classification aid that gives you the code and the exact schedule line behind it, so you can verify and file with confidence. A licensed customs broker or CBP ruling is still the authority for a formal entry.


Local development

npm install
node test_regression.js # 14 products with hand-checked codes — must all pass
node test_hints.js # every curated code hint / synonym vs the live schedule
node test_smoke.js # 52 products: never crashes, always well-formed output
node test_local.js # ad-hoc product list
npx apify-cli run # run as an Actor locally

Source layout:

main.js Actor entry: input -> classify -> dataset -> charge
src/classify.js classification engine
.actor/actor.json Actor manifest
.actor/input_schema.json
Dockerfile