API

Reddit API

Reddit服务每日大约1.21亿活跃用户,通过论坛、主题、文本帖子、链接、图片和评论,使其在社区洞察、声誉跟踪、产品反馈和小众发现方面发挥重要作用。

API 参考 版本: 1.0.0 14 终端 身份验证
Reddit

基本网址

https://api.pressmonitor.com

身份验证

所有请求使用 Bearer 令牌身份验证。每个调用都添加授权头。

Authorization: Bearer YOUR_API_KEY
x-subscription-id: YOUR_SUB_ID
GET /comments-by-username

用户评论

代码示例

curl -X GET "https://api.pressmonitor.com/comments-by-username" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /get-cursor

获取游标

代码示例

curl -X GET "https://api.pressmonitor.com/get-cursor" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /new-subreddits

新子版块

代码示例

curl -X GET "https://api.pressmonitor.com/new-subreddits" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /post-details

帖子详情

参数

名称 类型 位置 必填 描述
post_url string query 帖子 URL

代码示例

curl -X GET "https://api.pressmonitor.com/post-details?post_url=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /posts-by-subreddit

子版块帖子

代码示例

curl -X GET "https://api.pressmonitor.com/posts-by-subreddit" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /posts-by-username

用户帖子

代码示例

curl -X GET "https://api.pressmonitor.com/posts-by-username" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /search-posts

搜索帖子

参数

名称 类型 位置 必填 描述
query string query 搜索查询

代码示例

curl -X GET "https://api.pressmonitor.com/search-posts?query=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /search-subreddits

搜索子版块

参数

名称 类型 位置 必填 描述
query string query 搜索查询

代码示例

curl -X GET "https://api.pressmonitor.com/search-subreddits?query=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /top-comments-by-username

用户顶级评论

代码示例

curl -X GET "https://api.pressmonitor.com/top-comments-by-username" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功
GET /top-posts-by-username

用户顶级帖子

代码示例

curl -X GET "https://api.pressmonitor.com/top-posts-by-username" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID"

响应

200 成功