Skip to Content
Won.dev

Find HS codes

Find the HS code of a product from a description, or list the codes under a prefix. Free.

GET https://api.won.dev/v1/trade/hs-codes

Finds the HS code of a product from a description in English (office chair), or lists the codes under a prefix (9401). Free. Call it first when you only know the product's name: every other trade endpoint is more precise with an hs_code than with product keywords. Six-digit codes are the same in every country; pass one as hs_code to the search endpoints.

Parameters

Parameters go in the query string, lists comma-separated.

ParameterTypeRequiredDescription
qstringyesA product in plain English, such as office chair or led lamp, or the first digits of a code, such as 9401.
limitintegernoHow many codes to return, 1 to 50. Default: 10.
fieldsstring[]noPass us_duty to add the general US duty rate of every tariff line under each code.

Response

Errors are described in Errors.

FieldTypeDescription
dataobject[]The best matches first.
data[].codestringHS code, digits only: 2, 4 or 6 digits.
data[].descriptionstringOfficial description of the code.
data[].parentstring | nullThe code one level up. Null for a chapter.
data[].us_dutyobject[]US general duty rates of the tariff lines under this code.
data[].us_duty[].codestringEight-digit US tariff line.
data[].us_duty[].descriptionstringText of the tariff line.
data[].us_duty[].generalstringGeneral (most-favored-nation) rate of duty, as published.
queryobjectThe request as it was understood: country names as codes, the default dates filled in.
noticestring | nullA plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.
usageobjectNothing is charged here. The balance, for reference.
usage.costnumberWhat this call cost, in US dollars.
usage.balancenumberThe balance left after this call, in US dollars.
usage.replayedbooleanTrue when this is a repeat of a request from the last 24 hours. Repeats are free.

Example

curl "https://api.won.dev/v1/trade/hs-codes?q=sofa&limit=2" \
  -H "Authorization: Bearer $WON_API_KEY"
{
  "data": [
    {
      "code": "940161",
      "description": "Seats (other than those of heading 9402), whether or not convertible into beds, and parts thereof > Other seats, with wooden frames > Upholstered",
      "parent": "9401"
    },
    {
      "code": "940171",
      "description": "Seats (other than those of heading 9402), whether or not convertible into beds, and parts thereof > Other seats, with metal frames > Upholstered",
      "parent": "9401"
    }
  ],
  "query": {
    "q": "sofa",
    "limit": 2
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}

On this page