Business
Business · AI-assisted
HS Code Classifier API
Product description, page or photo to its HS code, with confidence, US HTS duty and EU CN line.
Base URLhttps://hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com/v1/hs-codesopenapi.json
- Free plan
- 20 credits a day
- Paid plans
- from $4.99 a month
- One credit
- Classification 10 credits (national line included); code lookup and search 1.
- Endpoints
- 4, on
/v1/hs-codes
Example call
curl -X POST "https://hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com/v1/hs-codes/classify" \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "X-RapidAPI-Host: hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{
"description": "Men'\''s short-sleeve crew-neck T-shirt, 100% cotton jersey",
"country": "US"
}'
import requests
url = "https://hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com/v1/hs-codes/classify"
payload = {
"description": "Men's short-sleeve crew-neck T-shirt, 100% cotton jersey",
"country": "US"
}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com",
}
r = requests.post(url, json=payload, headers=headers)
print(r.json())
const res = await fetch("https://hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com/v1/hs-codes/classify", {
method: "POST",
headers: {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com",
"Content-Type": "application/json",
},
body: JSON.stringify({
"description": "Men's short-sleeve crew-neck T-shirt, 100% cotton jersey",
"country": "US"
}),
});
console.log(await res.json());
{
"product": "A men's short-sleeve crew-neck T-shirt made of 100% cotton jersey knit fabric.",
"hs_code": "610910",
"results": [
{
"hs_code": "610910",
"formatted": "6109.10",
"section": { "code": "XI", "description": "Textiles and textile articles" },
"chapter": { "code": "61", "description": "Apparel and clothing accessories; knitted or crocheted" },
"heading": { "code": "6109", "description": "T-shirts, singlets and other vests; knitted or crocheted" },
"subheading": { "code": "610910", "description": "T-shirts, singlets and other vests; of cotton, knitted or crocheted" },
"confidence": 1.0,
"reasoning": "The product is a knitted T-shirt made of cotton, which is specifically provided for in heading 6109 under GIR 1 and 6.",
"national": {
"country": "US",
"code": "6109100012",
"formatted": "6109.10.00.12",
"description": "Of cotton › Men's or boys' › Other T-shirts › Men's (338)",
"general_duty": "16.5%",
"units": ["doz.", "kg"]
}
}
],
"to_confirm": [],
"inputs": ["description"],
"edition": "HS 2022",
"disclaimer": "Classification aid, not a binding ruling: have the code confirmed by a licensed customs broker before you declare goods."
}
Classify Product: POST /v1/hs-codes/classify. A real call and its real response.
What the HS Code Classifier API returns
Every parcel that crosses a border needs an HS code, and a wrong one means delays, fines or the wrong duty. Send a product title, description, page URL or photo, in any language, and get its 6-digit HS code with up to 3 candidates, a confidence score, the reasoning, and the official chapter, heading and subheading texts. Add country=US for the 10-digit HTS line and its duty rate, or country=EU for the 8-digit Combined Nomenclature line. About $0.008 per classification on PRO: up to 12x cheaper than other HS code APIs.
- Classification
- 1 to 3 candidate codes, best first, each with confidence and a one-line reasoning based on the General Interpretative Rules
- Real codes only
- Every code is checked against the HS 2022 nomenclature; the AI chooses among the subheadings of the likely headings, never from thin air
- US HTS
- The 10-digit statistical line, its full description and the general (MFN) duty rate, live from the USITC
- EU CN
- The 8-digit Combined Nomenclature line for European declarations
- What to check
- The facts that would change the code (fibre content, knitted or woven, power source...) in
to_confirm - Lookup and search, no AI
- Any code with its hierarchy and national lines, or keywords to codes, for 1 credit
- Any input
- Messy marketplace titles with brand names, most languages, a product page, a photo
Endpoints
Host hs-code-classifier-ai-customs-tariff-lookup.p.rapidapi.com, header X-RapidAPI-Key. Parameters and examples for each one are in the API reference.
Classification
Product to HS code with AI, checked against the nomenclature.
-
POST
/v1/hs-codes/classifyProduct description, page or photo to its HS code -
POST
/v1/hs-codes/classify/uploadUploaded product photo (plus optional text) to its HS code
Lookup
HS codes, their hierarchy and national lines, and keyword search. No AI.
Use cases
- Cross-border e-commerce. An HS code on every product before you print a customs label or a commercial invoice
- Marketplaces. Classify sellers' listings at upload, flag products whose code needs a human check
- Freight forwarders and brokers. A first proposal with reasoning, so the expert only reviews
- Landed cost and duty estimates. HS code plus US duty rate in one call
- ERP and PIM clean-up. Fill or audit the tariff code column of a whole catalogue
Tutorial
Business
Pricing
Classification 10 credits (national line included); code lookup and search 1. Failed calls are never billed.
| Plan | Price | Credits included | Above the quota |
|---|---|---|---|
| BASIC | Free | 20 / day | resets every day |
| PRO | $4.99/mo | 6,000 / month | $0.01 per credit |
| ULTRA | $14.99/mo | 18,000 / month | $0.01 per credit |
| MEGA | $49.99/mo | 60,000 / month | $0.01 per credit |
Subscribe on RapidAPI (opens in a new tab)
No code: the Apify actor
The HS Code Classifier - Bulk Product to HS, HTS & CN Codes actor runs the same engine on a list of inputs and exports a table (JSON, CSV, Excel, Google Sheets). It is billed per result; free-plan users get 10 products per run.
| Event | Charged for | Price |
|---|---|---|
product-classified | Each product classified | $0.0075 |
Questions about the HS Code Classifier API
Can I declare the code as is?
Which HS edition?
Does the US duty include Section 301 or reciprocal tariffs?
general_duty is the general (MFN, column 1) rate of the HTS line. Additional duties in Chapter 99 depend on the origin and change often; check them before you quote a landed cost.









