API 文档

Facebook 正在直播的视频 API

Facebook 正在直播的视频 API:输入参数、完整枚举、输出字段和真实响应示例。

测试 API
打开产品页并测试
POST https://api.goanyapi.com/api/v1/facebook/watch/live

请求与输入参数

同步 POST JSON 查询;没有 Path 或 Query 参数,不生成异步任务。

参数 位置 类型 必填 默认值 范围与说明
Authorization Header string 是 — Bearer YOUR_API_KEY
Content-Type Header string 是 application/json application/json
videoId JSON body string 可选或条件必填 — Facebook 视频 ID,也可提供视频链接; pattern=^[0-9]{1,25}$

条件必填规则(required 表示必须提供的字段,anyOf 至少满足一组,oneOf 仅满足一组,allOf 全部满足):

{
  "required": []
}

请求示例

POST /api/v1/facebook/watch/live
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{}

输出字段

字段路径 类型 含义
code string 成功为 ok,失败为公开错误码
message string 请求状态说明
data.result object / null 业务结果;保留实际空值和字段缺失
data.creditsUsed integer 本次实际扣费;空结果与失败不扣费
data.remainingCredits number 结算后的账户积分余额
data.result.sections array sections:实际公开业务字段,可为空或缺失
data.result.sections[].type string type:实际公开业务字段,可为空或缺失
data.result.sections[].title string 标题
data.result.sections[].videos array videos:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].type string type:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].id string 记录标识
data.result.sections[].videos[].url string 公开资源链接
data.result.sections[].videos[].title string 标题
data.result.sections[].videos[].author object 公开作者资料
data.result.sections[].videos[].author.id string 记录标识
data.result.sections[].videos[].author.name string 显示名称
data.result.sections[].videos[].author.url string 公开资源链接
data.result.sections[].videos[].author.avatar string avatar:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].thumbnail string thumbnail:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].duration number duration:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].createdAt number createdAt:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].viewCount number viewCount:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].viewCountText string viewCountText:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].reactionCount number reactionCount:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].commentCount number commentCount:实际公开业务字段,可为空或缺失
data.result.sections[].videos[].commentCountText string commentCountText:实际公开业务字段,可为空或缺失
data.result.sections[].count integer 当前响应记录数,不是全部记录总数
data.result.count integer 当前响应记录数,不是全部记录总数
data.result.pagination_supported boolean 是否支持续页,false 表示不可翻页

真实响应示例

采集时间:2026-11-25T10:22:46Z。以下为真实公开响应的结构节选,仅省略 data.creditsUsed 和 data.remainingCredits,价格与余额以实际请求为准。

{
  "code": "ok",
  "message": "ok",
  "data": {
    "result": {
      "sections": [
        {
          "type": "WWW_LIVE_HERO",
          "title": null,
          "videos": [
            {
              "type": "video",
              "id": "2155698021711765",
              "url": "https://www.facebook.com/justmobilelegends/videos/just-ml-cup-s3-playoffs-day-1/2155698021711765/",
              "title": "Just ML Cup S3 - Playoffs Day 1\n\nMatch 1: Shinori Esports vs Nosia and Friends\nMatch 2: Metro Neo Esports vs Valkyra Legion\nMatch 3: Team Fuego vs Sidlak Esports\nMatch 4: DH6100 vs Minerva Esports\n\n#MLBBEsports #MLBB #JustML #LuponWXC",
              "author": {
                "id": "100044438019517",
                "name": "Just ML",
                "url": "https://www.facebook.com/justmobilelegends",
                "avatar": "https://scontent-ams4-1.xx.fbcdn.net/v/t39.30808-1/777867292_1611989383625647_5608085409348797125_n.jpg?stp=dst-jpg_tt6&cstp=mx2000x2000&ctp=s100x100&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=nqIBqQLQh7wQ7kNvwFu2JZQ&_nc_oc=AdoG-9BQOAY2919juAFnWtdzz0BsCFbLsQGOzgiPatbOQrzBU4-k701sY52otn_u6I2-Ib2e54-nyVQemK3DLGON&_nc_zt=24&_nc_ht=scontent-ams4-1.xx&_nc_gid=0oKr67Y3pTvv7bxTmE9NDA&_nc_ss=78389&oh=00_AQQtdWzCd4sJ75XhoZf_iH9g8GR63_SogpjAQ-503O0UCg&oe=6B0C8490"
              },
              "thumbnail": null,
              "duration": 4070,
              "createdAt": null,
              "viewCount": null,
              "viewCountText": null,
              "reactionCount": null,
              "commentCount": null,
              "commentCountText": null
            }
          ],
          "count": 1
        }
      ],
      "count": 1,
      "pagination_supported": false
    }
  }
}

分页与计费

本接口不支持游标分页,不得自行构造下一页。

…

仅有有效业务数据的成功请求按数据库当前配置扣费。空结果与失败不扣费,每页独立结算。可选字段为空不代表整条结果为空;缺失、null、空字符串、空数组按实际返回。示例中的媒体链接和游标可能过期,正式使用时重新查询。

状态码

HTTP 含义
200 成功,结果可能为空
400 参数或 JSON 不合法
401 鉴权缺失或无效
402 积分不足
429 请求过于频繁
502 请求未能完成
503 接口或计费尚未配置