跳到主要内容
Reddit 全部接口
内容详情Reddit社区亮点 · 列表

Reddit 社区亮点

按公开 Subreddit ID 读取当前置顶、公告或精选帖子。

POST/v1/reddit/subreddits/highlights

英文名称: Reddit community highlights · Community Highlight · List Read current pinned, announcement, or highlighted posts by public subreddit ID.
reddit.subreddits.highlights@v1

按次价格

¥0.02/ 次

完整或确认空结果收费;部分结果和失败不收费。

正在核验实时状态

在线试用

登录后用真实参数调用一次,结果和扣费会显示在这里。

安全验证

正在加载安全验证…

正在确认实时执行状态…

执行结果

// Result

请求参数

subreddit_idstring必填

pattern: "^t5_[a-z0-9]+$"

示例: "t5_localllama"

请求 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "subreddit_id": {
      "type": "string",
      "pattern": "^t5_[a-z0-9]+$"
    }
  },
  "required": [
    "subreddit_id"
  ],
  "additionalProperties": false
}

代码示例

安装 SDK:npm i @dataxapi/sdk 或 pip install dataxapi;把 API Key 放进环境变量 DATAXAPI_API_KEY。

curl -X POST https://api.dataxapi.com/v1/reddit/subreddits/highlights \
  -H "Authorization: Bearer $DATAXAPI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"subreddit_id":"t5_localllama"}'

返回示例

200 · application/json
{
  "code": 200,
  "request_id": "req_example_reddit_batch5",
  "message": "success",
  "data": {
    "items": [
      {
        "label": "ANNOUNCEMENT",
        "expires_at": null,
        "post": {
          "id": "t3_highlight1",
          "title": "Public AMA announcement",
          "body": "Public announcement body",
          "created_at": "2026-08-26T23:31:35Z",
          "author": {
            "id": "t2_fixtureauthor",
            "name": "fixture_author"
          },
          "subreddit": {
            "id": null,
            "name": "LocalLLaMA",
            "title": null
          },
          "metrics": {
            "score": 42,
            "comment_count": 12,
            "upvote_ratio": 0.9,
            "share_count": null
          },
          "flair": "Resources",
          "post_hint": null,
          "domain": null,
          "url": null,
          "permalink": null,
          "reddit_url": null,
          "is_nsfw": false,
          "is_removed": null,
          "is_score_hidden": null
        }
      }
    ]
  },
  "page": {
    "next_cursor": null
  },
  "warnings": [],
  "meta": {
    "listing_id": "reddit.subreddits.highlights",
    "version": "v1",
    "catalog_release_id": "catalog-production-2026-09-19.b069be57",
    "price_book_version": "pricebook-production-2026-09-19.4487e352",
    "result_status": "complete",
    "charged_amount": "0.02",
    "balance_after": "49.98",
    "currency": "CNY"
  }
}
返回字段说明
codenumber
const: 200
request_idstring
messagestring
const: "success"
dataobject
pageobject
warningsarray
metaobject
返回 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "const": 200
    },
    "request_id": {
      "type": "string"
    },
    "message": {
      "type": "string",
      "const": "success"
    },
    "data": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "post": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "body": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "author": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "subreddit": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "title": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "title"
                    ],
                    "additionalProperties": false
                  },
                  "metrics": {
                    "type": "object",
                    "properties": {
                      "score": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "comment_count": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "upvote_ratio": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "share_count": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "score",
                      "comment_count",
                      "upvote_ratio",
                      "share_count"
                    ],
                    "additionalProperties": false
                  },
                  "flair": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "post_hint": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "domain": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "permalink": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reddit_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_nsfw": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_removed": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_score_hidden": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "title",
                  "body",
                  "created_at",
                  "author",
                  "subreddit",
                  "metrics",
                  "flair",
                  "post_hint",
                  "domain",
                  "url",
                  "permalink",
                  "reddit_url",
                  "is_nsfw",
                  "is_removed",
                  "is_score_hidden"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "label",
              "expires_at",
              "post"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": false
    },
    "page": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "next_cursor"
      ],
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "listing_id": {
          "type": "string",
          "const": "reddit.subreddits.highlights"
        },
        "version": {
          "type": "string",
          "const": "v1"
        },
        "catalog_release_id": {
          "type": "string",
          "minLength": 1
        },
        "price_book_version": {
          "type": "string",
          "minLength": 1
        },
        "result_status": {
          "type": "string",
          "enum": [
            "complete",
            "empty",
            "partial"
          ]
        },
        "charged_amount": {
          "type": "string"
        },
        "balance_after": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "const": "CNY"
        }
      },
      "required": [
        "listing_id",
        "version",
        "catalog_release_id",
        "price_book_version",
        "result_status",
        "charged_amount",
        "balance_after",
        "currency"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "code",
    "request_id",
    "message",
    "data",
    "page",
    "warnings",
    "meta"
  ],
  "additionalProperties": false
}

使用说明

适合

  • 已知社区 ID,需要快速找到当前公告、Megathread 或精选帖子。

不适合

  • 不用于把精选内容解释为社区整体观点或自然热度排名。

已知限制

  • 输入是 t5_ 开头的 Subreddit ID,可先由社区资料接口获得。
  • 部分社区当前没有亮点;这是可计费的确认空结果。
  • 亮点由社区当前配置决定,不等同于按互动量排序。

计费规则

¥0.02 / 次。完整或确认空结果收费;部分结果和失败不收费。

查看全部价格 →