HS Code

GET/v0/hs-code

Validates and looks up a Harmonized System (HS) tariff code used in international trade classification. Accepts 2-digit (chapter), 4-digit (heading), or 6-digit (subheading) codes. Returns the description and full hierarchy (chapter → heading → subheading). Dots, dashes, and spaces in the input are stripped automatically.

Guides: Node.js · Python

Try it

Query Parameters

ParamTypeRequiredDescription
valuestringYesThe HS code to validate. Accepts 2, 4, or 6 digits (e.g. 84, 8471, 847130).

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.isvalid.dev/v0/hs-code?value=8471.30"

Response Fields

FieldTypeDescription
validbooleanWhether the code is a recognised HS code
codestringThe normalised HS code (digits only)
levelstringchapter, heading, or subheading
descriptionstringOfficial WCO description of this code
formattedstringHuman-readable formatted code (e.g. 84.71.30)
chapterobjectParent chapter (for headings and subheadings)
headingobjectParent heading (for subheadings only)
errorstringError message when invalid

Example Response — Heading

{
  "valid": true,
  "code": "8471",
  "level": "heading",
  "description": "Automatic data-processing machines and units thereof",
  "formatted": "84.71",
  "chapter": {
    "code": "84",
    "description": "Nuclear reactors, boilers, machinery and mechanical appliances; parts thereof"
  }
}

Example Response — Chapter

{
  "valid": true,
  "code": "84",
  "level": "chapter",
  "description": "Nuclear reactors, boilers, machinery and mechanical appliances; parts thereof",
  "formatted": "84"
}
GET/v0/hs-code/list

Returns HS codes, optionally filtered by chapter and/or level. Useful for building hierarchical code selectors.

Query Parameters

ParamTypeRequiredDescription
chapterstringNoFilter by chapter (2-digit code, e.g. 84)
levelstringNoFilter by level: chapter, heading, or subheading

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.isvalid.dev/v0/hs-code/list?chapter=84&level=heading"

Example Response

[
  { "code": "8401", "level": "heading", "description": "Nuclear reactors; fuel elements (cartridges), non-irradiated, for nuclear reactors; machinery and apparatus for isotopic separation" },
  { "code": "8402", "level": "heading", "description": "Steam or other vapour generating boilers" },
  { "code": "8403", "level": "heading", "description": "Central heating boilers other than those of heading 84.02" },
  ...
]