> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Commerce Search API (COMMERCE_SERP)

> Amazon、Walmart、eBay、AliExpress、Google Shopping、Sephora、Coupang、Olive Young、楽天市場、Flipkart、Zalando などのストアをタスクごとに 1 つ検索し、商品の順位、価格、評価、レビュー数を同じ形式で受け取ります。

1 つのストアの商品を検索し、順位付きの結果を非同期タスク API で JSON として受け取ります。`site` でストアを選び、どのストアも同じ商品フィールドを返します。完了した検索 1 件につき **3 クレジット**です。

## リクエスト

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "COMMERCE_SERP", "payload": { "site": "amazon", "query": "wireless earbuds", "limit": 20 } }'
```

タスクを送信したあと、`GET /v1/async/task/{id}` をポーリングするか Webhook で受け取ります。[非同期タスク](/ja/concepts/async-tasks.md)を参照してください。

## パラメータ

* `site`: 必須。下の表のストアから選びます。
* `query`: 必須の検索語です。1-500 文字です。
* `country`: 任意。デフォルトはストアの国です。ほかの国は `422 REGION_UNSUPPORTED` で拒否されます。
* `limit`: 任意の整数、1-40。デフォルトは 20 です。

| `site` | ストア | `country` |
| - | - | - |
| `amazon` | amazon.com | `US` |
| `walmart` | walmart.com | `US` |
| `target` | target.com | `US` |
| `ebay` | ebay.com | `US` |
| `aliexpress` | aliexpress.com | `US` |
| `google_shopping` | shopping.google.com | `US` |
| `sephora` | sephora.com | `US` |
| `ulta` | ulta.com | `US` |
| `coupang` | coupang.com | `KR` |
| `oliveyoung` | oliveyoung.co.kr | `KR` |
| `11st` | 11st.co.kr | `KR` |
| `lotteon` | lotteon.com | `KR` |
| `musinsa` | musinsa.com | `KR` |
| `kurly` | kurly.com | `KR` |
| `rakuten` | rakuten.co.jp | `JP` |
| `yahoo_shopping` | shopping.yahoo.co.jp | `JP` |
| `qoo10` | qoo10.jp | `JP` |
| `flipkart` | flipkart.com | `IN` |
| `myntra` | myntra.com | `IN` |
| `nykaa` | nykaa.com | `IN` |
| `zalando` | zalando.de | `DE` |

## レスポンス例

```json theme={"theme":"css-variables"}
{
  "site": "amazon",
  "query": "wireless earbuds",
  "country": "US",
  "returnedCount": 1,
  "products": [
    {
      "rank": 1,
      "productId": "B0CHWRXH8B",
      "title": "Wireless Earbuds, Bluetooth 5.3 Headphones",
      "url": "https://www.amazon.com/dp/B0CHWRXH8B",
      "price": 24.99,
      "currency": "USD",
      "rating": 4.6,
      "reviewCount": 19406
    }
  ]
}
```

## 結果フィールド

* `site`、`query`、`country` はリクエストの値です。`returnedCount` は `products` の件数です。
* 各商品は `rank`、`productId`、`title`、`url` を含みます。`productId` はストア独自の商品 ID です（Amazon では ASIN、eBay では商品番号、楽天市場では `shop:item`）。`rank` はストアの標準の並び順です。Coupang 以外のストアでは、広告と表示された商品を除きます。
* `price`、`rating`、`reviewCount`、`imageUrl`、`brand` は検索結果ページに表示されている場合に含まれます。`price` は商品ごとの `currency`（ISO 4217）での数値です。Amazon は 1 回の検索で複数の通貨を表示することがあります。サイズごとに価格が異なる場合は最も低い価格を返します。Target の価格は Target の標準オンラインストアの価格です。AliExpress の価格は、ログインしていない米国の購入者に表示される販売価格です。
* `rating` は 5 段階評価です。Kurly と Zalando は評価を表示せず、AliExpress は評価件数なしで星の数を表示します。999+ のように省略された件数は含みません。`brand` は商品名とは別にブランドを表示する Target、Sephora、Ulta、Olive Young、Lotte ON、Musinsa、Yahoo!ショッピング、Qoo10、Flipkart、Myntra、Nykaa、Zalando で含まれます。
* `google_shopping` の `productId` は Google の商品 ID で、Google が商品にまとめていない出品はオファー ID です。Google のページには商品ページや販売店ページへのリンクがないため、`url` は商品が表示された Google ショッピングの検索結果ページの末尾に `#product={productId}&title={title}` を付けたものです。この `url` を [Commerce Product](/ja/engines/commerce-product.md) に渡すと、商品の販売店、仕様、説明を読み取れます。`seller` は Google が最初に表示する販売店で、`reviewCount` は Google が正確な件数を表示する場合（1,000 件未満）のみ含まれます。
* 各検索はストアの検索結果の 1 ページ目から商品を返します。このページには Yahoo!ショッピングで最大 30 件、Myntra で 32 件、Zalando で 24 件が並びます。Flipkart は 40 枠、Nykaa は 20 枠で、広告を含みます。
* ストアが検索を別のページへ移す場合は、そのページの商品を返します。Ulta は一部のブランド名の検索をブランドページへ、Target は一部の検索を関連する検索語へ移します。Nykaa はカテゴリ名の検索でカテゴリページを表示します。
* 商品が 1 件もない検索は失敗したタスクになります。課金は完了した検索ごとです。

## 関連

* [Commerce Product](/ja/engines/commerce-product.md)
* [エンジン一覧](/ja/engines/overview.md)
* [クレジットと上限](/ja/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.