HS Code & Tariff API API
The HS Code & Tariff API returns HS/HTS commodity classification and duty data as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary hs_lookup endpoint returns a code's description, units and duty rates (general/MFN, special, column 2) for a destination, and you can classify a product from text, estimate landed_cost, check schedule status, batch-classify, browse, validate a code and compare cross-country. It is built for customs, cross-border e-commerce and trade-compliance workflows that need tariff data without a customs database. One ReefAPI key, one shared credit pool, the standard envelope.
Real request and response JSON
Captured from the indexed primary action, hs_lookup, on .
{
"method": "POST",
"url": "https://api.reefapi.com/hs-code/v1/hs_lookup",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"code": "8471.30.0100",
"destination": "US"
}
}{
"ok": true,
"meta": {
"api": "hs-code",
"endpoint": "hs_lookup",
"mode": "live",
"latency_ms": 1407.7,
"record_count": 1,
"bytes": 16549,
"cache_hit": false,
"sources": [
"hts.usitc.gov"
],
"license": "US-HTS public-domain / UK-OGL",
"schedule_version": "2026HTSRev11"
},
"data": {
"destination": "US",
"code": "[redacted-phone]",
"query_code": "[redacted-phone]",
"record": {
"hts_code": "[redacted-phone]",
"hts_code_digits": "[redacted-phone]",
"indent": 1,
"description": "Portable automatic data processing machines, weighing not more than 10 kg, consisting of at least a central processing unit, a keyboard and a display",
"is_superior": false,
"units": [
"No."
],
"duty": {
"general_mfn": "Free",
"general_mfn_pct": 0,
"special": null,
"column_2": "35%",
"rate_note": null,
"additional_duties": null,
"quota_quantity": null
},
"footnotes": []
},
"context": [
{
"hts_code": "8471",
"description": "Automatic data processing machines and units thereof; magnetic or optical readers, machines for transcribing data onto data media in coded form and machines for processing such data, not elsewhere specified or included:",
"general_mfn": null
},
{
"hts_code": "[redacted-phone]",
"description": "Portable automatic data processing machines, weighing not more than 10 kg, consisting of at least a central processing unit, a keyboard and a display",
"general_mfn": "Free"
},
{
"hts_code": "[redacted-phone]",
"description": "Comprising in the same housing at least a central processing unit and an input and output unit, whether or not combined",
"general_mfn": "Free"
}
],
"schedule_version": "2026HTSRev11",
"source": "USITC HTS (hts.usitc.gov)",
"disclaimer": "Reference classification and rates from the official US (USITC HTS) and UK (HMRC Trade Tariff) schedules — informational only, NOT binding customs or legal advice. Landed-cost figures are estimates. Anti-dumping/countervailing duties, Section 301/232 additional tariffs, rules-of-origin, trade-preference eligibility, quotas and special programs are not fully modelled. Verify the final HS code and duty with a licensed customs broker before relying on it."
}
}What the HS Code & Tariff API API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| hs_lookup | One HS/HTS/commodity code + destination (US|UK) → the official tariff line: description, units, MFN duty rate (+ parsed % when ad-valorem), VAT/GST, special/preference programs, footnotes, schedule version. A 4/6-digit code resolves to its most specific rate-bearing line and lists context. | Pricing teams call hs_lookup to get one HS/HTS/commodity code + destination (US|UK) → the official tariff line. | code, destination |
| classify | Product description (+materials) + destination → ranked candidate HS codes with a confidence band, reason, and review_required. Candidates are SUGGESTIONS for a human/broker to confirm — low-confidence candidates are clearly marked, never shown as a settled code. | Marketplace operators call classify to get product description (+materials) + destination → ranked candidate HS codes with a confidence…. | description, destination, materials, limit, min_confidence |
| landed_cost | HS code (or description → auto-classified) + destination + value (+origin, currency, shipping) → estimated duty + VAT/GST + total landed cost, with an explicit assumptions[] list and the disclaimer. A simple, honest estimate — NOT a customs quote. | Catalog enrichment teams call landed_cost to get hS code (or description → auto-classified) + destination + value (+origin, currency, shipping…. | destination, value, code, description, origin, ... |
| schedules_status | Freshness + coverage of the underlying official schedules (US HTS revision, UK tariff reachability) — so a caller knows how current the rates are and which markets are live. | Retail analysts call schedules_status to get freshness + coverage of the underlying official schedules (US HTS revision, UK tariff reachab…. | none |
| batch_classify | Up to 25 products in one call (discounted). Each item is classified (or looked up if a code is given) independently; one bad item never fails the batch. | Pricing teams call batch_classify to get up to 25 products in one call (discounted). | items, destination, limit, min_confidence |
| browse | Navigate the tariff tree without knowing a keyword: list the 21 WCO sections, drill a section → chapters, a chapter (2-digit) → headings, a heading (4-digit) → subheadings/lines, a subheading (6-digit) → national lines. Each node returns its parent breadcrumb + children. The browse companion to keyword `classify`. | Marketplace operators call browse to get navigate the tariff tree without knowing a keyword. | destination, node |
| validate | Check whether a code is a real, current tariff code in the chosen market — structural check (4/6/8/10 digits) PLUS live existence in the schedule. A well-formed but unknown code returns valid=false with the nearest valid parent + sibling suggestions, so a caller can correct a typo'd or expired code before filing. | Catalog enrichment teams call validate to check whether a code is a real, current tariff code in the chosen market. | code, destination |
| cross_country | One 6-digit HS subheading (the WCO-international level shared by every member country) → the universal HS6 description plus the matching US (USITC HTS) and UK (HMRC) national lines side by side, with each market's duty rate. The same product, compared across the markets we cover — first 6 digits identical worldwide, national 8/10-digit detail differs. | Retail analysts call cross_country to get one 6-digit HS subheading (the WCO-international level shared by every member country) → the…. | hs6 |
Call hs_lookup from your stack
curl -X POST https://api.reefapi.com/hs-code/v1/hs_lookup \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"code":"8471.30.0100","destination":"US"}'import requests
r = requests.post(
"https://api.reefapi.com/hs-code/v1/hs_lookup",
headers={"x-api-key": REEF_KEY},
json={
"code": "8471.30.0100",
"destination": "US"
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/hs-code/v1/hs_lookup", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"code": "8471.30.0100",
"destination": "US"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.hs-code.hs_lookup with {"code":"8471.30.0100","destination":"US"}.Who uses this API and why
- Cross-border e-commerce tools call classify then landed_cost to quote duties and taxes at checkout.
- Trade-compliance teams use hs_lookup and validate to confirm the correct code and duty rate.
- Logistics products use cross_country to compare tariffs for a commodity across destinations.
Questions developers ask before integrating
What is the HS Code & Tariff API API?
HS Code & Tariff API API is a ReefAPI endpoint group for hs code & tariff api It returns live JSON through POST requests under /hs-code/v1.
Is the HS Code & Tariff API API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. HS Code & Tariff API calls use the same shared credit balance as every other ReefAPI engine.
Do I need a HS Code & Tariff API login or account?
No login to HS Code & Tariff API is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the HS Code & Tariff API data?
The page example is captured from a live hs_lookup call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the HS Code & Tariff API API use?
HS Code & Tariff API actions currently cost 1-8 credits per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.
Can I call HS Code & Tariff API from an AI assistant or MCP client?
Yes. Connect ReefAPI once through MCP and your assistant can call hs-code actions with the same key, credit pool and JSON envelope used by normal REST requests.
Is the HS Code & Tariff API API a HS Code & Tariff API scraper?
It is the managed alternative to a DIY HS Code & Tariff API scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same hs code & tariff api back as clean JSON.
Why does my HS Code & Tariff API scraper keep getting blocked?
Most HS Code & Tariff API scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked or failed calls are free.