# Amazon 类目下的商品 API (amazon.category_products)

- Canonical page: [https://everyinfra.com/amazon-api/category_products](https://everyinfra.com/amazon-api/category_products?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "amazon", "action": "category_products", "params": {...}}
- Price: $0.008958 per call ($8.96 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of up to 24 per call; the number of rows varies from page to page and a short page is not the end (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page; no next_page_token means the end)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=amazon&action=category_products

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| category_id | not declared | yes | not declared | Amazon 美国站的类目：一级类目的英文名（如 electronics、toys-and-games，写成 Toys and Games 也认），或「一级名/类目编号」（如 electronics/281407），或美国站热卖榜链接（/zgbs/… 或 /gp/bestsellers/…）；写法和 bestsellers 的 keyword 一样。digital-educational-resources 和 boost（Unique Finds）这两个一级类目平台不给列表，要传它们下一层的「一级名/类目编号」，否则扣费前回 422。 |
| page_token | not declared | no | not declared | 翻页令牌：把上一页响应里的 next_page_token 原样传回拿下一页；不传从第一页开始。最多 100 页；每页算一次调用。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| asin | Amazon 标准识别号，站内唯一商品标识。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| url | 该记录在原平台上的可访问链接。 |
| price | 价格数值，不含货币符号；币种见 currency。 |
| list_price | 划线原价。 |
| currency | 价格币种代码（如 CNY、USD）。price 存在但 currency 为 null 时不要假定币种。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| rating_count | 参与评分的人数。null 表示不公开，不等于 0。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| images | 图片链接数组，按平台展示顺序；没有图片时不出现这个字段。 |
| is_sponsored | 这一行是不是平台排进结果列表的广告位（search、seller_products、category_products）。 |
| sales_count_label | 商品页、搜索结果上「过去一个月卖了多少」的档位原文（如 10K+ bought in past month），是平台给的估计档位，不是准确销量；没有这个标记时没有这个字段。 |
| is_amazon_choice | 是否有 Amazon's Choice 标。 |
| is_bestseller | 是否带 Best Seller 标：ranked_keywords 里指观察到名次时，search、category_products 里指这一行。 |
| bestseller_ranks | Best Sellers 排名列表（search / profile / category_products）：每项含 rank（名次）和 category（所在类目），同一商品在不同类目的名次分开列；是采集时的名次，不是销量。 |
| region | 站点代码，大写（如 GB）；美国站不带这个字段，search、profile 的结果里也可能没有（product_stock、search、profile）。 |
| collected_at | 这条数据的抓取时刻（ISO 8601，UTC）。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| category_id | 类目编号（bestsellers、category_products）：一级类目是英文名（如 electronics），子类目是「一级名/类目编号」（如 electronics/281407）。 |
| category_total_count | 平台写的这个类目的商品总数（category_products），每行相同；平台写「over 70,000」时给 70000。 |
| category_page_count | 平台写的这个类目的页数（category_products），每行相同。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "amazon",
  "action": "category_products",
  "params": {
    "category_id": "electronics"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "amazon",
        "action": "category_products",
        "params": {
            "category_id": "electronics",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "amazon",
  "action": "category_products",
  "results": [
    {
      "asin": …,
      "title": …,
      "url": …,
      "price": …,
      "list_price": …,
      "currency": …,
      "rating": …,
      "rating_scale": …,
      "rating_count": …,
      "image_url": …,
      "images": …,
      "is_sponsored": …,
      "sales_count_label": …,
      "is_amazon_choice": …,
      "is_bestseller": …,
      "bestseller_ranks": …,
      "region": …,
      "collected_at": …,
      "platform": …,
      "category_id": …,
      "category_total_count": …,
      "category_page_count": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=amazon
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
