查询热门内容标签
获取推特官方推荐的内容分类标签列表。
返回 API 接口列表
/Trending Endpoints
GET
/twitter/global-trending/contentsAPI 鉴权
AuthorizationBearer token · header必填TwexAPI 平台的全局身份凭据 (Bearer Token)。所有接口调用均需在 Header 中携带:Authorization: Bearer <YOUR_TWEXAPI_KEY>。可在 TwexAPI 用户控制台获取。
查询参数
countrystring必填由 /twitter/global-trending/countries 接口返回的国家名称或别名
topicstring必填由 /twitter/global-trending/topics 返回的主题名称或 Slug 别名
响应结果
200指定国家和主题下可用的内容分类标签选项。
codeinteger必填HTTP 响应状态码(200 表示成功)
msgstring必填响应提示信息(例如 'success')
dataany接口返回的核心业务数据载荷
展开属性折叠属性
Any of:
any
anyany
any422请求参数校验错误
detailValidationError[]展开属性折叠属性
Array of
ValidationErrorlocstring | integer[]必填展开属性折叠属性
Array of
string | integerAny of:
string
stringinteger
integermsgstring必填响应提示信息(例如 'success')
typestring必填inputanyctxobject⚡交互式测试GET
⚡交互式测试 / Try APIGETLive Console
🌐目标服务器:
https://api.twexapi.io● 生产环境就绪
🔍
公开数据读取(仅需 TwexAPI 平台密钥,无需 Twitter Cookie)
本接口为公开推特数据检索/查询,无需任何推特账号或 Cookie!仅需在下方「API 鉴权」中输入您的 TwexAPI 平台密钥 (Bearer Token) 即可直接发起测试。
🔑API 鉴权
⚙️请求参数 (2)
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
请求示例
curl -X GET "https://api.twexapi.io/twitter/global-trending/contents?country=string&topic=string" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.twexapi.io/twitter/global-trending/contents?country=string&topic=string", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.twexapi.io/twitter/global-trending/contents?country=string&topic=string",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)响应示例
{
"code": 200,
"msg": "success",
"data": {}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}