Mate
Choose language and regionUnited Statesen-US

Classification API · One call · Duty included

HS classification, as an API.

Send a product description, get a 6-digit HS code, the US, EU or UK duty rate, the confidence score and the reasoning that led there. One HTTP call, JSON in and JSON out, no UI to click through. Trial keys carry 100 classifications and pack credits never expire.

Free trial · 100 classifications · No card

Get a trial key

Enter a work email and we issue a key immediately. The key looks likehsm_live_…, carries 100 classifications, and one key is issued per email.

What one call returns

POST /api/v1/classify takes two fields: q, the product description in plain English, and country, one of us, eu oruk (default us). The response is the 6-digit code, its official description, a confidence score and band, the duty rate estimate for that destination, the runner-up candidates and a short reasoning string you can log or show to a colleague.

Every successful classification response also carries X-Credits-Remaining, so you can meter without a second call. Both POST endpoints accept an optionalIdempotency-Key header: send the same key twice and the second request replays the first answer instead of spending another credit.

Pricing

Classification with duty is priced per item by this market. KYG Trade charges $0.44 to $1.98 per classification. Zonos Classify starts at $500 a month. HS Ping lists $49 a month for 50,000 lookups. Our packs run $0.05 to $0.198 per classification, and the trial is free. Those three anchors are as their vendors publish them: check each one before you compare, because what a plan includes differs.

PlanIncludesPrice · USD / EUR / GBPPer classification
Trial100 classificationsFree. One per email.USD$0EUR€0GBP£0$0
Pack 500500 creditsOne-off. Credits never expire.USD$99EUR€99GBP£85$0.198
Pack 5,0005,000 creditsOne-off. Credits never expire.USD$499EUR€499GBP£429$0.0998
Pack 50,00050,000 creditsOne-off. Credits never expire.USD$2,499EUR€2,499GBP£2,149$0.05
Business1,000 / monthMonthly, cancel anytime. Batch and up to 5 API keys.USD$109/moEUR€99/moGBP£85/mo$0.109

USD is the list price. EUR and GBP are the equivalents for buyers billed in those currencies. A credit is charged only for a confident classification. When the engine is not sure enough (confidence below 0.6) it returns the candidates and the reasoning as a review and charges nothing. A batch reports credits_charged so the arithmetic is visible.

Paying by card opens Stripe Checkout; the key is emailed to the address on the payment, and the same address can be used for the trial first. Prefer an invoice? Email support@hsmate.com.

Quickstart

Issue a key above, export it, and the first call works as-is.

Classify one product

export HSMATE_KEY="hsm_live_..."

curl https://hsmate.com/api/v1/classify \
  -H "Authorization: Bearer $HSMATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"stainless steel vacuum flask","country":"us"}'

Classify a batch

Up to 50 items per request. Each item needs an id you choose. Failures are reported per item with ok: false, so one bad row does not sink the batch.

curl https://hsmate.com/api/v1/batch/classify \
  -H "Authorization: Bearer $HSMATE_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: batch-2026-11-26-a" \
  -d '{"items":[
    {"id":"sku-1","q":"stainless steel vacuum flask","country":"us"},
    {"id":"sku-2","q":"cotton knitted t-shirt, women, printed","country":"eu"}
  ]}'

Check usage

curl https://hsmate.com/api/v1/usage \
  -H "Authorization: Bearer $HSMATE_KEY"

GET /api/v1/usage returns the plan, credits total, used and remaining, andperiod_end, which is null for a pack and a date for a monthly plan.

Response

{
  "code": "9617.00",
  "description": "Vacuum flasks and other vacuum vessels, complete with cases; parts thereof",
  "confidence": 0.87,
  "confidence_band": "high",
  "duty_rate_estimate": "6.5%",
  "candidates": [
    {
      "code": "9617.00",
      "description": "Vacuum flasks and other vacuum vessels, complete with cases",
      "confidence": 0.87
    },
    {
      "code": "7323.93",
      "description": "Articles of stainless steel, for household use",
      "confidence": 0.06
    }
  ],
  "reasoning": "Double-walled stainless steel vessel with a screw lid and no electrical parts. Heading 9617 covers vacuum vessels; the steel body alone would suggest 7323, but the insulating function decides the heading."
}

The quality gate

A cheap classifier that guesses is worse than one that says it does not know. Below 0.6 confidence the response is a review, not a code: no credit is spent, and you get the competing candidates and the reasoning to finish the job yourself.

{
  "needs_review": true,
  "confidence": 0.45,
  "confidence_band": "medium",
  "candidates": [
    {
      "code": "8210.00",
      "description": "Hand-operated mechanical appliances, used in the preparation of food or drink",
      "confidence": 0.45
    },
    {
      "code": "9617.00",
      "description": "Vacuum flasks and other vacuum vessels, complete with cases",
      "confidence": 0.41
    }
  ],
  "reasoning": "The description names a stainless steel vessel; the insulating function is not stated explicitly, so two headings remain plausible.",
  "credits_remaining": 100
}

