概览
Reddit API 套件提供多种类型的 API,每种 API 旨在满足不同的 Reddit 数据采集需求。以下是这些 API 之间的交互方式概览,基于可用的功能:帖子 API
该 API 允许用户根据单个输入 URL 采集多个帖子。
- 发现功能:
- 通过 Subreddit URL 发现。
- 通过关键词发现。
- 重要字段:
- 
  url、title、num_comments、description
评论 API
该 API 允许用户通过帖子 URL 采集多个评论。
- 发现功能:
- 不适用
- 重要字段:
- 
  url、comment、community_name、num_replies
帖子 API
通过 URL 采集
该 API 允许用户使用提供的 URL 检索特定 Reddit 帖子的详细数据。 输入参数需要检索的 Reddit 帖子 URL。
包含全面的数据点:
- 
帖子详情:
 post_id、url、title、description、num_comments、date_posted、tag、related_posts、comments、photos、videos。查看所有数据点,请点击这里。 
- 
用户详情:
 user_posted。
- 
社区详情:
 community_name、community_url、community_description、community_members_num、community_rank。
- 
互动指标:
 num_upvotes。
通过关键词发现
该 API 允许用户通过特定关键词发现 Reddit 帖子,并可选择按日期筛选和设置要检索的帖子数量。 输入参数用于搜索相关帖子的关键词。
过滤帖子发布时间,以确保结果符合指定时间范围。
需要采集的帖子数量。如果未提供,则默认检索所有符合条件的帖子。
包含全面的数据点:
- 
帖子详情:
 post_id、url、user_posted、title、description、num_comments、date_posted、tag、related_posts、comments。查看所有数据点,请点击这里。 
- 
社区详情:
 community_name、community_url、community_description、community_members_num、community_rank。
- 
媒体详情:
 photos、videos。
通过 Subreddit URL 发现
该 API 允许用户使用 Subreddit URL 检索特定 Subreddit 中的帖子,并可选择基于特定标准对结果进行排序。 输入参数需要采集帖子的 Subreddit URL。
确定帖子排序方式(例如 
new、top、hot)。包含全面的数据点:
- 
帖子详情:
 post_id、url、user_posted、title、description、num_comments、date_posted、tag、related_posts、comments。查看所有数据点,请点击这里。 
- 
社区详情:
 community_name、community_url、community_description、community_members_num、community_rank。
- 
媒体详情:
 photos、videos。
评论 API
通过 URL 收集
该 API 允许用户从特定的 Reddit 帖子或评论 URL 采集详细的评论数据,并可选择根据发布时间筛选评论。 输入参数要获取评论的 Reddit 帖子或评论的 URL。
仅采集指定天数内发布的所有评论。
包含全面的数据点:
- 
评论详情:
 comment_id,user_posted,comment,date_posted,replies,num_upvotes,num_replies。所有数据点,请点击这里。 
- 
帖子详情:
 post_url,post_id,post_language,post_state,post_type,images。
- 
社区详情:
 community_name,community_url,community_description,community_members_num,community_rank。
- 
帖子属性:
 is_moderator,is_pinned,has_bot_in_username,is_locked,is_admin_post,is_archived_post,is_moderator_post,is_quarantined_post,is_not_safe_for_work_post,is_eligible_for_content_blocking_post,is_promoted_post。