# VK 视频搜索 API (vk.video_search)

- Canonical page: [https://everyinfra.com/vk-api/video_search](https://everyinfra.com/vk-api/video_search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "vk", "action": "video_search", "params": {...}}
- Price: $0.016 per call ($16 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 10, max 50 per call
- Mode: sync; add "mode": "async" for slow tasks

VK 视频搜索按 `keyword` 检索 VK 上的视频，每条带标题、描述、时长、发布时间、播放数、点赞数、转发数、封面图，以及发布者的 ID 和主页链接。它回答「这个主题在 VK 上有哪些视频、谁发的、反响如何」，适合面向俄语用户的内容和品牌团队做选题与声量观察，以及研究者收集俄语区的视频样本。

`keyword` 只检索视频，不检索墙上帖子、群组或用户；关键词可以直接用俄语，例如吉他教学就搜 уроки гитары。`owner_id` 是视频所属主体的 ID，可能是个人也可能是社群，`owner_url` 是它的主页。`duration_sec` 单位为秒；`view_count`、`like_count` 为 null 表示没有公开，不等于 0。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | video_search 的视频检索词，不是墙上帖子、群组或用户全文搜索；这些对象未开放同样的关键词接口。 |
| limit | integer (1–50) | no | 10 | 这次调用最多返回的条数，整数，1–50；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| media_type | 媒体类型。 |
| duration_sec | 时长，单位秒。 |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| view_count | 浏览/播放数。null 表示不公开，不等于 0。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| repost_count | 转发数（区别于引用转发）。null 表示不公开。 |
| cover_image_url | 封面图。 |
| owner_id | 内容所属主体 ID（用户或社群）。 |
| owner_url | 主体主页链接。 |
| 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": "vk",
  "action": "video_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": "vk",
        "action": "video_search",
        "params": {
            "keyword": "уроки гитары",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-07T14:47:42Z. `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": "vk",
  "action": "video_search",
  "results": [
    {
      "id": "•••",
      "url": "https://vk.com/video-55568446_456241316",
      "title": "Стрыкало - Наше лето 🎶 кавер на гитаре и аккорды",
      "text": "Аккорды: https://disk.yandex.ru/i/5an1tLBsaEugQw\nШкола про гитару: https://pro-gitaru.ru/startyv\nМой Boosty тут: https://boosty.to/pro-gitaru\nНаш Телеграм канал: https://t.me/pro_gitaru\nКанал в MAX: https://max.ru/progitaru\n============================================\nОсновной ка…",
      "media_type": "video",
      "duration_sec": 144,
      "posted_at": "2026-11-07T15:00:00+00:00",
      "view_count": 10,
      "like_count": 3,
      "repost_count": 0,
      "cover_image_url": "https://iv.okcdn.ru/getVideoPreview?id=20878830144069&idx=0&type=39&tkn=X48yCkHmO3ysQCnQws28tAnP1-Y&fn=vid_w&scl=4",
      "owner_id": "•••",
      "owner_url": "https://vk.com/•••",
      "platform": "vk",
      "duration_seconds": 144
    },
    {
      "id": "•••",
      "url": "https://vk.com/video-55568446_456241315",
      "title": "Абдулов - Мир без любви 🎶 кавер на гитаре и аккорды",
      "text": "Текст и аккорды: https://pro-gitaru.ru/?p=93435\nШкола про гитару: https://pro-gitaru.ru/startyv\nМой Boosty тут: https://boosty.to/pro-gitaru\nНаш Телеграм канал: https://t.me/pro_gitaru\nКанал в MAX: https://max.ru/progitaru\n============================================\nОсновной кан…",
      "media_type": "video",
      "duration_sec": 164,
      "posted_at": "2026-11-06T13:00:00+00:00",
      "view_count": 111,
      "like_count": 4,
      "repost_count": 0,
      "cover_image_url": "https://iv.okcdn.ru/getVideoPreview?id=20878743177797&idx=0&type=39&tkn=mers2oD6RWs-8qm1UwnbUNdDofg&fn=vid_w&scl=4",
      "owner_id": "•••",
      "owner_url": "https://vk.com/•••",
      "platform": "vk",
      "duration_seconds": 164
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 能搜 VK 的帖子、群组或用户吗？

不能。`keyword` 只检索视频，墙上帖子、群组和用户都没有开放同样的关键词搜索；传进去的人名或群组名，也只会被当作视频检索词去匹配。

### 怎么从视频找到发布者的其他内容？

把结果里的 `owner_id` 或 `owner_url` 传给 VK 用户内容，就能读这个用户或社群墙上的公开帖子；它接受短名、club 加数字的社群 ID、数字 owner ID 或 vk.com 主页链接。

### 怎么比较不同视频的表现？

先看 `view_count` 播放数，再看 `like_count` 点赞数和 `repost_count` 转发数，三者为 null 都表示没有公开，不等于 0。发布越早的视频累积的时间越长，比较时结合 `posted_at`，只在发布时间相近的视频之间比；`duration_sec` 相差很大的视频也最好分开比较。

## Also

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