接口说明

Facebook Home API 获取 Facebook 主页资料及首屏作品数据。

使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。

请求URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/facebook-home

请求头

参数名参数值类型说明
Content-Typeapplication/jsonstring数据格式
AuthorizationBearer xxxstring认证凭证

采集最长约75秒,客户端超时建议设为90秒。

请求参数

参数必填类型说明
targetYesstring主页链接; 也可直接传主页数字 id 或主页名
optionsNoobject仅处理下列开放参数;未列出的字段忽略,内部参数不可覆盖。

options 参数说明

参数必填类型说明
includeTransparencyNoboolean额外取透明度 tab: 主页创建日期 / 主页 ID / 是否在投广告 / 负责实体; 默认 false

仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。

附带首屏作品;更多作品请使用对应作品接口(如提供)。

响应值

返回值类型说明
codeinteger状态码,0 表示成功
messagestring响应信息,成功时为 ok
pointCostnumber本次请求实际消耗的积点
dataobject返回数据,结构见下表
metaobject请求标识及耗时(毫秒)
billingobject计费条数、单价及规则版本

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“home”]
profileobjectProfile
worksany[]恒为空: 匿名拿不到主页帖子列表

data.profile 字段说明

返回值类型说明
accountIdstring | null主页 id
idstring | null主页 id (同 accountId)
nicknamestring | null名字
namestring | null名字 (同 nickname)
usernamestring | null用户名 (vanity, 链接里那段)
vanitystring | null用户名
userIdstring | null用户 id
pageIdstring | null公共主页 id (SSR); 常为 null, 透明度里有 transparency.pageId
entityIdstring | null实体 id
categorystring | null主页类目
category_namestring | null主页类目 (同 category)
verifiedboolean是否认证
isVerifiedboolean是否认证 (同 verified)
genderstring | null性别 (平台字段, 公共主页也有)
biostring | null简介
avatarstring | null头像
coverstring | null封面图
profileUrlstring | null主页链接
followersCountnumber | null粉丝数
followingCountnumber | null关注数
friendsnumber | null好友数 (个人主页)
likesCountnumber | null点赞数 (公共主页)
talkingAboutThisnumber | null正在讨论人数
contactEmailstring | null邮箱
emailstring | null邮箱 (同 contactEmail)
externalLinksstring[]外链
createdTimestampnumber | null页面里第一个 created_time 的毫秒值; 实测多为最近帖子的时间, 不是注册时间 (主页创建日见 transparency.creationDate)
workstring[]工作经历 (个人主页简介卡)
educationstring[]教育经历
currentCitystring | null现居城市
hometownstring | null家乡
relationshipstring | null感情状况
addressstring | null地址 (公共主页)
phonestring | null电话
ratingobject | null评分 (商家主页)
priceRangestring | null价格区间
businessHoursstring | null营业时间
servicesstring[]服务项目
responsibleEntitystring | null负责实体 / 确认的所有者
otherAccountsstring[]关联的其他账号
introCardsobject简介卡原始文案, 键为卡片类型 (WEBSITE / PROFILE_EMAIL / CONFIRMED_OWNER_LABEL / INFLUENCER_CATEGORY …)
targetUrlstring请求的链接
transparencyobject | null主页透明度; 只有 options.includeTransparency 才有, 取不到为 null

data.profile.rating 字段说明

返回值类型说明
textstring评分原文
recommendPercentnumber推荐率 (%)
reviewCountnumber | null评价数

data.profile.transparency 字段说明

返回值类型说明
pageIdstring | null公共主页 id
creationDateobject | null主页创建日期
adStatusstring | null广告投放状态
confirmedOwnerstring | null确认的所有者
fieldsobject透明度页全部字段原文, 键为字段类型

请求示例

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/facebook-home \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://www.facebook.com/NASA"
}'

返回示例

下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "home",
    "profile": {
      "accountId": "100044561550831",
      "id": "100044561550831",
      "nickname": "NASA - National Aeronautics and Space Administration",
      "name": "NASA - National Aeronautics and Space Administration",
      "username": "NASA",
      "vanity": "NASA",
      "userId": "100044561550831",
      "pageId": null,
      "entityId": null,
      "category": "Government organisation",
      "category_name": "Government organisation",
      "verified": false,
      "isVerified": false,
      "gender": "NEUTER",
      "bio": "Explore the universe and discover our home planet. \\nThere's space for everybody. ✨",
      "avatar": "https://scontent.fhan3-4.fna.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?stp=dst-png&cstp=mx800x800&ctp=s720x720&_nc_cat=1&cc...",
      "cover": "https://scontent.fhan4-1.fna.fbcdn.net/v/t39.99422-6/809146614_4484013928506139_3181913787670602881_n.png?stp=dst-jpg_tt6&cstp=mx2047x1487&ctp=s960x960&_nc_c...",
      "profileUrl": "https://www.facebook.com/NASA/",
      "followersCount": 28732023,
      "followingCount": 52,
      "friends": null,
      "likesCount": null,
      "talkingAboutThis": 107305,
      "contactEmail": null,
      "email": null,
      "externalLinks": [],
      "createdTimestamp": null,
      "work": [],
      "education": [],
      "currentCity": null,
      "hometown": null,
      "relationship": null,
      "address": null,
      "phone": null,
      "rating": null,
      "priceRange": null,
      "businessHours": null,
      "services": [],
      "responsibleEntity": "NATIONAL AERONAUTICS AND SPACE ADMINISTRATION",
      "otherAccounts": [],
      "introCards": {
        "INFLUENCER_CATEGORY": [
          "Page · Government organisation"
        ],
        "CONFIRMED_OWNER_LABEL": [
          "NATIONAL AERONAUTICS AND SPACE ADMINISTRATION"
        ],
        "PROFILE_EMAIL": [
          "[email protected]"
        ],
        "WEBSITE": [
          "nasa.gov/nasa-app"
        ]
      },
      "targetUrl": "https://www.facebook.com/NASA"
    },
    "works": []
  },
  "meta": {
    "requestId": "pg-audit-r1-facebook-home-1793954314343239500",
    "durationMs": 3515
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

积点消耗说明

每份主页资料消耗 0.8 积点,附带作品免费。

空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

在线调试