# Yandex 关键词搜索 API (yandex.search)

- Canonical page: https://everyinfra.com/yandex-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "yandex", "action": "search", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 100 per call
- 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=yandex&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | search 的地图商户关键词，market 的商品关键词；地图点评与电商商品不是同一数据集。 |
| category | enum: atms / auto_repair / banks / bars_pubs / beauty_salons / burgers / cafes / car_wash / cinemas / coffee_shops / dentists / dry_cleaning / fast_food / fitness_clubs / gas_stations / government_services / grocery_stores / hookah_bars / hospitals / hotels / kindergartens / museums / none / pharmacies / pizza / restaurants / schools / shopping_malls / sports_facilities / sushi_rolls / veterinary_clinics | no | not declared | search 的地图商户分类，none 不指定；restaurants 餐厅、cafes 咖啡馆、coffee_shops 咖啡店、hotels 酒店等全部允许值见列表。它不是 market 商品分类，需与搜索关键词和城市一致。 |
| lang | enum: en / kk / ru / tr / uk | no | not declared | search 的语言：ru 俄语、en 英语、kk 哈萨克语、tr 土耳其语、uk 乌克兰语；不是把评论翻译成该语言的承诺。 |
| language | not declared | no | not declared | search 的默认界面语言 ru，reviews 默认 en；search 显式传 lang 时覆盖 language。 |
| location | not declared | no | not declared | search 的地图搜索城市，默认 Moscow；不是 market 的数字地区代码。 |
| max_price | not declared | no | not declared | 对应 action 的最高价格条件，与 min_price 配合；不是最高评分。按整数筛选，带小数时向上取整。 |
| min_price | not declared | no | not declared | market 为商品最低价，search 为地图商户价格筛选，两者价格含义不同；不应把商户价位直接当商品单价或 API 费用。按整数筛选，带小数时向下取整。 |
| sort | enum: distance / relevance | no | not declared | search 使用 relevance、distance；market 使用 popular、top_rated；reviews 使用 newest、relevance、top_rated、lowest_rated。不可跨 action 混用。 |
| limit | integer (1–100) | no | 20 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| address | 详细地址，原文透传。 |
| city | 城市名，用原平台的语言书写，未做中英归一。 |
| country | 国家或地区。可能是全称也可能是 ISO 代码，取决于平台，未归一。 |
| categories | 商家分类。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| review_count | 评价条数，用于商品/商家类能力。null 表示不公开，不等于 0。 |
| phone | 联系电话，原文透传，未做号码格式归一。 |
| website | 账号或商家填写的外链网址。 |
| lat | 纬度。 |
| lng | 经度。 |
| is_open_now | 当前是否营业。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## 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": "yandex",
  "action": "search",
  "params": {
    "keyword": "музей Санкт-Петербург"
  }
}'
```

```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": "yandex",
        "action": "search",
        "params": {
            "keyword": "музей Санкт-Петербург",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `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": "yandex",
  "action": "search",
  "results": [
    {
      "id": "•••",
      "url": "https://yandex.com/maps/org/yusupovskiy_dvorets_na_moyke/1484458665/",
      "name": "Юсуповский дворец на Мойке",
      "text": "наб. реки Мойки, 94, Санкт-Петербург",
      "address": "Санкт-Петербург, набережная реки Мойки, 94",
      "city": "Санкт-Петербург",
      "country": "Россия",
      "categories": [
        "Музей",
        "достопримечательность",
        "культурный центр"
      ],
      "rating": 5,
      "review_count": 20295,
      "phone": [
        "•••"
      ],
      "website": "https://yusupov-palace.ru/ru?yclid=1047539603321651199",
      "lat": 59.929384,
      "lng": 30.29887,
      "is_open_now": false,
      "platform": "yandex",
      "rating_scale": 5
    },
    {
      "id": "•••",
      "url": "https://yandex.com/maps/org/muzey_yantarya_solnechnogo_kamnya/198760504469/",
      "name": "Музей Янтаря - Солнечного камня",
      "text": "Невский просп., 51, Санкт-Петербург",
      "address": "Санкт-Петербург, Невский проспект, 51",
      "city": "Санкт-Петербург",
      "country": "Россия",
      "categories": [
        "Музей",
        "магазин парфюмерии и косметики",
        "магазин бижутерии"
      ],
      "rating": 4.599999904632568,
      "review_count": 97,
      "phone": [
        "•••"
      ],
      "website": "http://www.jantarspb.ru/?yclid=14418971870541905919",
      "lat": 59.931873,
      "lng": 30.34891,
      "is_open_now": false,
      "platform": "yandex",
      "rating_scale": 5
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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