API
X(Twitter) API
X每月通过短篇文章、直播评论、视频和突发新闻讨论覆盖大约6亿用户,对于实时通信、媒体可见性和声誉响应至关重要。
API 参考 版本: 1.0.0 38 终端 身份验证
基本网址
https://api.pressmonitor.com 身份验证
所有请求使用 Bearer 令牌身份验证。每个调用都添加授权头。
Authorization: Bearer YOUR_API_KEY
x-subscription-id: YOUR_SUB_ID GET
/autocomplete 自动完成
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| value | string | query | 是 | 值 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/autocomplete?value=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/comments 评论
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| pid | string | query | 是 | Pid |
| ranking_mode | string | query | 是 | 排名模式 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/comments?pid=VALUE&ranking_mode=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/community-topics 社区话题
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/community-topics" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/community-tweets 社区推文
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| communityId | string | query | 是 | 社区 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/community-tweets?communityId=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/fetch-popular-communities 获取热门社区
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| topicId | string | query | 是 | 话题 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/fetch-popular-communities?topicId=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/followers 关注者
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/followers?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/followers-ids 关注者ID
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名(屏幕名,无 @ 符号,例如 'elonmusk') |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/followers-ids?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/followings 关注中
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/followings?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/followings-ids 关注中ID
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名(屏幕名,无 @ 符号,例如 'elonmusk') |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/followings-ids?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/get-users 获取用户
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| users | string | query | 是 | 用户 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/get-users?users=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/group-tweets 群组推文
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| communityId | string | query | 是 | 社区 ID |
| rankingMode | string | query | 是 | 排名模式 |
| searchType | string | query | 是 | 搜索类型 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/group-tweets?communityId=VALUE&rankingMode=VALUE&searchType=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/highlights 重点内容
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/highlights?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/jobs-details 职位详情
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| jobId | string | query | 是 | 职位 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/jobs-details?jobId=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/jobs-locations-suggest 职位地点建议
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| query | string | query | 是 | 搜索查询 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/jobs-locations-suggest?query=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/jobs-search 职位搜索
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| employment_type | string | query | 是 | 就业类型 |
| job_location_id | string | query | 是 | 职位地点 ID |
| job_location_type | string | query | 是 | 职位地点类型 |
| keyword | string | query | 是 | 关键词 |
| seniority_level | string | query | 是 | 资历级别 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/jobs-search?employment_type=VALUE&job_location_id=VALUE&job_location_type=VALUE&keyword=VALUE&seniority_level=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/likes 点赞
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| pid | string | query | 是 | Pid |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/likes?pid=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/list-details 列表详情
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| listId | string | query | 是 | 列表 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/list-details?listId=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/list-timeline 列表时间线
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| listId | string | query | 是 | 列表 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/list-timeline?listId=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/list-tweets 列表推文
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| list_id | string | query | 是 | 列表 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/list-tweets?list_id=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/org-affiliates 组织关联
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/org-affiliates?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/quotes 引用推文
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| pid | string | query | 是 | Pid |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/quotes?pid=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/retweets 转推
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| pid | string | query | 是 | Pid |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/retweets?pid=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/search 搜索
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| query | string | query | 是 | 搜索查询 |
| type | string | query | 是 | 类型 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/search?query=VALUE&type=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/search-community 搜索社区
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| query | string | query | 是 | 搜索查询 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/search-community?query=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/search-lists 搜索列表
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| query | string | query | 是 | 搜索查询 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/search-lists?query=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/searchold 旧搜索
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| query | string | query | 是 | 搜索查询 |
| type | string | query | 是 | 类型 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/searchold?query=VALUE&type=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/spaces 语音空间
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| id | string | query | 是 | ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/spaces?id=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/trends 趋势
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| woeid | string | query | 是 | Woeid |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/trends?woeid=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/trends-locations 趋势地点
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/trends-locations" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/tweet 推文
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| pid | string | query | 是 | Pid |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/tweet?pid=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/tweet-by-ids 通过 ID 获取推文
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tweetIDs | string | query | 是 | 推文 ID 列表 |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/tweet-by-ids?tweetIDs=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/user 用户
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名(屏幕名,无 @ 符号,例如 'elonmusk') |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/user?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/user-likes 用户点赞
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/user-likes?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/user-media 用户媒体
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| cusor | string | query | 是 | 游标 |
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/user-media?cusor=VALUE&user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/user-replies 用户回复
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/user-replies?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/user-replies-v2 用户回复 V2
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/user-replies-v2?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/user-tweets 用户推文
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/user-tweets?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/verified-followers 已验证关注者
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| user | string | query | 是 | 数字用户 ID(非用户名)。使用 'user' 端点通过用户名查询 ID |
| count | integer | query | 不 | 返回结果数量 |
| cursor | integer | query | 不 | 下一页的分页游标 |
代码示例
curl -X GET "https://api.pressmonitor.com/verified-followers?user=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功