# Yelp 评价 API (yelp.reviews)

- Canonical page: https://everyinfra.com/yelp-api/reviews
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "yelp", "action": "reviews", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 10, max 10 per call (larger values are capped)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours; up to 100 rows; beyond 50 rows use mode=async
- 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=yelp&action=reviews

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Yelp /biz/商户短名 页面链接，用于读取该商户的评价；不是单条评价或用户主页链接。 |
| page_token | not declared | no | not declared | 翻页令牌：把上一页响应里的 next_page_token 原样传回，拿这家商户的下一页评价（每页最多 10 条）；不传从第一页开始。url 须与上一页一致，令牌 24 小时有效，每页算一次调用。 |
| limit | integer (1–10) | no | 10 | 这次调用最多返回的条数，整数，1–10；不传按默认值，实际返回可能少于这个数。超过上限照收，按上限返回。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| author_name | 作者昵称（显示名）。 |
| useful_count | 评价被标 useful 次数。 |
| photo_count | 照片数。 |
| business_name | 商家名称。 |
| business_url | 商家页链接。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| funny_count | 评价被标 funny 次数。 |
| cool_count | 评价被标 cool 次数（Yelp 特有的三维评价反馈）。 |

## 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": "yelp",
  "action": "reviews",
  "params": {
    "url": "https://www.yelp.com/biz/blue-bottle-coffee-san-francisco"
  }
}'
```

```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": "yelp",
        "action": "reviews",
        "params": {
            "url": "https://www.yelp.com/biz/blue-bottle-coffee-san-francisco",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 10. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "yelp",
  "action": "reviews",
  "results": [
    {
      "text": "Love Blue Bottle. This one was a bit tricky to find. It's tucked in around the corner but we'll worth it. Very friendly staff and very fast. True coffee lovers really dig BB.",
      "rating": 5,
      "posted_at": "Mar 25, 2023",
      "useful_count": 0,
      "funny_count": 0,
      "cool_count": 0,
      "photo_count": 1,
      "business_name": "Blue Bottle Coffee - Mint Plaza",
      "business_url": "https://www.yelp.com/biz/blue-bottle-coffee-san-francisco",
      "platform": "yelp",
      "rating_scale": 5
    },
    {
      "text": "It is neatly tucked behind a big building so when you look for Blue Bottle you should try to find the Mint Plaza 1st, then heads towards the back. My usual is the New Orleans Style Cold Brew, but today I opted for a simple Cold Brew to cool down with. When I asked the barista for…",
      "rating": 4,
      "posted_at": "Sep 17, 2021",
      "useful_count": 3,
      "funny_count": 0,
      "cool_count": 2,
      "photo_count": 4,
      "business_name": "Blue Bottle Coffee - Mint Plaza",
      "business_url": "https://www.yelp.com/biz/blue-bottle-coffee-san-francisco",
      "platform": "yelp",
      "rating_scale": 5
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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