# Yelp 主页或对象详情 API (yelp.profile)

- Canonical page: https://everyinfra.com/yelp-api/profile
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "yelp", "action": "profile", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

Yelp 商户主页按 `url` 读取一个商户的资料，返回单个对象：名称、评分 `rating` 和满分 `rating_scale`、评价条数 `review_count`、价位档 `price_range`、电话、网站、分类、菜系、地址、营业时间 `hours`，以及设施 `amenities`、商家亮点 `highlights` 和图片 `images`。它回答「这家店的底细是什么」，适合核对联系方式和营业时间，或者补全店铺名单。

`url` 要用 Yelp 的 /biz/商户短名 页面链接，不是用户主页。读数据前先看 `is_claimed`：商家没有认领主页，说明店家不运营 Yelp，信息可能过时。`hours` 的键是星期几的缩写（如 Mon），值是当天营业时段原文。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Yelp /biz/商户短名 页面链接，用于读取商户资料；不是 Yelp 用户主页。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| url | 该记录在原平台上的可访问链接。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| review_count | 评价条数，用于商品/商家类能力。null 表示不公开，不等于 0。 |
| price_range | 价位档（$ 到 $$$$）。 |
| phone | 联系电话，原文透传，未做号码格式归一。 |
| website | 账号或商家填写的外链网址。 |
| categories | 商家分类。 |
| cuisine | 菜系。 |
| description | 简介或描述，通常比 text 短。 |
| address | 详细地址，原文透传。 |
| city | 城市名，用原平台的语言书写，未做中英归一。 |
| region | 区域。 |
| postal_code | 邮编。 |
| country | 国家或地区。可能是全称也可能是 ISO 代码，取决于平台，未归一。 |
| is_claimed | 商家是否已认领主页。未认领说明店家不运营 Yelp，信息可能过时。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| health_score | 卫生检查评分（政府数据，餐厅类才有）。 |
| established_year | 开业年份。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| images | 图片链接数组，按平台展示顺序；没有图片时不出现这个字段。 |
| amenities | 设施与服务列表，按 Yelp 页面原文；没有时不出现这个字段。 |
| highlights | Yelp 页面上的商家亮点标签，按页面原文；没有时不出现这个字段。 |
| hours | 营业时间，键是星期几的缩写（如 Mon），值是当天的营业时段原文；没有时不出现这个字段。 |

## 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": "profile",
  "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": "profile",
        "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. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "yelp",
  "action": "profile",
  "results": {
    "id": "blue-bottle-coffee-san-francisco",
    "name": "Blue Bottle Coffee - Mint Plaza",
    "url": "https://www.yelp.com/biz/blue-bottle-coffee-san-francisco",
    "rating": 4.2,
    "review_count": 2279,
    "price_range": "$$",
    "phone": "•••",
    "website": "https://bluebottlecoffee.com/us/eng",
    "categories": [
      "Coffee & Tea",
      "similar spot"
    ],
    "description": "",
    "address": "66 Mint St, San Francisco, CA, 94103, US",
    "city": "San Francisco",
    "region": "CA",
    "postal_code": "94103",
    "country": "US",
    "image_url": "https://s3-media0.fl.yelpcdn.com/bphoto/Jx4LzzUlIe54KnQE5mZbeQ/l.jpg",
    "platform": "yelp",
    "images": [
      "https://s3-media0.fl.yelpcdn.com/bphoto/Jx4LzzUlIe54KnQE5mZbeQ/l.jpg"
    ],
    "rating_scale": 5
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `url` 能填用户主页或搜索页吗？

不能。这里只收 Yelp 的 /biz/商户短名 页面链接，例如 https://www.yelp.com/biz/blue-bottle-coffee-san-francisco，用户主页读不了商户资料。只有关键词、没有链接时，先用关键词搜索拿到商户的 `url`，再传进来。

### `is_claimed` 为假说明什么？

说明商家还没认领主页，店家不运营 Yelp，页面上的电话、营业时间等信息可能过时，用之前最好用别的渠道核对。`is_verified` 是平台认证标记，null 表示无法判定。

### 哪些字段不一定有？

`images`、`amenities`、`highlights` 和 `hours` 在商家页面没有对应内容时，整个字段不出现，读取时要按缺失处理。`health_score` 是政府的卫生检查评分，只有餐厅类才有。`phone` 和 `address` 是原文透传，没有做格式归一。

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