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.
- Billing: Free.
- Mode:
proxy(what the modes mean)
Parameters
Parameters go in the query string, lists comma-separated.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | yes | A product in plain English, such as office chair or led lamp, or the first digits of a code, such as 9401. |
limit | integer | no | How many codes to return, 1 to 50. Default: 10. |
fields | string[] | no | Pass us_duty to add the general US duty rate of every tariff line under each code. |
Response
Errors are described in Errors.
| Field | Type | Description |
|---|---|---|
data | object[] | The best matches first. |
data[].code | string | HS code, digits only: 2, 4 or 6 digits. |
data[].description | string | Official description of the code. |
data[].parent | string | null | The code one level up. Null for a chapter. |
data[].us_duty | object[] | US general duty rates of the tariff lines under this code. |
data[].us_duty[].code | string | Eight-digit US tariff line. |
data[].us_duty[].description | string | Text of the tariff line. |
data[].us_duty[].general | string | General (most-favored-nation) rate of duty, as published. |
query | object | The request as it was understood: country names as codes, the default dates filled in. |
notice | string | null | A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise. |
usage | object | Nothing is charged here. The balance, for reference. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True 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
}
}