海关数据 API
公司详情
公司档案和贸易概况,可按需附带贸易伙伴、最近货运记录、联系人和公开渠道。
GET https://api.won.dev/v1/trade/companies/{id}
返回一家公司的信息:所在地、进口商还是出口商、贸易概况(货运记录数、供应商和买家数量、HS 编码、最近一次出货),以及已知的公开联系渠道。收取 $0.04。include 可以在同一次调用中追加以下内容,各自按对应单位计费,按实际返回的数量收费:partners(前 10 大供应商,以出口为主的公司则为买家;每家 $0.01)、recent_shipments(最近 10 条记录;每条 $0.005)、contacts(最多 5 位采购和管理层联系人,附带验证过的工作邮箱;每位 $0.03)和 channels(读取公司官网上的公共邮箱、电话、WhatsApp 等即时通讯账号和社交媒体主页;官网上有才收取 $0.02)。加载失败的部分返回 null,不收费。如需其他筛选条件或更多结果,请调用该公司的 partners、shipments 和 contacts 接口。
- 计费:
trade_company_profile$0.04:一份公司档案。trade_company$0.01:买家、供应商或贸易伙伴列表中的一家公司,或一条线索中的公司。trade_record$0.005:一条货运记录。person_email$0.03:一位联系人,附带公司自有域名下、已通过验证的工作邮箱。company_channels$0.02:从一家公司官网上找到的公共邮箱、电话或即时通讯账号,不论数量多少。 - 数据模式:
merge(各模式的含义)
参数
id 放在路径中,其余参数放在查询字符串里,多个值用英文逗号分隔。
| 参数 | 类型 | 必填 | 说明(API 原文) |
|---|---|---|---|
id | string | 是 | Company ID, such as co_8f3k2m9x4p1q. Search results carry it; GET /trade/companies/lookup?q= finds it by name. |
include | (partners | recent_shipments | contacts | channels)[] | 否 | Parts to add: partners, recent_shipments, contacts, channels. Each is billed by its own unit. |
max_cost | number | 否 | Spending cap for this call in US dollars. If the call could cost more, it fails with budget_exceeded before anything is charged. |
dry_run | boolean | 否 | If true, only return the maximum cost of this call. Nothing runs, nothing is charged. Default: false. |
响应
传入 dry_run: true 时不执行查询,data 中只返回本次调用的最高费用,见预估费用。错误说明见错误码。
| 字段 | 类型 | 说明(API 原文) |
|---|---|---|
data | object | The company, with the parts asked for in include. |
data.id | string | Company ID, such as co_8f3k2m9x4p1q. |
data.name | string | Name as written on shipping documents. |
data.country | string | null | ISO 3166-1 alpha-2 country code, such as US. |
data.type | importer | exporter | both | null | Whether it imports, exports or both, by its records. |
data.website | string | null | Bare domain, such as example.com. Null when not known. |
data.address | string | null | Address as on its records. |
data.channels | object | Ways to reach the company that it publishes itself. People are in contacts. |
data.channels.emails | string[] | Shared addresses such as info@ and sales@. |
data.channels.phones | string[] | Phone numbers the company publishes: in E.164, such as +4952112340, when the country can be told, else as printed. Fax numbers are left out. |
data.channels.messaging | object[] | WhatsApp, WeChat, Zalo, LINE, Skype and Telegram contacts the company gives. |
data.channels.messaging[].app | whatsapp | wechat | zalo | line | skype | telegram | |
data.channels.messaging[].value | string | A number in E.164 for WhatsApp, else the ID or number as printed. |
data.channels.social | object | Links to its public pages. Null where none is known. |
data.channels.social.linkedin | string | null | |
data.channels.social.facebook | string | null | |
data.channels.social.twitter | string | null | |
data.channels.social.instagram | string | null | |
data.channels.social.youtube | string | null | |
data.channels.social.tiktok | string | null | |
data.channels.social.pinterest | string | null | |
data.trade | object | null | Null when no trade summary is known yet. |
data.trade.shipments | integer | null | All shipment records of the company. |
data.trade.suppliers | integer | null | Number of distinct suppliers. |
data.trade.buyers | integer | null | Number of distinct buyers. |
data.trade.hs_codes | string[] | HS codes it trades, digits only. |
data.trade.last_shipment | string | null | Date of its latest record, YYYY-MM-DD. |
data.partners | object[] | null | With include=partners: the largest trading partners of the last 12 months. role says whether they are suppliers or buyers. |
data.partners[].id | string | Company ID, such as co_8f3k2m9x4p1q. |
data.partners[].name | string | Name as written on shipping documents. |
data.partners[].role | supplier | buyer | What it is to the company asked about. |
data.partners[].country | string | null | ISO 3166-1 alpha-2 country code, such as US. |
data.partners[].shipments | integer | Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented. |
data.partners[].recorded_value_usd | number | null | Sum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value. |
data.partners[].share | number | null | This partner's part of the company's records in the same direction, from 0 to 1. Shows how concentrated its suppliers or buyers are. |
data.partners[].website | string | null | Bare domain, such as example.com. Often null. |
data.partners[].sample_product | string | null | A goods description from one of its records. |
data.recent_shipments | object[] | null | With include=recent_shipments: the latest records of the last 12 months. |
data.recent_shipments[].id | string | Shipment ID, such as shp_5k2m8x1q9d3f. |
data.recent_shipments[].date | string | null | Date of the record, YYYY-MM-DD. |
data.recent_shipments[].importer | object | The buyer on the record. |
data.recent_shipments[].importer.id | string | null | Company ID. Pass it to the company endpoints. Null when the party is not named. |
data.recent_shipments[].importer.name | string | null | Name as written on the record. |
data.recent_shipments[].importer.country | string | null | ISO 3166-1 alpha-2 country code, such as US. |
data.recent_shipments[].exporter | object | The seller on the record. |
data.recent_shipments[].exporter.id | string | null | Company ID. Pass it to the company endpoints. Null when the party is not named. |
data.recent_shipments[].exporter.name | string | null | Name as written on the record. |
data.recent_shipments[].exporter.country | string | null | ISO 3166-1 alpha-2 country code, such as US. |
data.recent_shipments[].hs_code | string | null | HS code as declared, digits only. |
data.recent_shipments[].description | string | null | Goods description, at most 200 characters. |
data.recent_shipments[].description_truncated | boolean | Present and true when description was cut. Ask for description_full. |
data.recent_shipments[].quantity | number | null | Quantity as declared, in quantity_unit. |
data.recent_shipments[].quantity_unit | string | null | Unit of quantity as declared. |
data.recent_shipments[].weight_kg | number | null | Weight in kilograms. |
data.recent_shipments[].value_usd | number | null | Declared value. Null when the record has none, as on US bills of lading. |
data.recent_shipments[].origin_country | string | null | Country of origin of the goods. |
data.recent_shipments[].loading_port | string | null | Port where the goods were loaded. |
data.recent_shipments[].unloading_port | string | null | Port where the goods were unloaded. |
data.recent_shipments[].transport | sea | air | road | rail | other | null | Mode of transport. |
data.recent_shipments[].reported_by | object | null | Whose customs declaration this record is. A US import can be recorded by a US bill of lading (US, import) and again by the exporter's declaration (VN, export). |
data.recent_shipments[].reported_by.country | string | ISO 3166-1 alpha-2 country code, such as US. |
data.recent_shipments[].reported_by.flow | import | export | Whether that country recorded it as an import or as an export. |
data.recent_shipments[].unit_price_usd | number | null | Declared value for one unit of quantity, in US dollars. |
data.recent_shipments[].incoterm | string | null | Trade term, such as FOB or CIF. |
data.recent_shipments[].brand | string | null | Brand named on the record. |
data.recent_shipments[].bill_of_lading | string | null | Bill of lading or declaration number, as on the customs record. |
data.recent_shipments[].description_full | string | null | The whole goods description, however long. |
data.contacts | object[] | null | With include=contacts: people to approach, each with a verified work email. |
data.contacts[].id | string | Person ID, such as per_4m7q2x9k1c8d. Kept for your account for 90 days after it was last returned, with the email: pass it as contact_id to add the person to a campaign. |
data.contacts[].name | string | null | Full name. |
data.contacts[].title | string | null | Job title. |
data.contacts[].seniority | owner | c_level | executive | manager | senior | staff | null | Level, read from the title. |
data.contacts[].department | purchasing | sales | management | operations | marketing | finance | engineering | quality | it | hr | legal | null | Department, read from the title. |
data.contacts[].email | string | Work email on the company's own domain. |
data.contacts[].email_status | verified | risky | verified: the mailbox exists. risky: the domain accepts every address, so the mailbox cannot be confirmed. |
data.contacts[].linkedin_url | string | null | The person's LinkedIn profile, when known. |
data.contacts[].other_email | string | null | Another email address listed for the person. Often on the company's domain too, but it can be a private address, and it is not verified. |
data.contacts[].phones | string[] | Phone numbers listed for the person: a direct line, a mobile or the company's switchboard. Not verified. |
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 | What this call was charged, and the balance left. |
usage.cost | number | What this call cost, in US dollars. |
usage.breakdown | object[] | Every billing unit that came back, charged or not. Empty when nothing did. |
usage.breakdown[].unit | trade_record | trade_company | trade_company_profile | trade_lookup | person_email | company_channels | trade_stats | trade_official_stats | What is counted. |
usage.breakdown[].records | integer | How many were returned and charged. |
usage.breakdown[].already_paid | integer | How many more were returned for free, because this organization paid for them in the last 30 days. |
usage.breakdown[].cost | number | What they 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. |
示例
curl "https://api.won.dev/v1/trade/companies/co_8f3k2m9x4p1q?include=contacts" \
-H "Authorization: Bearer $WON_API_KEY"{
"data": {
"id": "co_8f3k2m9x4p1q",
"name": "SAMPLE NORTHFIELD HOME FURNISHINGS INC",
"country": "US",
"type": "importer",
"website": "northfield-home.example",
"address": "1200 Sample Parkway, Charlotte, NC 28202, United States",
"channels": {
"emails": [
"info@northfield-home.example",
"sales@northfield-home.example"
],
"phones": [
"+15550100142"
],
"messaging": [
{
"app": "whatsapp",
"value": "+15550100142"
}
],
"social": {
"linkedin": "https://www.linkedin.com/company/northfield-home",
"facebook": null,
"twitter": null,
"instagram": null,
"youtube": null,
"tiktok": null,
"pinterest": null
}
},
"trade": {
"shipments": 1840,
"suppliers": 3,
"buyers": 0,
"hs_codes": [
"940161",
"940171",
"940190"
],
"last_shipment": "2026-11-11"
},
"contacts": [
{
"id": "per_4m7q2x9k1c8d",
"name": "Jordan Lee",
"title": "Director of Global Sourcing",
"seniority": "executive",
"department": "purchasing",
"email_status": "verified",
"linkedin_url": "https://www.linkedin.com/in/sample-jordan-lee",
"email": "jordan.lee@northfield-home.example"
}
]
},
"query": {
"id": "co_8f3k2m9x4p1q",
"include": [
"contacts"
]
},
"notice": null,
"usage": {
"cost": 0.07,
"breakdown": [
{
"unit": "trade_company_profile",
"records": 1,
"already_paid": 0,
"cost": 0.04
},
{
"unit": "person_email",
"records": 1,
"already_paid": 0,
"cost": 0.03
}
],
"balance": 48.01,
"replayed": false
}
}用测试 key(won_test_...)发送这个请求,会返回同一批样例公司,不收费。