# 企業を照会する

Source: https://won.dev/ja/docs/trade/companies-lookup

`GET https://api.won.dev/v1/trade/companies/lookup`

企業名またはWebサイトから企業を探し、IDを返します。企業のエンドポイントはすべてこのIDを使います。何か見つかった照会には、候補の数に関係なく $0.02。何も見つからなければ無料です。名前は船積書類に書かれたとおりに照合するため、1社が国や綴りの違う複数の候補として返ることがあります。`country` と `shipments` を見て選んでください。Webサイトで見つかるのは、以前に検索結果に出たことのある企業だけです。見つからないときは企業名で照会してください。

- **課金：** `trade_lookup` $0.02：企業名やWebサイトによる照会1回。1社以上見つかったものに限ります。
- **モード：** `waterfall` ([各モードの意味](/ja/docs/trade#modes))

テストキー（`won_test_...`）でこのリクエストを送ると、同じサンプル企業が無料で返ります。

## パラメーター [#parameters]

パラメーターはクエリ文字列で渡し、リストはカンマ区切りにします。

| パラメーター | 型 | 必須 | 説明（APIの原文） |
| --- | --- | --- | --- |
| `q` | string | はい | A company name, such as `Acme Furniture`, or its website, such as `acme.com`. |
| `country` | string | いいえ | Only companies in this country. An ISO code such as `US`, or an English name such as `United States`. |
| `limit` | integer | いいえ | How many candidates to return, 1 to 10. Default: `5`. |
| `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`. |

## レスポンス [#response]

`dry_run: true` を指定すると何も実行されず、`data` にはその呼び出しの最大費用だけが入ります。[ドライラン](/ja/docs/responses#dry-run)を参照してください。エラーについては[エラーコード](/ja/docs/errors)を参照してください。

| フィールド | 型 | 説明（APIの原文） |
| --- | --- | --- |
| `data` | object[] | The candidates, best match first. |
| `data[].id` | string | Company ID, such as `co_8f3k2m9x4p1q`. |
| `data[].name` | string | Name as written on shipping documents. |
| `data[].country` | string \| null | Where the company is, from its address when one is on file, otherwise the country of its records. |
| `data[].website` | string \| null | Bare domain, such as `example.com`. Often null. |
| `data[].shipments` | integer \| null | All shipment records of the company, when known. |
| `data[].last_shipment` | string \| null | Date of its latest record, `YYYY-MM-DD`. |
| `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.unit` | `trade_record` \| `trade_company` \| `trade_company_profile` \| `trade_lookup` \| `person_email` \| `company_channels` \| `trade_stats` \| `trade_official_stats` \| `market_search` \| `market_listings` \| `market_estimates` | What is counted. |
| `usage.records` | integer | How many were returned and charged. |
| `usage.already_paid` | integer | How many more were returned for free, because this organization paid for them in the last 30 days. |
| `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]

```bash
curl "https://api.won.dev/v1/trade/companies/lookup?q=northfield%20home%20furnishings&country=US" \
  -H "Authorization: Bearer $WON_API_KEY"
```

```json
{
  "data": [
    {
      "id": "co_8f3k2m9x4p1q",
      "name": "SAMPLE NORTHFIELD HOME FURNISHINGS INC",
      "country": "US",
      "website": "northfield-home.example",
      "shipments": 1840,
      "last_shipment": "2026-11-11"
    }
  ],
  "query": {
    "q": "northfield home furnishings",
    "country": "US",
    "limit": 5
  },
  "notice": null,
  "usage": {
    "unit": "trade_lookup",
    "records": 1,
    "already_paid": 0,
    "cost": 0.02,
    "balance": 48.08,
    "replayed": false
  }
}
```