跳到正文
Won.dev
海关数据 API

查 HS 编码

根据商品描述查询 HS 编码,或列出某个前缀下的所有编码。免费。

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

根据英文商品描述(如 office chair)查询 HS 编码,或者列出某个前缀(如 9401)下的所有编码。免费。如果只知道商品名称,请先调用这个接口:其他贸易接口用 hs_code 查询,比用 product 关键词更准确。六位编码全球通用,可以直接作为 hs_code 传给搜索接口。

参数

参数放在查询字符串里,多个值用英文逗号分隔。

参数类型必填说明(API 原文)
qstring是A product in plain English, such as office chair or led lamp, or the first digits of a code, such as 9401.
limitinteger否How many codes to return, 1 to 50. Default: 10.
fieldsstring[]否Pass us_duty to add the general US duty rate of every tariff line under each code.

响应

错误说明见错误码。

字段类型说明(API 原文)
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.

示例

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
  }
}

本页内容