DataNavoAPI / ANSWERS / REDDIT

如何读取 Reddit 高赞帖子并保留时间范围?

如何读取 Reddit 高赞帖子并保留时间范围?结合Reddit的接口合同、示例和可复核步骤,在本地验证输入与结果;真实调用保持关闭。

本地模拟所有展示数据均为虚构样本。真实 API、支付和外部邮件关闭。English ↗
01

直接回答

这个问题可从Reddit 社区帖子、Reddit 热门帖子的合同和本地样本开始核对。先明确 reddit.subreddits.posts.list 的输入,再检查 post 对象是否提供任务所需字段。

把输入范围、抽样规则和输出用途写清楚,保留请求编号与缺失字段。接口只能提供合同中的结构化样本;研究结论需要另外核对语境与代表性。

02

对应接口与字段

能力对象返回形状分页
reddit.subreddits.posts.list内容items显式逐页
reddit.posts.trending内容items显式逐页
03

输入合同

按所选方法查看参数含义、示例和条件规则;view 与 fields 控制返回内容,不改变 TEST 单价。

  • 只传本方法定义的参数;未知字段在执行前拒绝。
方法字段类型要求含义枚举或边界示例
GETidstring必填Community name, without the r/—"nasa"
GETsortstring可选/条件Hot, newest first, or top score first; top score ranks the posts of the last day unless window asks for another period["hot","latest","popular"]—
GETwindowstring可选/条件Which period top score first (sort=popular) ranks the posts of: the last 24 hours, 7, 30 or 365 days, or all time; the last 24 hours when left out. Only with sort=popular["24h","7d","30d","365d","all"]—
GETcursorstring可选/条件The `next_cursor` of the previous page. A new page is a new call.——
GETviewstring可选/条件How much of each item: compact (the most used fields, long text cut short), standard, or full (adds `ext`).["compact","standard","full"]—
GETfieldsarray可选/条件Return only these fields of each item, by path (`author.name`).maxItems: 64—
04

怎样完成一次核验

先用页面列出的能力运行一条本地演示,核对对象结构;再按问题定义筛选、分类或导出。若需要真实平台结论,本地样本不能替代相应证据。

json
{
  "capability": "reddit.subreddits.posts.list",
  "method": "GET",
  "params": {
    "id": "nasa"
  }
}
TRY THE CONTRACT

输入清楚,结果可查。

每次点击仅运行本机固定样本,不访问平台。高级 JSON 参数按所选方法校验;修改输入不会自动执行。

复制不会运行请求。CLI quote 只读报价,需要本地客户 TEST Key;MCP 需先配置 demo;GET 与批量 POST 均只返回本地虚构样本。

下载合同固定示例(不执行) ↗

需要 TEST 预算、Key 权限或失败演练?进入账户控制台。 客户模拟网关 ↗