For engineering and ops teams
HS code API, HS code lookup and classification API for HTS codes
An HS code API turns a product description into a tariff code programmatically, so your catalog, ERP or checkout classifies itself instead of waiting on a spreadsheet. Try the classifier on the right to see the output the API returns, then create your account to get API access.
API on Business and Enterprise plans · Bulk and single-call · AI estimate, not a customs ruling
Customs declaration · AI classifier
FORM TW-01
The short answer
An HS code API is an endpoint you send a product description to and get back a Harmonized System or HTS code, usually with a confidence score and a rationale. It exists so that software can classify goods at the moment a product is created, an order is placed or a shipment is booked, instead of a human looking codes up one at a time. The useful ones do three things: return the full 10-digit US HTS code rather than the 6-digit international stub, explain why that code was chosen so a broker can review it, and accept batches so a 40,000-SKU catalog can be classified in one job. The TariffWise API is the interface for teams that need classification inside their own systems.
What an HS code API returns
A bare code is not enough to act on. The fields below are the ones that decide whether the response is usable in production or whether a human has to redo the work anyway. This is the shape of the classification the demo above produces.
| Field | Why it matters |
|---|---|
| hts_code | The full 10-digit US code. A 6-digit HS code is not enough to file an entry or price duty, because the US rate lives in the last four digits. |
| description | The official tariff text for that line, so a reviewer can sanity-check the code against the legal wording rather than a product name. |
| rationale | Why this line and not the neighboring one. This is what turns a guess into something a broker can review and a record that supports reasonable care. |
| confidence | Lets you route the easy 80 percent straight through and queue only the uncertain ones for human review, which is the whole economic case for the API. |
| duty_rate | The general (MFN) rate for the code, so landed cost can be computed in the same call instead of a second lookup. |
| alternatives | The runner-up codes the classifier considered. Genuinely ambiguous products are common, and hiding the ambiguity is worse than surfacing it. |
Where an HS code API actually sits in a stack
Classification is rarely a standalone task. It is a step inside a workflow somebody already owns, and the integration point decides how much manual work disappears.
Product onboarding (PIM)
Classify at the moment a SKU is created, so the catalog is never missing a code. New products arrive with a tariff code already attached.
Ecommerce checkout
Quote duty and landed cost to an international buyer before they pay, so there is no surprise bill at delivery and no refused parcel.
ERP and procurement
Attach the code to the item master so purchasing, costing and the customs broker all read the same number instead of three versions of it.
3PL and forwarder platforms
Classify client goods at intake, at volume, without staffing a classification desk for every new account you onboard.
Marketplace seller tools
Give thousands of sellers a code for their listings automatically, which is impossible to do by hand at marketplace scale.
Batch catalog cleanup
One-off job: push an entire legacy catalog through, flag the low-confidence rows, and have a human review only those.
How to evaluate an HS code classification API
Run your own products through it, not the vendor's demo set. Take 50 SKUs you already know the correct code for, including the ones your broker argued about, and see how many come back right. Pay attention to what happens at the boundaries: a product that could sit in two headings, a kit or set, a part that might follow its parent machine. Any classifier looks good on "cotton t-shirt" and separates from the pack on "stainless steel bracket for a conveyor motor". Then check the depth of the answer. If it returns 6 digits you still have work to do, because the US duty rate is set at 8 and 10 digits. Ask what happens when the classifier is unsure, whether you get a confidence signal you can threshold on, and whether the reasoning is specific to your product or generic tariff boilerplate. For the manual version of the same method, see how to find the HS code for a product.
Batch classification versus one call at a time
These are two different jobs with different shapes. A single synchronous call fits a checkout or a product-create hook: you want an answer in under a second and you want it now. A catalog backfill is the opposite. Nobody is waiting on a response, the volume is tens of thousands of rows, and what you need is a job you can submit, poll and pull results from, with retries and a stable per-row identifier so results map back to your SKUs. Teams that treat the backfill as a for-loop over the single endpoint usually hit rate limits and then rebuild it as a batch job anyway. Plan for both from the start, and keep a record of which code came from which classification run, because when CBP asks how you arrived at a code two years from now, "the API said so" is a weaker answer than a stored rationale with a date on it.
The compliance line an API does not cross
An API returns a classification. It does not transfer legal responsibility. Under US customs law the importer of record owes reasonable care in classifying goods, and that duty stays with you whether the code came from a junior analyst, a licensed broker or a model. This is not a reason to avoid automation, it is a reason to automate with a paper trail: store the code, the rationale, the input description and the date, review the low-confidence rows, and request a binding ruling from CBP for the handful of high-volume products where certainty is worth the wait. That combination, automated classification for breadth and formal rulings for your top items, is what a well-run compliance program looks like. If you also need to know who else is in this market, the HS code classification software comparison covers the alternatives honestly.
Where TariffWise is today
The classifier above is live and you can use it right now. The API exposes the same engine to your own systems: the endpoints, the batch semantics and the response fields follow the shape you see in the demo, and API access comes with the Business and Enterprise plans. Pricing is outlined on the pricing page, and the demo is free while you evaluate.
HS code API pricing per classification call
Classification APIs are priced three ways: per call, in prepaid credits, or inside a monthly plan. The table lists only what each vendor publishes. TariffWise API access is included in the Business plan at $499 a month for 10,000 classifications, which works out to about 5 cents a call, and in Enterprise at custom volume.
| API | Pricing model | Published price | Returns |
|---|---|---|---|
| TariffWise | Monthly plan | $499 a month for 10,000 classifications (about $0.05 each); Enterprise $998 for 20,000 | 10-digit HTSUS, rationale, confidence, duty rate, alternatives |
| SimplyDuty | Per call | GBP 0.10 per classification call and per duty call; prepaid packs from GBP 9.99 for 100 | Code and duty, separate calls |
| GingerControl | Not published | No rate card published; free hub to try, then a quote | Code plus tariff stack |
| Zonos Classify | Platform tiers | 1,000 free to test, 10,000 a year on the Zonos platform, paid tiers by contact | Country-specific codes for checkout duty |
| Avalara Tariff Code Classification | Quote | Not published | Codes tied to Avalara tax and duty products |
| Gaia Dynamics Platform API | Yearly plans in credits | Plans from $99 a month billed yearly; API details on request | Code, rationale, alternatives |
Per-call pricing wins below a few hundred classifications a month and loses above a few thousand, which is the crossover the SimplyDuty alternative page works through with real numbers. If the API is going to sit behind a catalog of tens of thousands of SKUs, compare yearly-credit vendors carefully; the Gaia Dynamics alternative page shows what a credit plan costs up front. The plan-by-plan breakdown is on the classification cost for importers page.
HS code API questions, answered
What is an HS code API?
An HS code API is a programmatic endpoint that accepts a product description and returns a Harmonized System or HTS tariff code. Instead of a person searching the tariff schedule, your software sends the description and receives the code, usually with a confidence score and a rationale, so classification can happen automatically inside a catalog, checkout or ERP workflow.
Is there a free HS code API?
Some providers publish limited free tiers or trial credits, and public tariff data itself is free to download from the USITC. What is rarely free is the classification decision at volume, because that is the part that costs compute and requires maintenance as the tariff changes each year. TariffWise has a free demo with no card required and plans from $59 a month.
How accurate is AI HS code classification?
Accuracy depends heavily on the product and the quality of the description. Straightforward consumer goods classify reliably; ambiguous items such as multi-function machines, sets and parts are where any classifier, human or model, is least certain. That is why a confidence score matters more than a headline accuracy figure: it lets you auto-approve the clear cases and route the rest to a person.
Can an API give me the full 10-digit HTS code?
It should. The first six digits are the international HS code, shared across countries, but the US duty rate is set at the 8 and 10-digit level in the Harmonized Tariff Schedule. An API that stops at six digits leaves you unable to price duty or file an entry, so confirm the response depth before you build against it.
Do I still need a customs broker if I use a classification API?
A broker files your entry and advises on the parts of customs work that go well beyond classification, including valuation, origin and regulated commodities. An API makes the classification step faster and more consistent; it does not replace the filing or the advice. Many brokers use classification tools themselves to speed up the same work.
Send your first 50 product descriptions through the API this week and compare the codes against your last entries.
Related: tariff classification software, HS code lookup by product.