> ## 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.

# Coupang API

> 搜索 Coupang 的商品，以 JSON 获取结果：按商城显示的顺序返回商品排名、价格、评分和评价数。

通过异步任务 API 搜索 Coupang（coupang.com）的商品。发送 `COMMERCE_SERP` 并设置 `site` `coupang`，按商城的顺序获取搜索结果中的商品。`COMMERCE_PRODUCT` 不读取这家商城的商品页面。每次完成的搜索消耗 **2 积分**。

## 搜索

```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": "coupang", "query": "airpods", "limit": 3 } }'
```

提交任务后，轮询 `GET /v1/async/task/{id}` 或通过 webhook 接收。参见[异步任务](https://docs.querying.ai/zh/concepts/async-tasks.md)。

### 参数

* `site`：必填。值为 `coupang`。
* `query`：必填。搜索词，1-500 个字符。
* `limit`：可选整数，范围 1-40，默认 20。
* `country`：可选。默认是商城所在国家 `KR`。其他国家会以 `422 REGION_UNSUPPORTED` 拒绝。

仅接受上方列出的载荷字段。请省略 `include`：即使是 `include: {}`，也会在冻结积分前返回针对 `payload.include` 的 `422 VALIDATION_ERROR`。

### 结果字段

* `site`、`query` 和 `country` 回显请求。`returnedCount` 是 `products` 中的商品数。
* 每个商品包含 `rank`、`productId`、`title` 和 `url`。`productId` 是商城自己的商品 ID。`rank` 遵循商城的默认排序，广告商品也按页面上的位置保留。
* 搜索结果页显示时返回 `price`、`rating`、`reviewCount` 和 `imageUrl`。`price` 是以商品的 `currency`（ISO 4217）计的数字；不同规格分别定价时，取最低价。
* `rating` 为五分制。像 999+ 这样的缩写评价数不会返回。
* 每次搜索从商城搜索结果的第一页获取商品。

## 错误与计费

* 没有返回任何商品的搜索以失败任务结束。
* 只对完成的搜索计费，每次 2 积分。

## 相关

* [Olive Young](https://docs.querying.ai/zh/engines/oliveyoung.md)
* [11st](https://docs.querying.ai/zh/engines/11st.md)
* [Lotte ON](https://docs.querying.ai/zh/engines/lotteon.md)
* [全部 Commerce 商城](https://docs.querying.ai/zh/engines/overview.md#commerce)
* [积分与限制](https://docs.querying.ai/zh/concepts/credits-and-limits.md)


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