批量查询 X 长文章
根据文章 ID 数组批量拉取长文章的完整结构化元数据。
返回 API 接口列表
/Article Endpoints
POST
/x/articleAPI 鉴权
AuthorizationBearer token · header必填TwexAPI 平台的全局身份凭据 (Bearer Token)。所有接口调用均需在 Header 中携带:Authorization: Bearer <YOUR_TWEXAPI_KEY>。可在 TwexAPI 用户控制台获取。
请求体
必填application/jsonArray of
stringstring响应结果
200包含每个有效 ID 对应详细数据的长文章对象列表。
codeinteger必填HTTP 响应状态码(200 表示成功)
msgstring必填响应提示信息(例如 'success')
dataXArticleModel[]必填接口返回的核心业务数据载荷
展开属性折叠属性
Array of
XArticleModeltweet_idstring | any推文唯一数字 ID
展开属性折叠属性
Any of:
string
stringany
anyfull_textstring | any推文的完整正文文本
展开属性折叠属性
Any of:
string
stringany
anycreated_atstring | any发布或创建时间(UTC 标准时间格式)
展开属性折叠属性
Any of:
string
stringany
anylangstring | any推文主要语言代码(如 'zh', 'en', 'ja' 等)
展开属性折叠属性
Any of:
string
stringany
anybookmark_countinteger | any推文被用户加入书签收藏的累计次数
展开属性折叠属性
Any of:
integer
integerany
anyfavorite_countinteger | any推文获赞(Favorite/Like)累计总数
展开属性折叠属性
Any of:
integer
integerany
anyreply_countinteger | any推文收到的评论回复总数
展开属性折叠属性
Any of:
integer
integerany
anyretweet_countinteger | any推文被转发的累计总数
展开属性折叠属性
Any of:
integer
integerany
anyquote_countinteger | any推文被引用转发(Quote Tweet)的累计总数
展开属性折叠属性
Any of:
integer
integerany
anyview_countstring | any推文的实际总浏览/阅读次数(Impression)
展开属性折叠属性
Any of:
string
stringany
anyview_count_statestring | any浏览量统计状态(Enabled 表示已启用计数)
展开属性折叠属性
Any of:
string
stringany
anyconversation_idstring | any私信会话窗口唯一标识符
展开属性折叠属性
Any of:
string
stringany
anyauthor_user_idstring | any推文作者的推特数字用户 ID
展开属性折叠属性
Any of:
string
stringany
anyauthor_screen_namestring | any推文作者的推特用户名(Handle,无需包含 @)
展开属性折叠属性
Any of:
string
stringany
anyauthor_namestring | any推文作者的昵称/显示名称
展开属性折叠属性
Any of:
string
stringany
anyauthor_is_blue_verifiedboolean | any作者是否拥有推特蓝 V 认证(X Premium)
展开属性折叠属性
Any of:
boolean
booleanany
anyauthor_verifiedboolean | any作者是否拥有推特官方认证徽章
展开属性折叠属性
Any of:
boolean
booleanany
anyauthor_is_verified_organization_affiliateboolean | any作者是否为企业官方认证关联账号
展开属性折叠属性
Any of:
boolean
booleanany
anyarticle_idstring | anyX 长文章的唯一标识符
展开属性折叠属性
Any of:
string
stringany
anyarticle_titlestring | anyX 长文章的主标题文本
展开属性折叠属性
Any of:
string
stringany
anyarticle_preview_textstring | any长文章前导预览摘要文字
展开属性折叠属性
Any of:
string
stringany
anyarticle_summary_textstring | any长文章内容提要总结
展开属性折叠属性
Any of:
string
stringany
anyarticle_cover_image_urlstring | any长文章封面头图的公开 URL 地址
展开属性折叠属性
Any of:
string
stringany
anyarticle_blocksArticleBlock[]长文章由富文本段落构成的块(Blocks)数据结构
展开属性折叠属性
Array of
ArticleBlocktypestring必填文章段落块的类型(如段落、标题等)。
textstring必填文本正文内容
entityRangesArticleBlockRange[]文章段落块的实体高亮/链接范围。
展开属性折叠属性
Array of
ArticleBlockRangekeyinteger必填实体范围对应的索引 Key。
lengthinteger必填实体范围的字符长度。
offsetinteger必填实体范围在段落中的起始偏移量(Offset)。
article_plain_textstring | any长文章去除格式后的纯文本内容
展开属性折叠属性
Any of:
string
stringany
anyarticle_markdownstring | any长文章格式化后的纯净 Markdown 文本(极度适合大模型 RAG 语料提取)
展开属性折叠属性
Any of:
string
stringany
anyarticle_media_image_urlsstring[]长文章内嵌入的插图图片公开 URL 数组
422请求参数校验错误
detailValidationError[]展开属性折叠属性
Array of
ValidationErrorlocstring | integer[]必填展开属性折叠属性
Array of
string | integerAny of:
string
stringinteger
integermsgstring必填响应提示信息(例如 'success')
typestring必填inputanyctxobject⚡交互式测试POST
⚡交互式测试 / Try APIPOSTLive Console
🌐目标服务器:
https://api.twexapi.io● 生产环境就绪
🔍
公开数据读取(仅需 TwexAPI 平台密钥,无需 Twitter Cookie)
本接口为公开推特数据检索/查询,无需任何推特账号或 Cookie!仅需在下方「API 鉴权」中输入您的 TwexAPI 平台密钥 (Bearer Token) 即可直接发起测试。
🔑API 鉴权
📝请求体application/json
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
请求示例
curl -X POST "https://api.twexapi.io/x/article" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '[
"1803006263529541838",
"1803006263529541839"
]'const response = await fetch("https://api.twexapi.io/x/article", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify([
"1803006263529541838",
"1803006263529541839"
])
});import requests
response = requests.post(
"https://api.twexapi.io/x/article",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json=[
"1803006263529541838",
"1803006263529541839"
],
)响应示例
{
"code": 0,
"msg": "string",
"data": [
{
"tweet_id": "string",
"full_text": "string",
"created_at": "string",
"lang": "string",
"bookmark_count": 0,
"favorite_count": 0,
"reply_count": 0,
"retweet_count": 0,
"quote_count": 0,
"view_count": "string",
"view_count_state": "string",
"conversation_id": "string",
"author_user_id": "string",
"author_screen_name": "string",
"author_name": "string",
"author_is_blue_verified": true,
"author_verified": true,
"author_is_verified_organization_affiliate": true,
"article_id": "string",
"article_title": "string",
"article_preview_text": "string",
"article_summary_text": "string",
"article_cover_image_url": "string",
"article_blocks": [
{
"type": "string",
"text": "string",
"entityRanges": [
{
"key": 0,
"length": 0,
"offset": 0
}
]
}
],
"article_plain_text": "string",
"article_markdown": "string",
"article_media_image_urls": [
"string"
]
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}