VK.watch API
与网站相同的数据,通过 HTTP 获取。购买 API 套餐,创建密钥,按请求扣除积分。
API 套餐
US$99 API:2,000 积分,30 天
- 付款后 API 访问权限开通 30 天;期限累加。
- 积分自购买起 365 天内有效;先到期的先扣除。
- API 积分是独立钱包;网站不会使用它。
- 没有 API 套餐?在网站访问期内,API 调用按相同价格扣除网站积分。方便测试。
- 一次性加密货币付款,无自动续订。
限制
- 每秒 5 次请求,突发最多 20 次
- 每个账户最多 5 个有效密钥
- 失败的请求(4xx/5xx)会退还积分
- 每次请求都会计费;重复获取同一资料会再次计费
身份验证
在账户中创建密钥,然后作为 Bearer 令牌发送。每个响应都包含 X-Credits-Charged 和 X-Credits-Remaining 头。
curl -H "Authorization: Bearer $VKWATCH_API_KEY" \ https://api.vk.watch/v1/profile/1
响应为 JSON 信封 {response, meta}。搜索响应不带信封直接返回。
{
"response": { "id": 1, "profile": { "first_name": "…", "last_name": "…", "city": { "title": "…" } }, "photos": 12, "friends": 341 },
"meta": { "credits": { "charged": 2, "remaining": 1998 } }
}接口
基础 URL:https://api.vk.watch/v1
| 路由 | 返回 | 积分 |
|---|---|---|
| GET/me | endpoints.notes.balance | 0 |
| GET/profile/{id} | 带计数的最新资料快照 | 2 |
| GET/profile/{id}/changes | 字段随时间的变化 | 2 |
| GET/profile/{id}/snapshots | 已存储快照列表 | 1 |
| GET/profile/{id}/snapshot/{snapshotId} | 单个历史快照 | 2 |
| GET/profile/{id}/friends | 好友列表 | 2 |
| GET/profile/{id}/photos | 照片 | 2 |
| GET/profile/{id}/comments | 评论 | 1 |
| GET/profile/{id}/identity | 仅姓名和头像 | 1 |
| GET/search?name=… | 分面搜索(每页 50 条结果) | 1 |
| POST/lookup | 解析 id 和短名称 | 1 |
| GET/geo/search, /geo/resolve, /facets/suggest | 地理与分面辅助(免费) | 0 |
| POST/faces (multipart photo) | 按照片进行人脸搜索 | 20 |
机器可读规范: openapi.json
带计数的最新资料快照
curl -H "Authorization: Bearer $VKWATCH_API_KEY" \ "https://api.vk.watch/v1/profile/1"
错误
401 apiKeyRequired / apiKeyInvalid— 密钥缺失或已吊销402 apiAccessExpired / apiCreditsExhausted— 没有 API 访问期或积分不足;不计费404 profileNotFound— 未知资料;不计费429 apiRateLimited— 超出速率限制;一秒后重试