Twitch主页或对象详情 API
POST
接口健康状态
- 24h 健康值
- 正常
- 24h 平均耗时
- —
- 最近检查时间
- 2026年9月27日 02:04(北京时间)
- 健康 / 正常
- 可用
- 少量可用
- 基本不可用
健康 API正常
24 小时趋势
30 天趋势
健康值怎么算
- 健康值 = 返回了数据的调用占比(百分比)。空结果、失败和结果未知都不算返回数据。
- 档位:≥90% 健康、≥70% 可用、≥40% 少量可用,更低是基本不可用。
- 一个时段(24 小时、每小时、每天)调用满 50 次才计算健康值;不足的时段显示为正常——少量调用里的偶发失败不代表接口不可用。
- 调用包括客户的真实调用和我们每天的探测调用;请求本身的错误(参数不对、余额不足)不计入。
- 平均耗时只算正常返回的调用:同步取响应时间,异步取受理到完成。
逐时段数据
| 时间(北京时间) | 状态 | 健康值 | 平均耗时 |
|---|---|---|---|
| 2026-09-27 02:00 - 02:59 | 正常 | — | — |
| 2026-09-27 01:00 - 01:59 | 正常 | — | — |
| 2026-09-27 00:00 - 00:59 | 正常 | — | — |
| 2026-09-26 23:00 - 23:59 | 正常 | — | — |
| 2026-09-26 22:00 - 22:59 | 正常 | — | — |
| 2026-09-26 21:00 - 21:59 | 正常 | — | — |
| 2026-09-26 20:00 - 20:59 | 正常 | — | — |
| 2026-09-26 19:00 - 19:59 | 正常 | — | — |
| 2026-09-26 18:00 - 18:59 | 正常 | — | — |
| 2026-09-26 17:00 - 17:59 | 正常 | — | — |
| 2026-09-26 16:00 - 16:59 | 正常 | — | — |
| 2026-09-26 15:00 - 15:59 | 正常 | — | — |
| 2026-09-26 14:00 - 14:59 | 正常 | — | — |
| 2026-09-26 13:00 - 13:59 | 正常 | — | — |
| 2026-09-26 12:00 - 12:59 | 正常 | — | — |
| 2026-09-26 11:00 - 11:59 | 正常 | — | — |
| 2026-09-26 10:00 - 10:59 | 正常 | — | — |
| 2026-09-26 09:00 - 09:59 | 正常 | — | — |
| 2026-09-26 08:00 - 08:59 | 正常 | — | — |
| 2026-09-26 07:00 - 07:59 | 正常 | — | — |
| 2026-09-26 06:00 - 06:59 | 正常 | — | — |
| 2026-09-26 05:00 - 05:59 | 正常 | — | — |
| 2026-09-26 04:00 - 04:59 | 正常 | — | — |
| 2026-09-26 03:00 - 03:59 | 正常 | — | — |
| 2026-09-26 | 正常 | — | — |
| 2026-09-25 | 正常 | — | — |
| 2026-09-24 | 正常 | — | — |
| 2026-09-23 | 正常 | — | — |
| 2026-09-22 | 正常 | — | — |
| 2026-09-21 | 正常 | — | — |
| 2026-09-20 | 正常 | — | — |
| 2026-09-19 | 正常 | — | — |
| 2026-09-18 | 正常 | — | — |
| 2026-09-17 | 正常 | — | — |
| 2026-09-16 | 正常 | — | — |
| 2026-09-15 | 正常 | — | — |
| 2026-09-14 | 正常 | — | — |
| 2026-09-13 | 正常 | — | — |
| 2026-09-12 | 正常 | — | — |
| 2026-09-11 | 正常 | — | — |
| 2026-09-10 | 正常 | — | — |
| 2026-09-09 | 正常 | — | — |
| 2026-09-08 | 正常 | — | — |
| 2026-09-07 | 正常 | — | — |
| 2026-09-06 | 正常 | — | — |
| 2026-09-05 | 正常 | — | — |
| 2026-09-04 | 正常 | — | — |
| 2026-09-03 | 正常 | — | — |
| 2026-09-02 | 正常 | — | — |
| 2026-09-01 | 正常 | — | — |
| 2026-08-31 | 正常 | — | — |
| 2026-08-30 | 正常 | — | — |
| 2026-08-29 | 正常 | — | — |
| 2026-08-28 | 正常 | — | — |
主页或对象详情:返回单个对象;主要字段 user_id、username、display_name、bio、url、avatar_url。
单价 $1.39 / 千次(每次 $0.001389),失败与空结果不扣费。 同步返回;慢任务可在请求体加 "mode": "async",先拿 job_id 再轮询。
请求参数
| 参数名 | 位置 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
Authorization | header | string | 是 | - | Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。 |
platform | body | string | 是 | twitch | 平台标识,固定值。 |
action | body | string | 是 | profile | 能力标识,固定值。 |
username | body.params | 未声明 | 是 | - | profile / clips 的 Twitch 频道登录短名,可带 @,不解析完整 twitch.tv URL。 |
include_clips | body.params | 未声明 | 否 | - | profile 是否附带精选短片信息,布尔值,默认 true;与独立 clips 接口的时间窗不同。 |
include_videos | body.params | 未声明 | 否 | - | profile 是否附带近期录像信息,布尔值,默认 true;设 false 可不读取此部分,不能传字符串 "false"。 |
代码示例
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": "twitch",
"action": "profile",
"params": {
"username": "shroud"
}
}'[OpenAPI 定义 (JSON)]示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。
响应示例
真实返回样例
2026年9月26日 16:56(北京时间)用上方代码示例的参数真实调用所得。results 与 count 是那次的真实返回,已隐去名字、账号、头像、主页链接、联系方式等个人信息;id、billing、quota 每次调用都不同,只给结构。
json
{
"id": "req_…",
"platform": "twitch",
"action": "profile",
"results": {
"user_id": "(已隐去)",
"username": "shroud",
"display_name": "shroud",
"bio": "I'm back baby",
"url": "https://www.twitch.tv/shroud",
"avatar_url": "https://static-cdn.jtvnw.net/(已隐去)",
"banner_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/dbee25e8-55b7-4565-87f0-e9d4661dcc66-profile_banner-480.jpeg",
"follower_count": 11293129,
"is_partner": true,
"is_affiliate": false,
"is_live": false,
"last_broadcast_title": "we are SAVED!",
"last_broadcast_game": "WARDOGS",
"last_broadcast_at": "2026-09-26T04:34:47.953850+00:00",
"created_at": "2012-11-03T15:50:32.878470+00:00",
"recent_videos": [
{
"id": "(已隐去)",
"title": "we are SAVED!",
"url": "https://www.twitch.tv/videos/2883804788",
"view_count": 2687,
"duration_seconds": 35971,
"game": "WARDOGS",
"created_at": "2026-09-25T18:35:12+00:00"
},
{
"id": "(已隐去)",
"title": "surely were saved..?",
"url": "https://www.twitch.tv/videos/2882888067",
"view_count": 252586,
"duration_seconds": 28465,
"game": "WARDOGS",
"created_at": "2026-09-24T17:23:48+00:00"
},
{
"id": "(已隐去)",
"title": "playing till we get ddosed",
"url": "https://www.twitch.tv/videos/2882056326",
"view_count": 194144,
"duration_seconds": 21413,
"game": "WARDOGS",
"created_at": "2026-09-23T17:50:24+00:00"
}
],
"top_clips": [
{
"id": "(已隐去)",
"title": "wtf !!",
"url": "https://www.twitch.tv/shroud/clip/SeductiveFurryPotCmonBruh--v2IUlxXQxpw8YUZ",
"view_count": 2230,
"duration_seconds": 39,
"game": "Active Matter",
"curator_username": "(已隐去)",
"curator_name": "Taisseeer",
"thumbnail_url": "https://static-cdn.jtvnw.net/twitch-video-assets/twitch-vap-video-assets-prod-us-west-2/f4e752a4-c4c1-42b9-a4a1-a7a28106a717/landscape/thumb/thumb-0000000000-1920x1080.jpg",
"created_at": "2026-09-19T22:08:27+00:00"
},
{
"id": "(已隐去)",
"title": "Pilot Kill",
"url": "https://www.twitch.tv/shroud/clip/BreakableAssiduousBulgogiUnSane-oAR-wxU-JuRMLxdl",
"view_count": 1042,
"duration_seconds": 21,
"game": "WARDOGS",
"curator_username": "(已隐去)",
"curator_name": "primo11119",
"thumbnail_url": "https://static-cdn.jtvnw.net/twitch-video-assets/twitch-vap-video-assets-prod-us-west-2/f45445b1-9e8c-4cfd-88b0-d6cbe5d00b61/landscape/thumb/thumb-0000000000-1920x1080.jpg",
"created_at": "2026-09-21T18:00:52+00:00"
},
{
"id": "(已隐去)",
"title": "next level bush camper",
"url": "https://www.twitch.tv/shroud/clip/VainCloudyHawkRiPepperonis-imxaRCvFhJlfVtvo",
"view_count": 784,
"duration_seconds": 60,
"game": "WARDOGS",
"curator_username": "(已隐去)",
"curator_name": "Plot_C4",
"thumbnail_url": "https://static-cdn.jtvnw.net/twitch-video-assets/twitch-vap-video-assets-prod-us-west-2/84be87c7-bea1-4ed5-b709-8fdcc5482baa/landscape/thumb/thumb-0000000000-1920x1080.jpg",
"created_at": "2026-09-20T17:44:19+00:00"
}
],
"platform": "twitch"
},
"billing": { … },
"quota": { … }
}返回字段
业务数据在 results 里;下表是每条记录可能包含的字段,上游没有提供的值不会被补造。
| 字段 | 含义 |
|---|---|
user_id | 用户在原平台的唯一 ID。 |
username | 用户名(@handle)。 |
display_name | 显示名,可能与 username 不同。 |
bio | 个人简介,账号自己填写的文本。可能含换行和 emoji。 |
url | 该记录在原平台上的可访问链接。 |
avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接,可能有时效。 |
banner_url本平台特有 | 频道横幅。 |
follower_count | 粉丝数。null 表示不公开,不等于 0。 |
is_partner本平台特有 | 是否为 Twitch 合作伙伴(最高档认证)。 |
is_affiliate本平台特有 | 是否为 Affiliate(初级变现资格,低于 Partner 一档)。 |
is_live本平台特有 | 当前是否在播。 |
current_viewers本平台特有 | 当前观看人数。 |
stream_title本平台特有 | 直播标题。 |
current_game本平台特有 | 当前直播的游戏。 |
stream_started_at本平台特有 | 本场开播时间。 |
last_broadcast_title本平台特有 | 最近直播标题。 |
last_broadcast_game本平台特有 | 最近直播的游戏。 |
last_broadcast_at本平台特有 | 最近一次开播时间。判断主播是否活跃/停更的关键字段。 |
created_at | 创建时间,格式同 posted_at。 |
recent_videos | 保留平台原语义 |
top_clips | 保留平台原语义 |
platform | 数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。 |
错误与计费
- 401
- 缺少 Key 或 Key 无效。先鉴权再校验参数,未鉴权的请求拿不到参数结构。
- 422
- 参数名或取值不对。错误信息会列出这项能力支持的参数、允许值和最接近的候选,按它改即可;发生在扣费之前。
- 402
- 余额不足,请先充值。
- 429
- 超过每分钟请求上限,按 Retry-After 等待后再试。
- 503
- 暂时无法完成。已预扣的费用按原账本退回;响应里的 billing 与 refund 写明实际结果,结果未知时会明确标出,不要直接重发。
- 200 空结果
- 请求完成但没有数据,不扣费(billing.reason = empty_result_refunded)。