Reddit 首页帖子流 API
Reddit 首页帖子流 API 参数、分页、真实响应与计费说明。
查询公开数据,使用明确的参数与真实响应示例。
打开产品页并测试POST https://api.goanyapi.com/api/v1/reddit/home/feed请求与鉴权
同步 POST JSON 接口,不生成任务、无需轮询。使用 Authorization: Bearer YOUR_API_KEY。没有 Path 或 Query 参数。
输入参数
| 参数 | 位置 | 类型 | 必填 | 默认值 | 范围与说明 |
|---|---|---|---|---|---|
| Authorization | Header | string | 是 | — | Bearer YOUR_API_KEY |
| Content-Type | Header | string | 是 | application/json | application/json |
| sort | JSON body | string | 否 | BEST | 结果排序;完整取值见下方枚举,区分大小写。 enum: "BEST", "NEW", "TOP", "HOT", "RISING" maxLength: 2048 |
| cursor | JSON body | string | 否 | — | 首次不传;下一页将 data.result.next_cursor 原样传入,不自行构造游标。 maxLength: 16384 |
| feedLength | JSON body | integer | 否 | 0 | 此前累计返回的记录条数,首次为 0,翻页加上上一页实际列表长度;不是每页条数。 minimum: 0 maximum: 1000000 |
使用完整资源 URL 优先;Threads 用户接口也接受用户名或 @用户名,内部标识无需自行获取,不额外收费。first、count、limit 不作为公开输入,使用服务默认条数;实际返回可能更少。
sort
| 值 | 默认 |
|---|---|
| "BEST" | 是 |
| "NEW" | — |
| "TOP" | — |
| "HOT" | — |
| "RISING" | — |
请求示例
POST /api/v1/reddit/home/feed
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"sort": "BEST",
"feedLength": 0
}输出字段
成功返回 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.count | number | 当前页记录数,不是全部记录总数 |
| data.result.has_more | boolean | 是否仍有后续结果;没有有效游标时不可自行构造分页 |
| data.result.next_cursor | string | 下一页不透明游标;仅在非空、不同且允许继续时原样传回 |
| data.result.posts | array | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].author | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].authorId | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].awardCount | number | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].commentCount | number | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].contentUrl | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].createdAt | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].domain | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].id | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].images | array | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].language | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].score | number | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].state | null | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].subreddit | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].subredditId | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].text | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].title | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].type | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].upvoteRatio | number | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].url | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].video | object | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].video.height | number | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].video.url | string | 实际公开业务字段;保留 null、空值与字段缺失 |
| data.result.posts[].video.width | number | 实际公开业务字段;保留 null、空值与字段缺失 |
分页与结果边界
首次不传 cursor。下一页保持相同筛选条件,将 data.result.next_cursor 原样传入 cursor。每页独立请求,只有非空成功结果计费。has_more 为 false、游标为空或与本页相同时停止;不猜造游标。
feedLength 是此前累计返回的记录条数,首次为 0;翻页时加上上一页实际列表长度。count 仅表示当前页条数,不代表全量总数。
真实响应示例
采集时间: 2026-11-18T09:31:31Z
保存自真实成功请求,完整保留公开结果列表。结构省略 data.creditsUsed 与 data.remainingCredits,实际响应包含按当前配置计算的费用与余额。保存示例不会请求或扣费;媒体地址可能过期。
{
"code": "ok",
"message": "ok",
"data": {
"result": {
"posts": [
{
"id": "t3_1xza0cr",
"title": "I hate kids",
"author": "Relative-Trainer636",
"authorId": "t2_14m54lg3s0",
"score": 1135,
"upvoteRatio": 0.9436178543461238,
"commentCount": 485,
"createdAt": "2026-11-18T08:24:48.338000+0000",
"type": "video",
"domain": "v.redd.it",
"contentUrl": "https://v.redd.it/02afydc9yb2i1",
"url": "https://www.reddit.com/r/mildlyinfuriating/comments/1xza0cr/i_hate_kids/",
"subreddit": "r/mildlyinfuriating",
"subredditId": "t5_2ubgg",
"awardCount": 0,
"language": "en",
"state": null,
"text": null,
"images": [
"https://styles.redditmedia.com/t5_2ubgg/styles/communityIcon_lkxajjefezh51.png?width=48&height=48&frame=1&auto=webp&s=1026e253952639769a3173e30781f0e047bdaf62",
"https://external-preview.redd.it/i-hate-kids-v0-eXl2b2Y4ZDl5YjJpMahSKdao_uoYYewhz5gw3xdTqQUGorUTrfF4IIGpiTjy.png?width=640&crop=smart&format=pjpg&auto=webp&s=d555a31e577021d60dff02851973bdc0713c3dee"
],
"video": {
"url": "https://packaged-media.redd.it/02afydc9yb2i1/pb/m2-res_1080p.mp4?m=DASHPlaylist.mpd&var=sgpssan&v=1&e=1795010400&s=e20b19e2284e43d0442763a10563475a0ff0a736",
"width": 1920,
"height": 1080
}
},
{
"id": "t3_1xz37az",
"title": "Rao’s sauce jars from Costco are 0.3 oz smaller than normal",
"author": "Promit",
"authorId": "t2_316tj",
"score": 2362,
"upvoteRatio": 0.9530825901512214,
"commentCount": 514,
"createdAt": "2026-11-18T02:07:42.011000+0000",
"type": "image",
"domain": "i.redd.it",
"contentUrl": "https://i.redd.it/x2yzgi7d4a2i1.jpeg",
"url": "https://www.reddit.com/r/mildlyinteresting/comments/1xz37az/raos_sauce_jars_from_costco_are_03_oz_smaller/",
"subreddit": "r/mildlyinteresting",
"subredditId": "t5_2ti4h",
"awardCount": 0,
"language": "en",
"state": null,
"text": null,
"images": [
"https://b.thumbs.redditmedia.com/lTgz7Yx_6n8VZemjf54viYVZgFhW2GlB6dlpj1ZwKbo.png",
"https://preview.redd.it/raos-sauce-jars-from-costco-are-0-3-oz-smaller-than-normal-v0-x2yzgi7d4a2i1.jpeg?width=640&crop=smart&auto=webp&s=e810c2f63400d8dce2bc43360f99737329841b4b",
"https://preview.redd.it/raos-sauce-jars-from-costco-are-0-3-oz-smaller-than-normal-v0-x2yzgi7d4a2i1.jpeg?width=640&crop=smart&auto=webp&s=e810c2f63400d8dce2bc43360f99737329841b4b",
"https://i.redd.it/x2yzgi7d4a2i1.jpeg"
],
"video": null
},
{
"id": "t3_1xywt0y",
"title": "If a Titanic style disaster happened today, would the men be expected to give up their seats in the lifeboats for the women and children?",
"author": "Greefire7",
"authorId": "t2_12kuhfug4u",
"score": 1969,
"upvoteRatio": 0.8649155722326454,
"commentCount": 1826,
"createdAt": "2026-11-17T21:27:58.676000+0000",
"type": "text",
"domain": "self.NoStupidQuestions",
"contentUrl": "https://www.reddit.com/r/NoStupidQuestions/comments/1xywt0y/if_a_titanic_style_disaster_happened_today_would/",
"url": "https://www.reddit.com/r/NoStupidQuestions/comments/1xywt0y/if_a_titanic_style_disaster_happened_today_would/",
"subreddit": "r/NoStupidQuestions",
"subredditId": "t5_2w844",
"awardCount": 0,
"language": "en",
"state": null,
"text": "This is not a question on morality. I’m not asking SHOULD men give up their seats, I am asking would it be socially expected for them to give up their seat? Or is it a first come first served basis",
"images": [
"https://styles.redditmedia.com/t5_2w844/styles/communityIcon_krq4riav5m191.png?width=48&height=48&frame=1&auto=webp&s=47cafd5e8a2d7c6a288c2ed70b67aa1e3d818cc0"
],
"video": null
}
],
"count": 3,
"next_cursor": "dDNfMXh5d3QweQ==",
"has_more": true
}
}
}计费
…
仅非空成功结果按数据库当前配置扣费;空结果和失败不扣费,内部标识处理不单独收费。每页独立结算;false、0 等合法结果不按空结果处理。
状态码
| HTTP | 含义 |
|---|---|
| 200 | 成功,包含免费空结果 |
| 400 | JSON、参数或资源 URL 无效 |
| 401 | 未鉴权或凭证无效 |
| 402 | 积分不足 |
| 429 | 请求过于频繁,遵循 Retry-After |
| 502 | 数据请求失败 |
| 503 | 接口或价格未配置 |