confidence_band is one of high, medium orlow. The batch response has the same fields per item insideresults, plus credits_charged and credits_remaining:

{
  "results": [
    {
      "id": "sku-1",
      "ok": true,
      "code": "9617.00",
      "description": "Vacuum flasks and other vacuum vessels, complete with cases",
      "confidence": 0.87,
      "confidence_band": "high",
      "duty_rate_estimate": "6.5%",
      "reasoning": "Insulated stainless steel vessel, no electrical parts."
    },
    {
      "id": "sku-2",
      "ok": false,
      "error": "no_match"
    }
  ],
  "credits_charged": 2,
  "credits_remaining": 98
}

A usage check, for a 500-credit pack with 12 spent:

{
  "plan": "pack",
  "credits_total": 500,
  "credits_used": 12,
  "credits_remaining": 488,
  "period_end": null
}

Errors

Errors are JSON with a machine-readable error string and a human message. The HTTP status is authoritative; the string is stable enough to branch on.

HTTPerrorMeaning
400invalid_inputThe JSON body, the query, or the country was malformed. Nothing was charged.
401invalid_keyMissing, revoked or malformed bearer token. Check the Authorization header.
402insufficient_creditsThe key has no credits left. Buy a pack or top up, then retry.
429rate_limitedToo many requests from this key. Back off and retry after the window.
502classification_failedThe classifier could not answer. Retry with an Idempotency-Key so a retry cannot double charge.
409trial_already_issuedA trial key already exists for that email.
403forbiddenThis network or origin may not request trial keys.
503trial_unavailableTrial issuing is paused. Email support and we will send a key.

The trial endpoint answers 201 with { "key": "hsm_live_…", "credits": 100 }. The other three endpoints require Authorization: Bearer hsm_live_….

The full machine-readable contract, including every schema and error response, is at/openapi.json (OpenAPI 3.1).

White-label

Run the classifier under your own brand, one tenant at a time. From $999 a month per tenant plus $0.05 per classification, with a 12-month minimum. You get the API, the six-digit codes and duty estimates for your markets, and your own front end. Suitable for brokers, forwarders and SaaS platforms whose customers need codes but who do not want to build a classifier.

Email support@hsmate.com

Dataset licence

Licence the classification and duty dataset itself, for training, enrichment or offline lookups. $3,500 a year for internal use. $9,500 a year if you redistribute it inside a product you sell. $1,500 one-time for a single export of the data. Scope is agreed in writing before delivery.

Email support@hsmate.com

Frequently asked

Is a classification a legal ruling?
No. It is an advisory code with a duty estimate, produced from the product description, the published tariff schedules and the General Rules of Interpretation. A binding decision comes only from a customs authority: a CBP ruling in the US, a BTB in the EU, an ATaR in the UK. Treat the response as a strong draft that you, your broker or your compliance team signs off, not as a ruling you can cite to an officer.
What does one credit buy?
One confident product classification: the 6-digit code, its description, a confidence score and band, the duty rate estimate for the chosen country, alternative candidates and the reasoning. If the engine cannot reach 0.6 confidence, the response comes back as needs_review with the candidates and the reasoning, and no credit is spent. In a batch, each confident item spends one credit and the response reports credits_charged, so a 50-item batch costs at most 50 credits. A request rejected with 400, 401 or 402 charges nothing.
Do pack credits expire?
No. Packs are prepaid balances. Buy 500 or 50,000, spend them over months, and nothing expires at the end of a month. Business is the only monthly plan: 1,000 classifications a month, cancel anytime, and the allowance resets with each billing month.
How accurate is it?
For clearly described goods the answer is usually the heading a broker would pick, and 6-digit codes are the level where classification is decided for duty. For ambiguous goods the honest signal is confidence_band. High means one candidate dominates. Medium and low mean the description lacks the detail that separates two headings, and you should read the candidates before you file. The API never hides a low confidence score.
Can I resell it?
No. The API is licensed for your own classification work, not for resale, sublicensing or embedding in a product you sell. Redistribution needs the dataset licence ($9,500 a year) or a white-label agreement, which lets you run the classifier under your own brand per tenant.
Where does the duty data come from?
The published tariff schedules: the US Harmonized Tariff Schedule from the USITC, TARIC and the Combined Nomenclature for the EU, and the UK Trade Tariff. duty_rate_estimate is the ad valorem rate the schedule lists for the code and destination. It is an estimate: it excludes anti-dumping and countervailing duties, quotas, and preferential rates you may claim under a trade agreement, so confirm the landed rate before you commit to a price.

The API is an advisory tool. It does not replace a customs broker, a binding ruling or your own compliance sign-off.