API 文档

Reddit 帖子详情 API

Reddit 帖子详情 API 参数、分页、真实响应与计费说明。

测试 API

查询公开数据,使用明确的参数与真实响应示例。

打开产品页并测试
POST https://api.goanyapi.com/api/v1/reddit/post/detail

请求与鉴权

同步 POST JSON 接口,不生成任务、无需轮询。使用 Authorization: Bearer YOUR_API_KEY。没有 Path 或 Query 参数。

输入参数

参数 位置 类型 必填 默认值 范围与说明
Authorization Header string 是 — Bearer YOUR_API_KEY
Content-Type Header string 是 application/json application/json
url JSON body string 是 — 完整资源链接,按接口填写 Threads 帖子、Reddit 帖子、版块或用户主页链接。 maxLength: 2048

使用完整资源 URL 优先;Threads 用户接口也接受用户名或 @用户名,内部标识无需自行获取,不额外收费。first、count、limit 不作为公开输入,使用服务默认条数;实际返回可能更少。

请求示例

POST /api/v1/reddit/post/detail
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "url": "https://www.reddit.com/r/wallstreetbets/comments/1xy3kap/"
}

输出字段

成功返回 HTTP 200,业务数据位于 data.result。null、空字符串、空数组、缺失字段原样保留,不补造数据。false 和 0 是合法业务值,不等于空结果。

字段 类型 说明
code string 成功为 ok,失败为公开错误码
message string 请求状态说明
data.result object / null 实际公开结果,可为空
data.creditsUsed integer 本次实际扣费,空结果为 0;非空价格来自数据库
data.remainingCredits number 结算后的账户积分余额
data.result.author string 实际公开业务字段;保留 null、空值与字段缺失
data.result.authorId string 实际公开业务字段;保留 null、空值与字段缺失
data.result.awardCount number 实际公开业务字段;保留 null、空值与字段缺失
data.result.commentCount number 实际公开业务字段;保留 null、空值与字段缺失
data.result.contentUrl string 实际公开业务字段;保留 null、空值与字段缺失
data.result.createdAt string 实际公开业务字段;保留 null、空值与字段缺失
data.result.domain string 实际公开业务字段;保留 null、空值与字段缺失
data.result.id string 实际公开业务字段;保留 null、空值与字段缺失
data.result.images array 实际公开业务字段;保留 null、空值与字段缺失
data.result.language string 实际公开业务字段;保留 null、空值与字段缺失
data.result.score number 实际公开业务字段;保留 null、空值与字段缺失
data.result.state null 实际公开业务字段;保留 null、空值与字段缺失
data.result.subreddit string 实际公开业务字段;保留 null、空值与字段缺失
data.result.subredditId string 实际公开业务字段;保留 null、空值与字段缺失
data.result.text string 实际公开业务字段;保留 null、空值与字段缺失
data.result.title string 实际公开业务字段;保留 null、空值与字段缺失
data.result.type string 实际公开业务字段;保留 null、空值与字段缺失
data.result.upvoteRatio number 实际公开业务字段;保留 null、空值与字段缺失
data.result.url string 实际公开业务字段;保留 null、空值与字段缺失
data.result.video null 实际公开业务字段;保留 null、空值与字段缺失

分页与结果边界

本接口不接受分页参数,不自动请求后续页。

真实响应示例

采集时间: 2026-11-18T09:31:51Z

保存自真实成功请求,完整保留公开结果列表。结构省略 data.creditsUsed 与 data.remainingCredits,实际响应包含按当前配置计算的费用与余额。保存示例不会请求或扣费;媒体地址可能过期。

{
  "code": "ok",
  "message": "ok",
  "data": {
    "result": {
      "id": "t3_1xy3kap",
      "title": "United Airlines says it has a widespread system outage just days after nationwide ground stop",
      "author": "Craneteam",
      "authorId": "t2_kobmm",
      "score": 8166,
      "upvoteRatio": 0.9773535220539828,
      "commentCount": 663,
      "createdAt": "2026-11-16T22:38:02.286000+0000",
      "type": "link",
      "domain": "apnews.com",
      "contentUrl": "https://apnews.com/article/united-airlines-outage-5a5e5f75bb07f11ffb8750901f0076ff",
      "url": "https://www.reddit.com/r/wallstreetbets/comments/1xy3kap/united_airlines_says_it_has_a_widespread_system/",
      "subreddit": "r/wallstreetbets",
      "subredditId": "t5_2th52",
      "awardCount": 3,
      "language": "en",
      "state": null,
      "text": "Lol the outages will continue until portfolios tank\n    \n    \n    \n    \n      \n      \n      Read more",
      "images": [
        "https://styles.redditmedia.com/t5_2th52/styles/communityIcon_vqqah3m0bn8c1.png?width=96&height=96&frame=1&auto=webp&s=9fdf2d3df11d539eb8fbc92424ecee4feb33fa89",
        "https://external-preview.redd.it/united-airlines-says-it-has-a-widespread-system-outage-just-v0-bAO2pUBtoDLDqgGzEoV7ltLwUSnyzVr-u79IFH2M0Ko.jpeg?width=640&crop=smart&auto=webp&s=01262e5134496da8b404cb107c94147881973848",
        "https://external-preview.redd.it/united-airlines-says-it-has-a-widespread-system-outage-just-v0-bAO2pUBtoDLDqgGzEoV7ltLwUSnyzVr-u79IFH2M0Ko.jpeg?width=640&crop=smart&auto=webp&s=01262e5134496da8b404cb107c94147881973848"
      ],
      "video": null
    }
  }
}

计费

…

仅非空成功结果按数据库当前配置扣费;空结果和失败不扣费,内部标识处理不单独收费。每页独立结算;false、0 等合法结果不按空结果处理。

状态码

HTTP 含义
200 成功,包含免费空结果
400 JSON、参数或资源 URL 无效
401 未鉴权或凭证无效
402 积分不足
429 请求过于频繁,遵循 Retry-After
502 数据请求失败
503 接口或价格未配置