Tariffwise

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 request early access to the endpoint.

API in early access · No card required · AI estimate, not a customs ruling

Customs declaration · AI classifier

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. Tariffwise is in early access, and the API is the interface we are building 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

We are in early access and we would rather say that plainly than imply a maturity we have not earned. The classifier above is live and you can use it right now. The API is the interface we are building next, shaped by the teams in early access, which is a genuine reason to get in early: the endpoints, the batch semantics and the response fields are still being decided, and the people using it are the ones deciding them. If you have a catalog to classify or a checkout to price, tell us what you need the response to contain and we will build toward it. Pricing for the eventual plans is outlined on the pricing page, and early access is free while we build.

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 early access is free while we build, with no card required.

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.

Tell us what your integration needs to return, and help shape the endpoint.

Try the classifier

Related: tariff classification software, HS code lookup by product.

Declaration ready

The right code, the real cost, before you ship

Join the early-access list and be first in when Tariffwise opens: saved classifications, bulk CSV runs and a defensible audit trail.

Try the demo

Early access · No card required · Your data stays yours