E-commerce & Marketplaces

HS Code & Tariff API API

The HS Code & Tariff API returns HS/HTS commodity classification and duty data as clean JSON.

8 actionsLive JSON1,000 free creditsMCP-ready
Get a free keyOpen in playground

🤖 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.

Live example

Real request and response JSON

Captured from the indexed primary action, hs_lookup, on .

Captured request
{
  "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"
  }
}
Captured response
{
  "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."
  }
}
Actions

What the HS Code & Tariff API API does

ActionDescriptionConcrete use caseKey params
hs_lookupOne 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
classifyProduct 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_costHS 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_statusFreshness + 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_classifyUp 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
browseNavigate 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
validateCheck 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_countryOne 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
Code samples

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"}'
MCP one-liner
Ask your MCP-connected assistant: call reefapi.hs-code.hs_lookup with {"code":"8471.30.0100","destination":"US"}.
Use cases

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.
FAQ

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.

docs / hs-code

HS Code & Tariff API

HS Code & Tariff API

base /hs-code/v18 endpoints
post/hs-code/v1/hs_lookup1 credit

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.

ParameterAllowed / rangeDescription
coderequiredThe tariff code to look up. 4-digit heading, 6-digit subheading, or 8/10-digit national line. Dots/spaces are ignored. For US it maps to an HTS line; for UK to a commodity code. A short code resolves to its most specific published rate-bearing line and lists its context.
destinationrequiredUS · UKDestination market whose official tariff schedule to use. v1 covers US and UK only (the two .gov schedules we fetch real data from); EU and other markets are out of scope — do not assume coverage.
Try in playground →
post/hs-code/v1/classify4 credits

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.

ParameterAllowed / rangeDescription
descriptionrequiredFree-text product description to classify into candidate HS codes. Returned candidates carry a confidence band + review_required — they are SUGGESTIONS for a human/broker to confirm, never a final code.
destinationrequiredUS · UKDestination market whose official tariff schedule to use. v1 covers US and UK only (the two .gov schedules we fetch real data from); EU and other markets are out of scope — do not assume coverage.
materialsoptionalOptional: chief material(s) of the product. Appended to the search text to sharpen classification (material drives HS chapters).
limit = 10optional1–50Max candidate results (1-50).
min_confidenceoptional0–1Drop classify candidates whose confidence is below this 0-1 threshold.
Try in playground →
post/hs-code/v1/landed_cost8 credits

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.

ParameterAllowed / rangeDescription
destinationrequiredUS · UKDestination market whose official tariff schedule to use. v1 covers US and UK only (the two .gov schedules we fetch real data from); EU and other markets are out of scope — do not assume coverage.
valuerequired0–Customs/goods value of the shipment (the dutiable base) in `currency`. Duty is applied to this value; VAT/GST to value+duty(+freight where the destination taxes CIF).
codeoptionalEither give a known HS/commodity `code` (preferred — exact duty), OR a `description` (the engine classifies it to a best code first). Code wins if both are given.
descriptionoptionalFree-text product description to classify into candidate HS codes. Returned candidates carry a confidence band + review_required — they are SUGGESTIONS for a human/broker to confirm, never a final code.
originoptionalCountry of origin (ISO-3166 alpha-2). Recorded in the estimate and assumptions; v1 applies the GENERAL/third-country (MFN) rate and does NOT auto-apply trade-preference rates or origin-specific extra duties (e.g. Section 301) — flagged in assumptions.
currency = USDoptionalISO-4217 currency of `value`/`shipping` and of the returned figures. v1 does NOT convert currencies — all outputs are in this same currency.
shippingoptional0–Optional freight/insurance cost. Included in the VAT base for destinations that tax the CIF value (UK); recorded in assumptions.
materialsoptionalOptional: chief material(s) of the product. Appended to the search text to sharpen classification (material drives HS chapters).
Try in playground →
post/hs-code/v1/schedules_status1 credit

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.

Try in playground →
post/hs-code/v1/batch_classify3 credits

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.

ParameterAllowed / rangeDescription
itemsrequiredUp to 25 products, each {description, materials?} (or {code} to look up directly). Each item gets its own candidates + review_required; a bad item yields its own error entry, never failing the batch.
destinationrequiredUS · UKDestination market whose official tariff schedule to use. v1 covers US and UK only (the two .gov schedules we fetch real data from); EU and other markets are out of scope — do not assume coverage.
limit = 5optional1–50Max candidate results (1-50).
min_confidenceoptional0–1Drop classify candidates whose confidence is below this 0-1 threshold.
Try in playground →
post/hs-code/v1/browse1 credit

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`.

ParameterAllowed / rangeDescription
destinationrequiredUS · UKDestination market whose official tariff schedule to use. v1 covers US and UK only (the two .gov schedules we fetch real data from); EU and other markets are out of scope — do not assume coverage.
nodeoptionalWhere in the tariff tree to browse. Omit (or 'root'/'sections') to list the 21 WCO sections. A 2-digit chapter (e.g. '84') lists its headings; a 4-digit heading (e.g. '8471') lists its subheadings/lines; a 6-digit subheading drills into national lines. A Roman section numeral (I-XXII) lists that section's chapters. Dots/spaces ignored.
Try in playground →
post/hs-code/v1/validate1 credit

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.

ParameterAllowed / rangeDescription
coderequiredThe HS/HTS/commodity code to validate. Checked for structure (4/6/8/10 digits) AND existence in the chosen destination's live schedule — a well-formed but non-existent code is reported invalid with the nearest valid parent + suggestions.
destinationrequiredUS · UKDestination market whose official tariff schedule to use. v1 covers US and UK only (the two .gov schedules we fetch real data from); EU and other markets are out of scope — do not assume coverage.
Try in playground →
post/hs-code/v1/cross_country2 credits

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.

ParameterAllowed / rangeDescription
hs6requiredA 6-digit HS subheading (the WCO-international level shared by all 200+ member countries). Dots/spaces ignored; a longer code is truncated to its first 6 digits. Returns the universal HS6 description plus the matching US HTS lines and UK commodity lines side by side.
Try in playground →