接口说明

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

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

请求URL

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

请求头

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

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

请求参数

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

options 参数说明

参数必填类型说明
tabNostring作品类型, 默认按 URL 或 overview;可选值:submitted / comments / overview
可用值: [“submitted”, “comments”, “overview”]

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

附带作品限一页,最多10条。

响应值

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

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“home”]
userobjectUser
worksobject[]作品 (帖子 / 评论, 按时间倒序)
paginationobjectPagination

data.user 字段说明

返回值类型说明
accountIdstring | null用户名 (兼容旧键; 数字 id 见 id36)
userIdstring | null用户名 (同 accountId)
id36string | null用户 id (t2_ 后面那段)
usernamestring | null个人版块名, 如 u_spez; 没有个人版块时为用户名
nicknamestring | null显示名; 没有时用用户名
accountNamestring | null用户名
profileUrlstring主页链接
avatarstring | null头像
bannerstring | null横幅图
biostring | null简介
isVerifiedboolean | null邮箱是否已验证; 取不到为 null
isSuspendedboolean | null是否被封禁; 取不到为 null
isDeletedboolean | null是否已注销; 取不到为 null
postsCountnumber | null发帖总数
commentsCountnumber | null评论总数
contributionsnumber发帖 + 评论总数 (贡献数接口失败时没有这个键)
linkKarmanumber | null发帖 karma
commentKarmanumber | null评论 karma
totalKarmanumber | null总 karma
contributionnumber | null评论 karma (兼容旧键)
meritsnumber | null发帖 karma (兼容旧键)
registerTimeobject | null注册时间
targetUrlstring请求的链接

data.user.registerTime 字段说明

返回值类型说明
textstringISO (只精确到天)
timestampnumber毫秒时间戳

data.works[] 字段说明

返回值类型说明
workIdstring | null作品 id (帖子 t3_ / 评论 t1_)
workTypestring作品类型
可用值: [“post”, “comment”]
typestring同 workType
可用值: [“post”, “comment”]
id36string短 id
authorIdstring | null作者 id (t2_)
urlstring | null链接
contentstring | null帖子: 正文, 没有时用标题; 评论: 评论内容
scorenumber | null得分
likesnumber | null得分 (同 score)
createdUtcnumber | null发布时间秒级时间戳
createdISOstring | null发布时间 ISO
subredditstring | null子版块名
subredditPrefixedstring | null带前缀的子版块名, 如 r/pics
stickiedboolean是否置顶
titlestring | null仅帖子: 标题
selftextstring | null仅帖子: 正文
commentsnumber | null仅帖子: 评论数
domainstring | null仅帖子: 链接域名
thumbnailstring | null仅帖子: 缩略图
isSelfboolean仅帖子: 是否自帖
isVideoboolean仅帖子: 是否视频
over18boolean仅帖子: 是否 NSFW
spoilerboolean仅帖子: 是否剧透
flairstring | null仅帖子: 标签
upvoteRationumber | null仅帖子: 好评率
bodystring | null仅评论: 评论内容
linkIdstring | null仅评论: 所在帖子 id (t3_)
linkTitlestring | null仅评论: 所在帖子标题
linkPermalinkstring | null仅评论: 所在帖子链接
isSubmitterboolean仅评论: 是否楼主
distinguishedstring | null仅评论: 特殊身份标记 (moderator / admin)
controversialitynumber | null仅评论: 是否有争议 (0 / 1)

data.pagination 字段说明

返回值类型说明
afterstring | null下一页游标, 传回 options.after 续取
hasMoreboolean是否还有更多

请求示例

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

返回示例

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

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "home",
    "user": {
      "accountId": "spez",
      "userId": "spez",
      "id36": "1w72",
      "username": "u_spez",
      "nickname": "spez",
      "accountName": "spez",
      "profileUrl": "https://www.reddit.com/user/spez/",
      "avatar": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?width=256&height=256&crop=256:256,smart&s=aa819b0964f6e3019e769d1cc8ede7318c3869a3",
      "banner": "https://b.thumbs.redditmedia.com/KWeEpVxXOGLoloMbM0IxGt9EiKPXizpwFgcSeWqtpZM.png",
      "bio": "Reddit CEO",
      "isVerified": true,
      "isSuspended": false,
      "isDeleted": false,
      "postsCount": 851,
      "commentsCount": 3228,
      "linkKarma": 184766,
      "commentKarma": 756623,
      "totalKarma": 941389,
      "contribution": 756623,
      "merits": 184766,
      "registerTime": {
        "text": "2005-06-06T00:00:00.000Z",
        "timestamp": 1118016000000
      },
      "targetUrl": "https://www.reddit.com/user/spez/",
      "contributions": 4079
    },
    "works": [
      {
        "workId": "t1_19ruo33ofgh8i",
        "workType": "comment",
        "type": "comment",
        "id36": "19ruo33ofgh8i",
        "authorId": "t2_1w72",
        "url": "https://www.reddit.com/r/RDDT/comments/1xiupuc/reddit_announces_q326_earnings_plus_ama/19ruo33ofgh8i/",
        "content": "Pretty simple. For people who are already coming to Reddit every week, we have to give them a reason to come back everyday. If you come for sports and entert...",
        "body": "Pretty simple. For people who are already coming to Reddit every week, we have to give them a reason to come back everyday. If you come for sports and entert...",
        "score": -8,
        "likes": -8,
        "createdUtc": 1793313726,
        "createdISO": "2026-10-29T22:42:06.000Z",
        "subreddit": "RDDT",
        "subredditPrefixed": "r/RDDT",
        "linkId": "t3_1xiupuc",
        "linkTitle": "Reddit Announces Q3’26 Earnings (plus AMA!)",
        "linkPermalink": "https://www.reddit.com/r/RDDT/comments/1xiupuc/reddit_announces_q326_earnings_plus_ama/",
        "isSubmitter": false,
        "stickied": false,
        "distinguished": "admin",
        "controversiality": 1
      }
    ],
    "pagination": {
      "after": null,
      "hasMore": true
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-reddit-home-1793954313882963200",
    "durationMs": 6877
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

积点消耗说明

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

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

在线调试