大批量获取Reddit帖子详情(最多30条)/Fetch Reddit Post Details in Large Batch (Max 30)
Changed on[中文]
用途:
- 根据帖子ID列表大批量获取帖子详情
- 支持最多30条帖子的批量查询
- 可选择性包含特定评论的上下文
参数:
- post_ids: 帖子ID列表,逗号分隔,格式如 "t3_XXXXXX,t3_YYYYYY,...",最多支持30条
- include_comment_id: 是否包含特定评论ID,默认False
- comment_id: 评论ID(当include_comment_id为True时使用),格式如 "t1_XXXXXX"
返回:
- 包含帖子详细信息的数据,包括:
- 帖子内容、标题、作者
- 统计数据(点赞数、评论数等)
- 版块信息
- 奖励信息
- 媒体资源
- 推荐原因等
注意:
- 最多支持30条帖子的批量查询
- 超过30条将返回错误
- 大批量查询可能需要较长的响应时间
- APP接口的ID格式与Web接口不同,需要添加类型前缀
- 帖子ID前缀: t3_ (例如: t3_1ojnh50)
- 评论ID前缀: t1_ (例如: t1_abcd123)
[English]
Purpose:
- Fetch post details in large batch by post ID list
- Support batch query for up to 30 posts
- Optionally include context for specific comments
Parameters:
- post_ids: Post IDs comma-separated, format like "t3_XXXXXX,t3_YYYYYY,...", max 30 posts
- include_comment_id: Whether to include specific comment ID, default False
- comment_id: Comment ID (used when include_comment_id is True), format like "t1_XXXXXX"
Returns:
- Data containing detailed post information including:
- Post content, title, author
- Statistics (upvotes, comment count, etc.)
- Subreddit information
- Award information
- Media resources
- Recommendation reasons, etc.
Notes:
- Maximum 30 posts per batch query
- Error will be returned if exceeds 30 posts
- Large batch queries may take longer to respond
- APP API ID format differs from Web API, requires type prefix
- Post ID prefix: t3_ (e.g., t3_1ojnh50)
- Comment ID prefix: t1_ (e.g., t1_abcd123)
[示例/Example]
post_ids="t3_1ojnh50,t3_1ok432f,t3_1nwil8j,t3_1oj6vn6,t3_1nuenmd,..." include_comment_id=false comment_id="" need_format=false
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Query parameters
返回内容使用的语言,采用 IETF 语言标签;默认 en-US / Preferred response language as an IETF language tag; default: en-US
帖子ID列表,逗号分隔,最多30条/Post IDs comma-separated, max 30
是否包含特定评论ID/Include specific comment ID
评论ID/Comment ID (when include_comment_id is True)
是否需要清洗数据/Whether to clean and format the data
Response
Successful Response
Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- breaking
for the
queryrequest parameterpost_ids, the minLength was increased from0to4 - breaking
added the pattern
^(?:|t1_[a-z0-9]{1,17})$to thequeryrequest parametercomment_id - breaking
added the pattern
^t3_[a-z0-9]{1,17}(?:\s*,\s*t3_[a-z0-9]{1,17})*$to thequeryrequest parameterpost_ids - warning
for the
queryrequest parametercomment_id, the maxLength was set to20 - warning
for the
queryrequest parameterpost_ids, the maxLength was set to629 - info
added the new optional
queryrequest parameterlanguage
- breaking