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

找买家或供应商

按商品查询进口商或出口商排名。按返回的公司数计费。

POST https://api.won.dev/v1/trade/companies/search

按商品查询进口商或出口商排名:role: importer 找买家,role: exporter 找供应商。每返回一家公司收取 $0.01,空结果免费。shipments 是海关记录条数,recorded_value_usd 只累加申报了金额的记录,两者都不代表市场份额;查询市场规模请用 POST /trade/stats/query。country 是货物的申报国,不一定是公司注册地。同一家公司的多行会被合并,所以一页的结果可能少于 limit。约三分之一的公司带有 website,其余公司的官网由 POST /trade/leads/find 和联系人接口负责查找。下一步:用 GET /trade/companies/{id} 查看单家公司的档案,或者用 POST /trade/leads/find 一次拿到名单和联系方式。

  • 计费: trade_company $0.01:买家、供应商或贸易伙伴列表中的一家公司,或一条线索中的公司。
  • 数据模式: proxy (各模式的含义)

参数

参数放在 JSON 请求体里。POST 请求还支持 Idempotency-Key 请求头,见幂等。

参数类型必填说明(API 原文)
roleimporter | exporter是importer returns the companies that buy the product: buyers. exporter returns the companies that sell it: suppliers.
hs_codestring否HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with GET /trade/hs-codes.
productstring否Product keywords in English, such as office chair. A fuzzy match on the goods description. Use it when you do not know the HS code; an hs_code is more precise.
importer_countrystring否Country the goods are imported into: an ISO code such as US, or an English name such as United States.
exporter_countrystring否Country the goods are exported from: an ISO code such as VN, or an English name such as Vietnam.
trading_withstring否Only companies that trade with this one: its co_ ID, or its name. With role: importer these are the buyers of that exporter, with role: exporter the suppliers of that importer. Either way it is matched by its name as it stands in the records, so companies that share the name count together.
exclude_forwardersboolean否Leave out freight forwarders and logistics companies, which stand on bills of lading in place of the real buyer or seller. Default: true.
sortshipments | recorded_value否shipments ranks by number of records. recorded_value ranks by declared value; only records that carry a value count, so it favors routes whose exporting country publishes values. Default: shipments.
sincestring否First day of the date range, YYYY-MM-DD. Default: the first day of the month 12 months before until.
untilstring否Last day of the date range, YYYY-MM-DD. Default: up to the latest records.
limitinteger否How many results to return, 1 to 100. You pay for the results returned. Default: 10.
cursorstring否To get the next page, pass next_cursor of the previous response back unchanged, with the same parameters.
max_costnumber否Spending cap for this call in US dollars. If the call could cost more, it fails with budget_exceeded before anything is charged.
dry_runboolean否If true, only return the maximum cost of this call. Nothing runs, nothing is charged. Default: false.

响应

传入 dry_run: true 时不执行查询,data 中只返回本次调用的最高费用,见预估费用。错误说明见错误码。

字段类型说明(API 原文)
dataobject[]The results of this page.
data[].idstringCompany ID, such as co_8f3k2m9x4p1q.
data[].namestringName as written on shipping documents.
data[].roleimporter | exporterThe side it is on in these records.
data[].countrystring | nullCountry the company imports into or exports from in these records.
data[].shipmentsintegerNumber of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented.
data[].recorded_value_usdnumber | nullSum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value.
data[].websitestring | nullBare domain, such as example.com. Often null.
data[].sample_productstring | nullA goods description from one of its records.
totalintegerHow many results match in all. Use it to decide between paging on and narrowing the query.
has_morebooleanWhether more results follow this page.
next_cursorstring | nullPass it as cursor to get the next page. Null on the last page.
queryobjectThe request as it was understood: country names as codes, the default dates filled in. data_through says how recent the records behind the answer are.
query.data_throughstring | nullDate of the latest record this query can see, YYYY-MM-DD. Records arrive weeks after a shipment, so recent months are incomplete.
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.
usageobjectWhat this call was charged, and the balance left.
usage.unittrade_record | trade_company | trade_company_profile | trade_lookup | person_email | company_channels | trade_stats | trade_official_statsWhat is counted.
usage.recordsintegerHow many were returned and charged.
usage.already_paidintegerHow many more were returned for free, because this organization paid for them in the last 30 days.
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/companies/search \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "importer",
  "hs_code": "940161",
  "importer_country": "US",
  "limit": 2
}'
{
  "data": [
    {
      "id": "co_8f3k2m9x4p1q",
      "name": "SAMPLE NORTHFIELD HOME FURNISHINGS INC",
      "role": "importer",
      "country": "US",
      "shipments": 1840,
      "recorded_value_usd": 21480350.4,
      "website": "northfield-home.example",
      "sample_product": "UPHOLSTERED SOFA WITH WOODEN FRAME, FABRIC COVER"
    },
    {
      "id": "co_3d9t6w1b7n5z",
      "name": "SAMPLE HARBORSIDE SEATING CO",
      "role": "importer",
      "country": "US",
      "shipments": 962,
      "recorded_value_usd": 9310772.15,
      "website": "harborside-seating.example",
      "sample_product": "RECLINER SOFA SET, LEATHER, 3 SEATER"
    }
  ],
  "total": 4087,
  "has_more": true,
  "next_cursor": "cur_Zx81kQp4b2JtMW0uMXJ6ZzQ",
  "query": {
    "role": "importer",
    "hs_code": "940161",
    "importer_country": "US",
    "exclude_forwarders": true,
    "sort": "shipments",
    "since": "2025-11-01",
    "until": "2026-11-20",
    "data_through": "2026-11-11"
  },
  "notice": null,
  "usage": {
    "unit": "trade_company",
    "records": 2,
    "already_paid": 0,
    "cost": 0.02,
    "balance": 48.08,
    "replayed": false
  }
}

用测试 key(won_test_...)发送这个请求,会返回同一批样例公司,不收费。

本页内容