跳转到主要内容
请查看我们的对照指南:

X API:企业版数据字典

介绍

Enterprise Post 是 X 上一切内容的基本原子单元。所有返回 Post 的 X API 都以 JavaScript 对象表示法(JSON)对返回的 data 进行编码。JSON 基于键值对,由具名属性及其对应的值组成。从 API 检索到的 Post 对象包括 X 用户的“状态更新”;转发(Retweet)、回复以及引用 Tweet 也同样都是 Post 对象。若某个 Post 与另一条 Post 存在关联(例如转发、回复或引用 Tweet),相关对象会在该 Post 对象中被标识或嵌入。即便是原生 X data 格式中最简单的 Post,也会包含嵌套的 JSON 对象,用于表示其他属性,例如作者、被提及的用户、标记的地点、话题标签(hashtag)、现金标签(cashtag)、媒体或 URL 链接。处理 X data 时,理解这一点非常重要。你从 X API 接收的 Post data 的具体格式取决于收到的 Post 类型、所使用的 X API,以及格式设置。 返回 Post 对象的 Enterprise 端点已更新,提供理解 Post 编辑历史所需的元数据。请在“编辑 Post”基础知识页面了解更多相关元数据:Edit Posts 基础知识
在原生 X 格式中,JSON 负载将包含根级属性和嵌套的 JSON 对象(此处用 {} 表示):
{
	"created_at": "Fri Feb 14 19:00:55 +0000 2020",
	"id_str": "1228393702244134912",
	"text": "开发者在他们的情人节卡片上写了什么?\n  \nwhile(true) {\n    I = Love(You);  \n}",
	"entities": {
		"hashtags": [],
		"symbols": [],
		"user_mentions": [],
		"urls": []
	},
	"user": {
		"entities": {
			"url": {}
		}
	},
	"place": {}
}

可用的数据格式

请注意:强烈建议在企业数据 API 中使用 Enriched Native 格式。 
  • Enriched Native 格式包含自 2017 年以来新增的所有元数据,例如 投票元数据,以及 reply_count、quote_count 等附加指标。
  • 自 2017 年字符数更新以来,Activity Streams 格式未添加新的元数据或增强项。
企业数据 API 提供两种数据格式。与标准 v1.1 原生格式最为接近的企业格式是 Enriched Native。较早的企业数据格式为 Activity Streams,最初由 Gnip 实施,并作为当时跨 X 及其他社交媒体数据提供商的统一规范使用。尽管该格式仍可用,但自 2017 年起,X 仅在 Enriched Native 格式上投入新功能与改进。 Enriched Native 格式顾名思义,既包含 X 的原生对象,也包含适用于企业数据产品的额外增强内容,例如 URL 展开元数据、个人资料地理信息、投票元数据以及更多互动指标。  

按数据格式对比对象

无论你的 X 使用场景是什么,理解这些以 JSON 编码的 Post 对象及其属性所代表的含义,对成功定位所需的数据信号至关重要。为此,我们为各数据格式中的每类对象提供了专门页面。 对应上方的 JSON 层级结构,以下是每个对象的链接:
原生增强Activity Streams
Link Post 对象Link Activity 对象
Link User 对象Link Actor 对象
Link Entities 对象Link X entities 对象
Link Extended entities 对象Link X extended entities 对象
Link Geo 对象Link Location 对象
n/aLink Gnip 对象

解析最佳实践

  • X 的 JSON 使用 UTF-8 字符编码。
  • 解析器应能轻松容忍字段顺序的变化。应假定 Post 的 JSON 作为无序的 data 映射/哈希提供。
  • 解析器应能容忍新增字段。 
  • JSON 解析器必须能够容忍“缺失”的字段,因为并非所有字段都会在所有上下文中出现。
  • 通常可以安全地将值为 null 的字段、空集合以及字段缺失视为同一情况

企业版原生扩展 data 对象

原生增强型 Tweet 对象

想了解原生增强型 data 格式如何映射到 X API v2 格式? 请查看我们的对比指南:原生增强型与 X API v2 的比较

Post 对象

在使用企业版数据产品时,你会发现数据字典与 Post 数据的原生格式大体一致,但增加了部分丰富的元数据。原生丰富格式的基础层级沿用与 X API v1.1 数据格式相同的许多对象名称。Post 对象包含一长串“根级”属性,包括 idcreated_attext 等基础属性。Post 对象还包含嵌套对象,例如 userentitiesextended_entities。Post 对象还可能包含其他嵌套的 Post 对象,如 retweeted_status、quoted_status 和 extended_tweet。原生丰富格式还包含一个 matching_rules 对象。
X 数据字典
以下是这些“根级”属性的数据字典,以及指向子对象数据字典的链接。
属性类型描述
已创建_在字符串该 Post 的创建 UTC 时间。示例:

“已创建_在”:“周三 2018年10月10日 20:19:24 +0000”
idInt64用于此 Post 的唯一标识符的整数形式。该数值超过 53 位,一些编程语言在解析时可能会遇到问题或出现静默错误。使用有符号 64 位整数存储此标识符是安全的。使用**id_str**为安全起见,请获取该标识符。参见X ID了解更多信息。示例:

“id”:1050118621198921728
id_字符串(str)字符串此 Post 的唯一标识符的字符串形式。实现应使用该值,而非 id 中的长整型数值。id。示例:

“id_字符串(str)”:“1050118621198921728”
文本字符串状态更新的实际 UTF-8 文本。请参阅X-text有关当前哪些字符被视为有效的详细说明。示例:

“文本”:“为了为更多表达留出空间,我们现在将所有表情符号按相同方式计数——包括带有性别和肤色的表情符号…https://t.co/MkGjXf9aXm
字符串用于发布该 Post 的工具,表示为一个 HTML 格式的字符串。来自 X 网站的 Post 的 source 值为**Web**。

示例:

“来源”:“X Web 客户端”
已截断布尔指示 text 参数的值是否被截断,例如因转发导致超过原始 Post 文本的 140 字符限制。被截断的文本将以省略号 ... 结尾。由于 X 现在会拒绝超长 Post 而不再截断,绝大多数 Post 的该值为 false。请注意,尽管原生转发的顶层 text 属性可能会被缩短,但原文可在 retweeted_status 对象下获取,且 truncated 参数将保持与原始状态一致(多数情况下为 false)。示例:

“truncated”:true**text参数被截断,例如由于一次转推超过了原始 Post 文本的 140 字符限制。被截断的文本将以省略号结尾,如下所示...由于 X 现在会拒绝过长的 Post,而不再对其截断,绝大多数 Post 的该值将被设置为false。请注意,尽管原生转推的顶层text属性已被缩写,原始文本可在retweeted_status对象与truncated参数将被设置为原始状态的值(在大多数情况下,false**)。示例:

“已截断”:true
在_回复_至_状态_idInt64*可为 null。*如果所表示的 Post 是一条回复,则此字段将包含原始 Post 的整数标识’的 id。示例:

“在_回复_至_状态_id”:1051222721923756032
于_回复_至_状态_id_str字符串*可为空值。*如果所表示的 Post 为回复,则此字段将包含原始 Post 的字符串表示形式’的 id。示例:

“在……中_回复_至_状态_id_str”:“1051222721923756032”
在_回复_至_用户_idInt64*可为空值。*如果所表示的 Post 是回复,则此字段将包含原始 Post 的整数表示’的作者 id。这并不一定是 Post 中直接被提及的用户。示例:

“在_回复_至_用户_id”:6253282
在_回复_至_用户_id_str字符串*可为 null。*如果所代表的 Post 是回复,此字段将包含原始 Post 的字符串表示形式’作者的ID。这并不一定是 Post 中直接提到的用户。示例:

“在_回复_至_用户_id_str”:“6253282”
于_回复_至_屏幕_名称字符串*可为 null。*如果所表示的 Post 是一条回复,此字段将包含原始 Post 的用户名’s 作者。示例:

“在_回复_至_屏幕_名称”:“xapi”
用户User 对象发布该 Post 的用户。完整属性列表请参阅 User 数据字典。

示例:高亮显示部分属性:

{ “用户”:<br/> “id”: 6253282,
“id_str”:“6253282”,
“名称”:“X API”,
“屏幕_名称”:“API”,
“位置”:“美国加利福尼亚州旧金山”,
“URL”:“https://developer.x.com”,
“说明”:“真正的 X API。发布关于 API 变更、服务问题以及我们开发者平台的推文。Don’没得到答案?它’在我的网站上。”,
“已验证”: true,
“粉丝_计数”: 6129794,
“好友_计数”: 12,
“已列出_计数”: 12899,
“收藏_计数”: 31,
“状态_计数”: 3658,
“已创建_在”:“2007年5月23日 周三 06:01:13 +0000”,
“UTC_偏移”: null,
“时间_区域”: null,
“地理位置_已启用”: false,
“语言”:“英语(en)”,
“贡献者_已启用”: false,
“是_翻译工具”: false,
“个人主页_背景_颜色”:“null”,
“个人资料_背景_图像_URL”:“null”,
“个人主页_背景_图像_url_https”:“null”,
“个人资料_背景_磁贴”: null,
“个人资料_链接_颜色”:“null”,
“个人资料_侧边栏_边框_颜色”:“null”,
“个人资料_侧栏_填写_颜色”:“null”,
“个人资料_文本_颜色”:“null”,
“个人资料_使用_背景信息_图像”: null,
“个人主页_图像_URL”:“null”,
“个人资料_图像_url_https”:“https://pbs.twimg.com/profile_images/942858479592554497/BbazLO9L_normal.jpg”,
“个人资料_横幅图_URL”:“https://pbs.twimg.com/profile_banners/6253282/1497491515”,
“默认值_个人资料”: false,
“默认值_个人资料_图片”: false,
“关注”: null,
“关注_请求_已发送”: null,
“通知”: null
}
}
坐标坐标*可为 null。*表示该 Post 的地理位置,由用户或客户端应用程序提供。内部坐标数组的格式为GeoJSON(先经度,后纬度)。示例:

“坐标”:
<br/> “坐标”:
[
-75.14310264,
40.05701649
],
“类型”:“要点”
}
位置位置可为 null如果存在,表示该 Post 与某个 Place 关联(但不一定来自该 Place)。示例:

“位置”:
<br/> “属性”:
“边界约束_框框”:
<br/> “坐标”:
[
[
[-77.119759,38.791645],
[-76.909393,38.791645],
[-76.909393,38.995548],
[-77.119759,38.995548]
]],
“type”:“Polygon(Polygon 网络)”
},
“国家/地区”:“美国”,
“国家/地区_代码”:“美国”,
“完整_名称”:“华盛顿特区”,
“id”:“01fbe706f872cb32”,
“名称”:“华盛顿”,
“位置_类型”:“城市”,
“URL”:“http://api.x.com/1/geo/id/0172cb32.json
}
已引用_状态_idInt64仅当该 Post 为引用 Tweet 时才显示此字段。此字段包含被引用 Tweet 的整数型 Post ID。示例:

“已引用_状态_id”:1050119905717055488
已引用_状态_id_str字符串仅当该 Post 为引用 Tweet 时才会出现此字段。该字段为被引用 Tweet 的 Post ID 的字符串形式。示例:

“已引用_状态_id_str”:“1050119905717055488”
是_引用_状态布尔指示此内容是否为引用的 Tweet。示例:

“为_引述_状态”:false
已引用_状态Post(Post)仅当该 Post 为引用 Tweet 时才会出现此字段。此属性包含被引用的原始 Post 的 Post 对象。
已转推_状态Post用户可以通过转发来扩大其他用户创作的 Post 的传播范围。可通过是否存在来区分转发与普通 Post**retweeted_status**属性。该属性包含一个对原文被转发的 Post。请注意,对转发的再次转发不会显示中间那条转发的表示,只会显示原始的 Post。(用户也可以通过删除自己的转发来取消该转发。)
引述_计数整数*可为 null。*表示该 Post 被 X 用户引用的大致次数。示例:

“引述_计数”:33

注意:此对象仅适用于 Premium 和企业版等层级的产品。
回复_计数Int(整数)此 Post 的回复次数。示例:

“回复_计数”:30

注意:仅在 Premium 和企业版层级的产品中提供此对象。
转发_计数Int(整型)该 Post 被转发的次数。示例:

“转推_计数”:160
收藏_计数整数*可为 null。*表示该 Post 被 X 用户点赞的大致次数。示例:

“最爱_计数”:295
实体实体项从 Post 文本中解析出的实体(Entities)。另请参阅X 对象中的实体。示例:

“实体”:
<br/> “标签”:[],
“URL”:[],
“用户_提及”:[],
“媒体”:[],
“符号”:[]
“投票”:[]
}
延长版_实体扩展型实体当 Post 中包含一至四张原生照片、一个视频或一个动画 GIF 时,该字段为一个数组’媒体’元数据。这也适用于引用 Tweet。另请参阅X 对象中的实体示例:

“实体”:
<br/> “媒体”:[]
}
已点赞布尔值*可为 Null。*指示经过认证的用户是否已点赞此 Post。示例:

“已收藏”:true
已转推布尔指示经过身份验证的用户是否已转发此 Post。示例:

“已转推”:false
有可能_敏感布尔值*可为 null。*此字段表示内容可能被识别为敏感。Post 作者可在其账户偏好设置中选择“将你发布的媒体标记为可能包含敏感内容”,此后创建的每条 Post 都会带有该标记。

这也可能由 X 的内部支持人员进行判定并加注标签。

“可能地_敏感”:false
筛选器_级别字符串指示筛选器的最大值_可使用的 level 参数值上限,同时仍可流式传输此 Post。因此,值为**medium将会在…进行流式传输low、以及medium**流式传输。

示例:

“筛选器_级别”:“低”
语言字符串可为 null。(如有)表示BCP 47与机器检测到的 Post 文本语言相对应的 BCP 47 语言标识符,或**und**如果无法检测出任何语言。

示例:

“语言代码”:“en”
编辑_历史记录对象用于标识某个 Post 所有版本的唯一标识符。对于未编辑的 Post,仅有一个 id。对于有编辑历史的 Post,将包含多个 id,按升序排列以反映编辑顺序,数组的最后一个元素为最新版本。

Post 的 id 可用于回填并查看某条 Post 的先前版本。

示例:

编辑_历史记录”:<br/> “初始值_Tweet_id”:“1283764123”
“编辑_Tweet_ids”: [“1283764123”,“1394263866”]
}
编辑_控件对象如果存在,表示该 Post 仍可编辑的剩余时间以及剩余编辑次数。Post 仅在创建后的前 30 分钟内可编辑,且最多可编辑五次。

可使用这些 Post 的 id 来回填并查看该 Post 的历史版本。

示例:

“编辑_控件”:<br/> “可编辑的_直至_毫秒(ms)”: 123
“编辑记录_剩余""":3
}
可编辑的布尔如果存在,表示该 Post 在发布时是否符合编辑资格。此字段为非动态字段,即使 Post 达到可编辑时间限制或最大编辑次数,也不会从 True 变为 False’当一条 Post 达到可编辑的时间限制或最大编辑次数时,t 会从 True 切换为 False。以下 Post 功能将导致此字段为 false:

- Post 已被推广
- 帖子含有投票
- Post 为非自我线程的回复
- Post 为转推(注意:引用推文可编辑)
- Post 为 nullcast
- 社区 Post
- Super Follow Post
- 协作 Post
匹配_规则规则对象的数组位于已过滤诸如 X Search 和 PowerTrack 等产品。提供了id标签与匹配该 Post 的规则相关。了解匹配规则的更多信息此处。使用 PowerTrack 时,多个规则可以匹配同一条 Post。

示例:

“匹配_规则”:”[<br/> “标签”:“X API 表情符号”,
“id”: 1050118621198921728,
“id_str”:“1050118621198921728”
}]“
其他 Post 属性
提供 Post 的 X API(例如 GET statuses/lookup 端点)可能包含以下其他 Post 属性:
属性类型描述
current_user_retweetObject视角相关 仅在支持 include_my_retweet 参数且其值为 true 的方法中返回。列出用户对该 Post 的本人转发(如存在)的 Post ID。示例:

“current_user_retweet”: <br/> “id”: 6253282,
“id_str”: “6253282”
}
scopesObject一组键值对,指示该 Post 的预期投放上下文。目前由 X 的推广产品使用。示例:

“scopes”:{“followers”:false}
withheld_copyrightBoolean当存在且为 “true” 时,表示该内容因 DMCA 投诉 被屏蔽。示例:

“withheld_copyright”: true
withheld_in_countriesArray of String当存在时,表示该内容被屏蔽的国家列表,使用大写的双字母国家代码。X 在此字段中支持以下非国家取值:

“XX” - 内容在所有国家被屏蔽;“XY” - 内容因 DMCA 请求被屏蔽。

示例:

“withheld_in_countries”: [“GR”, “HK”, “MY”]
withheld_scopeString当存在时,指示被屏蔽的内容是 “status” 还是 “user”。

示例:

“withheld_scope”: “status”
已弃用的属性
字段类型说明
geoObject已弃用。 可为空。 请改用 coordinates 字段。此已弃用属性的坐标格式为 [lat, long],而所有其他 Post 的地理位置均采用 [long, lat] 格式。

嵌套的 Post 对象

在多种情况下,Post 对象会包含其他嵌套对象。如果你正在处理嵌套对象,那么该 JSON 负载将包含多个 Post 对象,并且每个 Post 对象可能包含其自身的对象。根级对象将包含所采取操作的类型信息,即它是转发(Retweet)还是引用转发(Quote Tweet),并且还可能包含一个描述被分享“原始”Post 的对象。扩展 Post 将包含一个嵌套的扩展对象,其文本长度可超过 140 个字符;这是在 2017 年更新时为避免破坏性变更而采用的方案。以下对每个嵌套对象字典进行说明。 Retweets Retweets 始终包含两个 Post 对象。被转发的“原始”Post 位于名为 “retweeted_status” 的对象中。根级对象封装了转发本身,包括执行转发操作的账号的 User 对象以及转发时间。转发是一种将 Post 分享给你的关注者的操作,不能添加任何新的内容。此外,转发无法提供(新的)位置。即使“原始”Post 可能带有地理标记,转发中的 “geo” 和 “place” 对象也将始终为 null。 即使在引入扩展 Post 之前,根级 “entities” 对象在某些情况下也会因在被转发的 Post 文本前附加字符串 “RT @username ” 而出现截断或不完整的情况。注意,如果一个转发再次被转发,“retweet_status” 仍然会指向原始 Post,这意味着中间的转发不会被包含。使用 x.com “展示”一个转发时也会看到类似的行为。如果你复制分配给该转发“操作”的唯一 Post ID,将会展示原始的 Post。 下面是一个转发的示例结构。再次强调,当解析转发时,关键是解析 “retweeted_status” 对象,以获得完整的(原始)Post 文本和实体元数据。
{
	"tweet": {
		"text": "RT @author original message",
		"user": {
			"screen_name": "Retweeter"
		},
		"retweeted_status": {
			"text": "original message",
			"user": {
				"screen_name": "OriginalTweeter"
			},
			"place": {},
			"entities": {},
			"extended_entities": {}
		}
	},
	"entities": {},
	"extended_entities": {}
}
引用推文
引用推文与转推类似,但它们会包含一条新的 Post 消息。该新消息可以包含其自身的一组话题标签、链接,以及其他“entities”元数据。引用推文还可以包含由发布者共享的位置信息,并可附带 GIF、视频和照片等媒体。 引用推文至少包含两个 Post 对象,有时会有三个。被引用的 Post(其本身也可能是一条引用的 Tweet)位于“quoted_status”对象中。根级对象则封装引用推文本身,其中包含执行分享操作的账户的 User 对象以及引用时间。 请注意,现在可以通过“Post”用户界面为引用推文添加照片、GIF 或视频。若在引用推文的消息中包含外部托管媒体的链接,根级的“entities.urls”将描述这些链接。附加到引用推文的媒体会出现在根级的“extended_entities”元数据中。 在引用推文首次推出时,会在“原始”Post 消息中追加一个缩短链接(t.co URL),并将其呈现在根级的“text”字段中。此外,该 t.co URL 的元数据会包含在根级的“entities.urls”数组中。自 2018 年 5 月起,我们进行了变更:指向被引用 Tweet 的缩短 t.co URL 不再包含在根级的“text”字段中;同时,被引用 Tweet 的相关元数据也不再包含在“entities.urls”元数据中。取而代之的是,被引用 Tweet 的 URL 元数据将位于根级(或顶级)的全新“quoted_status_permalink”对象中,与“quoted_status”对象处于同一层级。 下面是采用该最初格式的引用推文的示例结构。
{
	"created_at": "Tue Feb 14 19:30:06 +0000 2017",
	"id_str": "831586333415976960",
	"text": "绝对值得引用!https:\/\/t.co\/J1LKrbHpWR",
	"user": {
		"screen_name": "happycamper"
	},
	"quoted_status_id_str": "831569219296882688",
	"quoted_status": {
		"created_at": "Tue Feb 14 18:22:06 +0000 2017",
		"id_str": "831569219296882688",
		"text": "这是发推系统的测试 \ud83d\ude0e 用于更新 #supportdocs @twitterboulder 这里:https:\/\/t.co\/NRq9UrSzm0",
		"user": {
			"screen_name": "furiouscamper",
		},
		"place": {
			"id": "9a974dfc8efb32a0",
		},
		"entities": {
			"hashtags": [{
				"text": "supportdocs",
			}],
			"urls": [{
			}],
			"user_mentions": [{	}],
			"symbols": []
		},
	},
	"is_quote_status": true,
	"entities": {},
	"matching_rules": [{}]
}
{
	"created_at": "Fri Jan 04 18:47:16 +0000 2019",
	"id_str": "1081260794069671936",
	"text": "Quote test https://t.co/CE4m1qs3NJ",
	"user": {
		"screen_name": "furiouscamper"
	},
	"place": null,
	"quoted_status_id_str": "1079578364904648705",
	"quoted_status": {
		"created_at": "Mon Dec 31 03:21:54 +0000 2018",
		"id_str": "1079578364904648705",
		"text": "AHHHHH",
		"user": {
			"screen_name": "infinite_scream"
		},
		"place": null,
		"is_quote_status": false,
		"quote_count": 1,
		"reply_count": 0,
		"retweet_count": 3,
		"favorite_count": 6,
		"entities": {
			"hashtags": [],
			"urls": [],
			"user_mentions": [],
			"symbols": []
		}
	},
	"quoted_status_permalink": {
		"url": "https://t.co/CE4m1qs3NJ",
		"expanded": "https://x.com/infinite_scream/status/1079578364904648705",
		"display": "x.com/infinite_screa…"
	},
	"is_quote_status": true,
	"quote_count": 0,
	"reply_count": 0,
	"retweet_count": 0,
	"favorite_count": 1,
	"entities": {}
}
扩展 Post
在 2017 年 11 月推出 280 字符的 Post 时,引入了用于描述“扩展 Post”的 JSON。为在不影响成千上万解析这些基础 X 对象的应用的前提下支持更长消息,Post 的 JSON 被扩展以进行封装。为实现完全的向后兼容,保留了最初的 140 字符“text”字段,以及基于该字段解析出的实体对象。对于超过 140 字符的 Post,根级“text”字段会被截断,因而不完整。由于根级“entities”对象包含从“text”消息中解析出的关键元数据数组(如包含的标签和链接),这些集合也会不完整。举例来说,如果一条 Post 长度为 200 字符,并在末尾包含一个标签,那么旧版根级的“entities.hashtags”数组将不会包含它。 为承载更长的 Post 消息及完整的实体元数据,引入了新的“extended_tweet”字段。当长度超过 140 字符时,“extended_tweet”对象中的“full_text”字段将提供完整、未截断的 Post 文本。“extended_tweet”对象还包含一个“entities”对象,内含完整的标签、链接、提及等数组。 扩展 Post 通过根级的“truncated”布尔值进行标识。当其为 true(“truncated”: true)时,应解析“extended_tweet”中的字段,而不是根级字段。 请注意下方 JSON 示例:尽管该 Post 包含三个标签,根级“text”字段已被截断,根级“entities.hashtags”数组为空。由于这是一个扩展 Post,“truncated”字段被设为 true,而“extended_tweet”对象提供了完整的“full_text”和“entities” Post 元数据。
{
	"created_at": "Thu May 10 17:41:57 +0000 2018",
	"id_str": "994633657141813248",
	"text": "又一条超过 140 字符的扩展 Tweet,作为文档示例生成,展示了 [\"tru… https://t.co/U7Se4NM7Eu",
	"display_text_range": [0, 140],
	"truncated": true,
	"user": {
		"id_str": "944480690",
		"screen_name": "FloodSocial"
	},
	"extended_tweet": {
		"full_text": "又一条超过 140 字符的扩展 Tweet,作为文档示例生成,展示了 [\"truncated\": true] 以及包含完整文本和 \"entities\"\"extended_tweet\" 对象 #documentation #parsingJSON #GeoTagged https://t.co/e9yhQTJSIA",
		"display_text_range": [0, 249],
		"entities": {
			"hashtags": [{
				"text": "documentation",
				"indices": [211, 225]
			}, {
				"text": "parsingJSON",
				"indices": [226, 238]
			}, {
				"text": "GeoTagged",
				"indices": [239, 249]
			}]
		}

	},
	"entities": {
		"hashtags": []
	}
}

原生增强型 User 对象

User 对象包含用于描述所引用 X 用户的 X 用户账户元数据。 

用户数据字典

属性类型说明
idInt64此用户唯一标识符的整数形式。该数值超过 53 位,一些编程语言在解析时可能会遇到问题或出现静默错误。使用有符号 64 位整数来存储此标识符是安全的。使用id_str为安全起见,请获取标识符。参见X ID了解更多信息。示例:

“id”:6253282
id_str(字符串)字符串该用户唯一标识符的字符串形式。实现应使用此值,而非 id 中可能过大、难以处理的整数id. 示例:

“id_字符串(str)”:“6253282”
名称字符串用户自行设定的名称。不一定是个人姓名。通常上限为 50 个字符,但可能会调整。示例:

“名称”:“API”
屏幕_名称字符串该用户用于自我标识的屏幕名称、帐号(handle)或别名。screen_名称具有唯一性,但可能会变更。请使用id_str尽可能使用 id_str 作为用户标识符。通常长度最多为 15 个字符,但某些历史账号的名称可能更长。示例:

“屏幕_名称”:“API”
位置字符串可为 null. 此账户个人资料中用户自定义的位置。未必是实际地点,也未必可由机器解析。Search 服务有时会对该字段进行模糊解析。示例:

“位置”:“美国加利福尼亚州旧金山”
衍生增强对象数组仅限企业版 API 面向用户的派生 Enrichment 元数据集合。提供 Profile Geo Enrichment 元数据。请参阅引用文档了解更多信息,包括 JSON 数据字典。个人资料地理位置增强元数据。请参阅相关文档以了解更多信息,包括 JSON 数据字典。示例:

“派生”:“位置”: [“国家/地区”:“美国”,“国家_代码”:“美国”,“地域”:“丹佛”]
URL字符串可为 null. 与用户个人资料关联的一个 URL。示例:

“URL”:“https://developer.x.com
说明字符串可为 null. 用户自定义的 UTF-8 字符串,用于描述其账号。示例:

“说明”:“真正的 X API”
受保护布尔为 true 时,表示该用户已选择保护其 Post。参见关于公开和受保护的帖子。示例:

“受限”: true
已验证布尔值为 true 时,表示该用户的账号已通过认证。参见认证账号。示例:

“已验证”: false
粉丝_计数Int(整数)此帐号当前的关注者数量。在特定异常情况下,此字段会暂时显示为“0”。示例:

“粉丝_计数”: 21
好友_计数整型此账号正在关注的用户数量(即其“关注数”)。在某些异常情况下,此字段会暂时显示为“0”。示例:

“好友_计数”: 32
已列出_计数Int(整型)此用户所属的公开列表数量。示例:

“已列出_计数”: 9274
收藏夹_计数Int(整数)此用户在其账号整个生命周期中点赞的 Post 数量。出于历史原因,字段名称采用英式拼写。示例:

“收藏夹_计数”: 13
状态(statuses)_计数整数用户发布的 Post 数量(包括转帖)。示例:

“状态信息_计数”: 42
已创建_在字符串用户账户在 X 上创建的 UTC 日期与时间。示例:

“已创建_在”:“2010年11月29日 周一 21:18:15 +0000”
资料_横幅_URL字符串基于 HTTPS 的 URL,指向用户上传的资料横幅的标准网页版本。通过在该 URL 末尾追加路径元素,可获取针对特定显示效果优化的不同图像尺寸。有关尺寸变体,请参阅用户资料图片与横幅

示例:

“个人资料_横幅_URL”:“https://si0.twimg.com/profile_banners/819797/1348102824
个人资料_图像_url_https字符串指向用户个人资料图片的 HTTPS URL。示例:

“个人资料_图像_URL_https”:
https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png
默认_个人资料布尔为 true 时,表示用户尚未更改其个人资料的主题或背景。示例:

“默认值_个人资料”: false
默认值_个人资料_图像布尔为 true 时,表示用户尚未上传个人资料图片,系统将使用默认图片。示例:

“默认值_个人资料_图片”: false

不再支持(已弃用)属性

字段类型描述
utc_offsetnull值将被设为 null。仍可通过 GET account/settings 获取
time_zonenull值将被设为 null。仍可通过 GET account/settings 获取,对应字段为 tzinfo_name
langnull值将被设为 null。仍可通过 GET account/settings 获取,对应字段为 language
geo_enablednull值将被设为 null。仍可通过 GET account/settings 获取。当前用户在使用 POST statuses/update 附加地理数据时,该字段必须为 true
followingnull值将被设为 null。仍可通过 GET friendships/lookup 获取
follow_request_sentnull值将被设为 null。仍可通过 GET friendships/lookup 获取
has_extended_profilenull已弃用。值将被设为 null。
notificationsnull已弃用。值将被设为 null。
profile_locationnull已弃用。值将被设为 null。
contributors_enablednull已弃用。值将被设为 null。
profile_image_urlnull已弃用。值将被设为 null。注意:头像仅可通过 profile_image_url_https 字段获取。
profile_background_colornull已弃用。值将被设为 null。
profile_background_image_urlnull已弃用。值将被设为 null。
profile_background_image_url_httpsnull已弃用。值将被设为 null。
profile_background_tilenull已弃用。值将被设为 null。
profile_link_colornull已弃用。值将被设为 null。
profile_sidebar_border_colornull已弃用。值将被设为 null。
profile_sidebar_fill_colornull已弃用。值将被设为 null。
profile_text_colornull已弃用。值将被设为 null。
profile_use_background_imagenull已弃用。值将被设为 null。
is_translatornull已弃用。值将被设为 null。
is_translation_enablednull已弃用。值将被设为 null。
translator_typenull已弃用。值将被设为 null。

示例用户对象:

"user": {
		"id": 2244994945,
		"id_str": "2244994945",
		"name": "X Dev",
		"screen_name": "XDevelopers",
		"location": "127.0.0.1",
		"url": "https://developer.x.com/en/community",
		"description": "#XDevelopers 团队的官方发声渠道,为您提供 #XAPI 相关的更新、资讯和活动信息。",
		"translator_type": "regular",
		"protected": false,
		"verified": true,
		"followers_count": 512292,
		"friends_count": 2038,
		"listed_count": 1666,
		"favourites_count": 2147,
		"statuses_count": 3634,
		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
		"utc_offset": null,
		"time_zone": null,
		"geo_enabled": true,
		"lang": null,
		"contributors_enabled": false,
		"is_translator": false,
		"profile_background_color": "FFFFFF",
		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_tile": false,
		"profile_link_color": "0084B4",
		"profile_sidebar_border_color": "FFFFFF",
		"profile_sidebar_fill_color": "DDEEF6",
		"profile_text_color": "333333",
		"profile_use_background_image": false,
		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
		"default_profile": false,
		"default_profile_image": false,
		"following": null,
		"follow_request_sent": null,
		"notifications": null
	}

原生增强地理对象

Post 可以与某个位置关联,从而生成带有“地理标签”的 Post。Post 的位置可以通过 X 的用户界面指定,也可以在使用 API 发布 Post 时指定。Post 的位置可以是精确的“点”坐标,或是一个带有“边界框”的 X Place,用于描述从某个场馆到整个区域的更大范围。 有三个“根级”JSON 对象用于描述与 Post 关联的位置:placegeocoordinates 此外,原生增强格式还会在用户对象中包含个人资料地理增强派生位置 当 Post 使用某个 place 进行地理标记时,place 对象始终存在。Places 是具有对应地理坐标的具体、具名地点。用户为其 Post 指定位置时,会看到一组候选的 X Places 列表。使用 API 发帖时,可以在发布时通过指定 place_id 来附加一个 X Place。与 Places 关联的 Posts 不一定发布自该位置,也可能是关于该位置的内容。 仅当 Post 被指定了精确位置时,geo 和 coordinates 对象才会出现(非空)。如果提供了精确位置,coordinates 对象将提供一个 [long, lat] 数组表示地理坐标,并会分配一个与该位置对应的 X Place。

地点数据字典

字段类型描述
idString表示此地点的ID。请注意,它为字符串类型,而非整数。示例:

“id”:“01a9a39529b27f36”
urlString指向该地点附加元数据位置的URL。示例:

“url”:“https://api.x.com/1.1/geo/id/01a9a39529b27f36.json
place_typeString此地点所代表的位置类型。示例:

“place_type”:“city”
nameString该地点名称的简短、可读形式。示例:

“name”:“Manhattan”
full_nameString该地点名称的完整、可读形式。示例:

“full_name”:“Manhattan, NY”
country_codeString表示包含该地点的国家/地区的简写代码。示例:

“country_code”:“US”
countryString包含该地点的国家/地区名称。示例:

“country”:“United States”
bounding_boxObject包含该地点的坐标边界框。示例:


“bounding_box”:
“coordinates”: [
[
[
-74.026675,
40.683935
],
[
-74.026675,
40.877483
],
[
-73.910408,
40.877483
],
[
-73.910408,
40.3935
]
]
],
“type”: “Polygon”

attributesObject在使用 PowerTrack、30-Day 和 Full-Archive Search API 以及 Volume Streams 时,此对象为 null。示例:

“attributes”:

边界框

字段类型说明
coordinatesArray of Array of Array of Float一系列经纬度点,定义一个包围与该边界框关联的 Place 实体的矩形区域。每个点以 [longitude, latitude] 数组表示。每个边界框的点集合构成一个数组。为与多边形表示法兼容,边界框数组外层再包裹一层数组。示例:


“coordinates”: [
[
[
-74.026675,
40.683935
],
[
-74.026675,
40.877483
],
[
-73.910408,
40.877483
],
[
-73.910408,
40.3935
]
]
]
typeStringcoordinates 属性所编码的数据类型。对于边界框,其值为“Polygon”;对于具有精确坐标的 Post,其值为“Point”。示例:

“type”:“Polygon”

Geo 对象数据字典

字段类型说明
coordinatesFloat 集合Post 的位置经纬度,采用 [latitude, longitude] 的集合形式。示例:

**  “geo”:

“type”:** “Point”,

**    “coordinates”: [

54.27784
,

-0.41068

    ]

  **
typeStringcoordinates 属性中编码的数据类型。对于 Post 坐标字段,该值为 “Point”。示例:

“type”: “Point”
Coordinates 对象数据字典
字段类型说明
coordinatesFloat 集合Post 的位置经纬度,采用 [longitude, latitude] 的集合形式。示例:

**  “coordinates”:

“type”:** “Point”,

**    “coordinates”: [

-0.41068
,

54.27784

    ]

  **
typeStringcoordinates 属性中编码的数据类型。对于 Post 坐标字段,该值为 “Point”。示例:

“type”: “Point”

衍生位置

字段类型说明
derivedlocations 对象基于个人资料的地理信息扩展推断出的位置信息

“derived”:

      “locations”: [


**       

“country”:** “United Kingdom”,

“country_code”: “GB”,

“locality”: “Yorkshire”,

“region”: “England”,

“full_name”: “Yorkshire, England, United Kingdom”,

**          “geo”:

            “coordinates”: [

-1.5
,

54

            ],

“type”:** “point”

**         

       

      ]

    **

示例:

{
  "geo": null,
  "coordinates": null,
  "place": {
    "id": "07d9db48bc083000",
    "url": "https://api.x.com/1.1/geo/id/07d9db48bc083000.json",
    "place_type": "poi",
    "name": "McIntosh Lake",
    "full_name": "McIntosh Lake",
    "country_code": "US",
    "country": "美国",
    "bounding_box": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -105.14544,
            40.192138
          ],
          [
            -105.14544,
            40.192138
          ],
          [
            -105.14544,
            40.192138
          ],
          [
            -105.14544,
            40.192138
          ]
        ]
      ]
    },
    "attributes": {

    }
  }
}
{
  "geo": {
    "type": "Point",
    "coordinates": [
      40.74118764,
      -73.9998279
    ]
  },
  "coordinates": {
    "type": "Point",
    "coordinates": [
      -73.9998279,
      40.74118764
    ]
  },
  "place": {
    "id": "01a9a39529b27f36",
    "url": "https://api.x.com/1.1/geo/id/01a9a39529b27f36.json",
    "place_type": "city",
    "name": "Manhattan",
    "full_name": "Manhattan, NY",
    "country_code": "US",
    "country": "United States",
    "bounding_box": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -74.026675,
            40.683935
          ],
          [
            -74.026675,
            40.877483
          ],
          [
            -73.910408,
            40.877483
          ],
          [
            -73.910408,
            40.683935
          ]
        ]
      ]
    },
    "attributes": {

    }
  }
}
数据词典:企业版

X 实体  

跳转至本页 简介 Entities 对象   - Hashtag 对象   - Media 对象   - Media 尺寸对象   - URL 对象   - 用户提及对象   - Symbol 对象   - 投票对象 转发与引用 Tweet 详情 用户对象中的 Entities 私信中的 Entities 下一步

介绍

实体为在 X 上发布的内容提供元数据和额外的上下文信息。entities 部分包含 Post 中常见要素的数组:话题标签、用户提及、链接、股票代码(符号)、X 投票和所附媒体。对于开发者在摄取 Post 时,这些数组非常实用,因为 X 实际上已经对文本主体进行了预处理/预解析。你的解析器无需在 Post 正文中显式搜索这些实体,而是可以直接读取该 JSON 部分即可获取。 除了提供解析便利,entities 部分还提供实用的“增值”元数据。例如,如果你使用了 Enhanced URLs enrichment,URL 元数据会包含完全展开的 URL,以及对应的网站标题和描述。再比如,当存在用户提及时,实体元数据会包含数值型用户 id,这在调用许多 X API 时非常有用。 每个 Post 的 JSON 负载都包含一个 entities 部分,并带有最基本的 hashtagsurlsuser_mentionssymbols 属性,即使这些实体并未出现在该 Post 的消息中也是如此。比如,如果你检查一个正文为“Hello World!”且没有附加媒体的 Post 的 JSON,该 Post 的 JSON 将包含如下内容,其中的实体数组为空(包含零个项):
"entities": {
        "hashtags": [
        ],
        "urls": [
        ],
        "user_mentions": [
        ],
        "symbols": [
        ]
      }
注意:
  • 仅当该类型的内容属于 Post 时,media 和 polls 实体才会出现。
  • 如果你在处理原生媒体(照片、视频或 GIF),建议使用 Extended Entities 对象

实体对象

entitiesextended_entities 部分都由实体对象的数组组成。下面将对每种实体对象进行说明,并提供数据字典,描述对象的属性名称、类型以及简要说明。我们还会指出哪些 PowerTrack 操作符与这些属性匹配,并提供一些示例 JSON 负载。 这是 Posts 中常见实体的集合,包括主题标签、链接和用户提及。entities 对象确实包含 media 属性,但它在 entities 部分中的实现仅对仅含单张照片的 Posts 完全准确。对于包含多张照片、视频或动图 GIF 的所有 Posts,请参阅 extended_entities 部分。

实体 data 字典

entities 对象用于承载其他实体子对象的数组。在说明 entities 的结构后,我们将提供这些子对象的数据字典,以及与之对应的运算符(Operators)。
字段类型说明
标签数组(由…组成)Hashtag 对象表示已从 Post 文本中解析出的主题标签。示例:


“主题标签”: [

“索引”: [
32,
38
],
“文本”:“Node.js”

]
媒体数组,包含媒体对象表示随该 Post 一同上传的媒体元素。示例:


“媒体”: [

“显示_url”:“pic.x.com/5J1WJSRCy9”,
“已展开_URL”:“https://x.com/nolan_test/status/930077847535812610/photo/1”,
“id”: 9.300778475358126e17,
“id_str”:“930077847535812610”,
“索引”: [
13,
36
],
“媒体_URL”:“http://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg”,
“媒体_url_https”:“https://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg
“大小”:
       “缩略图”:
“h”: 150,
               “调整大小”:“裁剪”,
               “w”: 150

          “大”:
          “h”: 1366,
          “调整大小”:“适配”,
          “w”:2048

          “中等”:
          “h”: 800,
          “调整尺寸”:“适合”,
          “w”: 1200

          “小型”:
          “h”: 454,
          “调整尺寸”:“适合”,
          “w”: 680
         

“类型”:“照片”,
“URL”:“https://t.co/5J1WJSRCy9”,

]
URL数组(由…组成)URL 对象表示包含在 Post 文本中的 URL。

示例(未启用 Enhanced URLs 增强功能):


“URL”: [

“索引”: [
32,
52
],
“URL”:“http://t.co/IOwBrTZR”,
“显示_URL”:“youtube.com/watch?v=oHg5SJ…”,
“已展开_URL”:“http://www.youtube.com/watch?v=oHg5SJYRHA0

]


示例(已启用 Enhanced URLs 富化):

“URL”: [

“URL”:“https://t.co/D0n7a53c2l”,
“已展开_URL”:“http://bit.ly/18gECvy”,
“显示_url”:“bit.ly/18gECvy”,
“展开”:
“URL”:“https://www.youtube.com/watch?v=oHg5SJYRHA0”,
“状态”: 200,
“标题”:“瑞克摇滚(Rickroll)‘D”,
“说明”:“http://www.facebook.com/rickroll548只要喷子还在作妖,瑞克就会一直“滚”个不停。”

“索引”: [
62,
85
]

]
用户_提及数组(包含)用户提及对象表示在 Post 文本中被提及的其他 X 用户。示例:


“用户_提及”: [

“名称”:“X API”,
“索引”: [
4,
15
],
“屏幕_名称”:“xapi”,
“id”: 6253282,
“id_字符串(str)”:“6253282”

]
符号由以下组成的数组Symbol 对象表示包含在 Post 文本中的符号(例如 $cashtags)。示例:


“符号”: [

“索引”: [
12,
17
],
“文本”:“twtr”

]
投票调查数组(包含)投票对象(Poll Objects)表示 Post 中包含的 X 投票。示例:

“投票”: [

“选项”: [

“位置”: 1,
“文本”:“我看过一次文档。”


“位置”: 2,
“文本”:“我把文档读了两遍。”
},

“位置”: 3,
“文本”:“我反复阅读文档。”
}
],
“结束_日期时间”:“2017年5月25日 周四 22:20:27 +0000”,
“时长_分钟”: 60

]

Hashtag 对象  

entities 部分包含一个 hashtags 数组,其中每个对象对应 Post 正文中包含的一个 hashtag;如果没有 hashtag,则该数组为空。 PowerTrack # 运算符用于匹配 text 属性。has:hashtags 运算符在数组中至少有一项时匹配。
字段类型说明
indicesArray of Int一个整数数组,表示该 hashtag 在 Post 文本中的起始与结束偏移。第一个整数表示 Post 文本字符串中“#”字符的位置,第二个整数表示该 hashtag 之后第一个字符的位置。因此,这两个数字的差值等于 hashtag 名称的长度再加 1(用于“#”字符)。示例:

“indices”:[32,38]
textStringhashtag 的名称,不包含开头的“#”字符。示例:

“text”:“nodejs”

媒体对象  

如果有任何媒体对象“附加”到 Post,则 entities 部分将包含一个 media 数组,其中包含单个媒体对象。若未附加原生媒体,则 entities 中不会包含 media 数组。基于以下原因,处理 Post 的原生媒体应使用 extended_entities 部分:
  • 即使附加的是视频或 GIF,媒体 type 也始终标记为“photo”。
  • 即便最多可附加四张照片,entities 部分中也只会列出第一张。
当该数组有内容时,has:media 运算符将匹配。
字段类型说明
显示_url字符串要向客户端展示的媒体 URL。示例:

“显示_URL”:“pic.x.com/rJC5Pxsu”
扩展_url字符串扩展版的 display_url。指向媒体展示页的链接。示例:

“已展开_url”:“http://x.com/yunorno/status/114080493036773378/photo/1
idInt64媒体的 ID,使用 64 位整数表示。示例:

“id”:114080493040967680
id_str字符串媒体的 ID(字符串)。示例:

“id_字符串”:“114080493040967680”
索引Int 数组一个整数数组,表示 URL 在 Post 文本中开始与结束的偏移位置。第一个整数表示 URL 在 Post 文本中首个字符的位置。第二个整数表示 URL 之后出现的首个非 URL 字符的位置(如果 URL 位于 Post 文本末尾,则为字符串的结尾)。示例:

“索引”:[15,35]
媒体_url字符串指向已上传媒体文件的 http:// URL。示例:

“媒体_url”:“http://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg

对于私信中的媒体,media_url与…相同的 HTTPS URLmedia_url_https并且必须使用 OAuth 1.0A,使用用户的访问令牌对请求进行签名后方可访问。

无法通过已登录的 x.com 会话访问图片。请访问该页面以了解如何应对这些最新变更。

无法将这些图像直接嵌入网页。

请参阅照片媒体 URL 格式关于照片格式要求’的 URL,例如media_url_https,基于现有的sizes.
媒体_URL_https字符串一个直接指向已上传媒体文件的 https:// URL,可用于在 https 页面中嵌入。示例:

“媒体_URL_https”:“https://p.twimg.com/AZVLmp-CIAAbkyy.jpg

对于私信中的媒体:media_url_https必须使用 OAuth 1.0A,使用用户的访问令牌对请求进行签名后方可访问。

无法通过已登录的 x.com 会话访问图片。请访问本页面以了解如何处理这些最新更改。

无法将这些图片直接嵌入网页。

请参阅照片媒体 URL 格式有关如何设置照片格式’的 URL,例如media_url_https,基于现有的sizes
尺寸Size 对象一个对象,用于展示该媒体文件可用的尺寸。示例:


“大小”:
“缩略图”:
“h”: 150,
“调整大小”:“裁剪”,
“w”:150
},
“大型”:
“h”: 1366,
“调整尺寸”:“适合”,
“w”:2048
},
“中等”:
“h”: 800,
“调整大小”:“适合”,
“w”: 1200
},
“小型”:
“h”: 454,
“调整大小”:“适合”,
“w”:680
}
}
}

请参阅照片媒体 URL 格式关于如何格式化照片’例如图片的 URL,例如media_url_https,基于现有的sizes
来源_状态_idInt64可为空。对于包含最初与其他 Post 关联的媒体的 Post,此 ID 指向该媒体所属的原始 Post。示例:

“来源_状态_id”: 205282515685081088
源_状态_id_strInt64可为空。对于包含最初与其他 Post 关联媒体的 Post,此字符串类型的 ID 指向原始 Post。示例:

“来源_状态_id_str”:“205282515685081088”
类型字符串上传的媒体类型。可能的类型包括 photo、video 和 animated_GIF。示例:

“类型”:“照片”
url字符串媒体链接的封装 URL。它与直接嵌入原始 Post 文本中的 URL 相对应,并用于确定 indices 参数的取值。indices参数。示例:

“URL”:“http://t.co/rJC5Pxsu

媒体尺寸对象

所有包含原生媒体(照片、视频和 GIF)的 Post 都会包含一组“thumb”“small”“medium”“large”尺寸,以及对应的像素高度和宽度。对于照片和预览图媒体 URL,照片媒体 URL 格式 说明了如何构造不同的 URL 来加载不同尺寸的照片媒体。

Sizes 对象 

字段类型描述
thumbSize Object缩略图尺寸的媒体版本信息。示例:

“thumb”:“h”:150, “resize”:“crop”, “w”:150}

缩略图尺寸的照片媒体将在 150x150 边界内进行填充(fill)并裁剪。
largeSize Object大尺寸的媒体版本信息。示例:

“large”:“h”:454, “resize”:“fit”, “w”:680}

小尺寸的照片媒体将被限制为在 680x680 边界内适配(fit)。
mediumSize Object中等尺寸的媒体版本信息。示例:

“medium”:“h”:800, “resize”:“fit”, “w”:1200}

中等尺寸的照片媒体将被限制为在 1200x1200 边界内适配(fit)。
smallSize Object小尺寸的媒体版本信息。示例:

“small”:“h”:1366, “resize”:“fit”, “w”:2048}

大尺寸的照片媒体将被限制为在 2048x2048 边界内适配(fit)。

尺寸对象 

字段类型说明
wInt此尺寸的宽度(像素)。示例:

“w”:150
hInt此尺寸的高度(像素)。示例:

“h”:150
resizeString获取此尺寸时采用的调整方式。值为_fit_表示在保持媒体原始纵横比的情况下适配某一维度;值为_crop_表示将媒体裁剪以适配特定分辨率。示例:

“resize”:“crop”

照片媒体 URL 格式

X 上的照片媒体可按不同尺寸加载。建议加载在满足特定图像视口需求的前提下体积尽可能小的图片。要加载不同尺寸,需要按特定格式将 Size Objectmedia_url(或 media_url_https)组合使用。我们将使用前文提供的 media entity 示例对象来演示如何构建照片媒体 URL。 单独请求 media_urlmedia_url_https 时,默认会加载中等(medium)变体。但在条件允许时,建议提供完整格式化的照片媒体 URL。 照片媒体 URL 由三部分组成:
Base URLBase URL 指去掉文件扩展名的媒体 URL。

例如:

“media_url_https”: “https://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg”,

则 Base URL 为:

https://pbs.twimg.com/media/DOhM30VVwAEpIHq
FormatFormat 指图像的文件格式。可用格式为 jpgpng,与媒体 URL 的扩展名一致。

例如:

“media_url_https”: “https://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg”,

则格式为:jpg
NameName 指要加载的尺寸字段名。

例如:


 “sizes”:
   “thumb”:
     “h”: 150,
     “resize”: “crop”,
     “w”: 150
   ,
   “large”:
     “h”: 1366,
     “resize”: “fit”,
     “w”: 2048
   },
   “medium”:
     “h”: 800,
     “resize”: “fit”,
     “w”: 1200
   },
   “small”:
     “h”: 454,
     “resize”: “fit”,
     “w”: 680
   }
 }
}

加载大尺寸照片时,名称为:large
将这三部分(Base URL、Format 和 Name)组合即可得到要加载的照片媒体 URL。以这种方式加载图像有两种格式:legacymodern。应停止使用 legacy 格式,改用 modern 格式。使用 modern 格式可提高调用方的 CDN 命中率,从而降低因需在数据中心生成并加载媒体而带来的加载时延。
Legacy format旧版格式已弃用。所有照片媒体的加载都应迁移到现代格式。

<base_url>.<format>:<name>

例如:

https://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg:large
Modern format在 X,加载照片的现代格式于 2015 年确立,并自 2017 年起成为事实标准。所有照片媒体的加载应迁移到此格式。

<base_url>?format=<format>&name=<name>

例如:

https://pbs.twimg.com/media/DOhM30VVwAEpIHq?format=jpg&amp;name=large


注意:照片媒体 URL 的查询字符串项按字母顺序排列。若媒体加载需添加任何新的查询项,仍需保持按字母顺序排列。例如,若有一个假设的新查询项称为 preferred_format,它应在查询字符串中排在 formatname 之后。

URL 对象 

entities 部分包含一个 urls 数组,其中每个元素对应 Post 正文中的一个链接;如果没有链接,则该数组为空。 当数组中至少有一项时,has:links 运算符会匹配。url: 运算符用于匹配 expanded_url 属性。如果你使用 Expanded URL enrichmenturl: 运算符将匹配 unwound.url(完全展开的 URL)属性。如果你使用 Enhanced URL enrichment,则使用 url_title:url_decription: 运算符分别匹配 unwound.titleunwound.description 属性。
字段类型描述
display_urlString粘贴/输入到 Post 中的 URL。示例:

“display_url”:“bit.ly/2so49n2”
expanded_urlStringdisplay_url 的展开版本。示例:

“expanded_url”:“http://bit.ly/2so49n2
indicesArray of Int整数数组,表示 URL 在 Post 文本中的起止偏移。第一个整数是 URL 在 Post 文本中首字符的位置;第二个整数是 URL 结束后第一个非 URL 字符的位置。示例:

“indices”:[30,53]
urlString封装后的 URL,对应直接嵌入原始 Post 文本的值,以及 indices 参数的取值。示例:

“url”:“https://t.co/yzocNFvJuL
如果你使用 Expanded 和/或 Enhanced URL 丰富数据,以下元数据可在 unwound 属性下获得:
字段类型描述
urlStringPost 中链接的完全展开版本。示例:

“url”:“https://blog.x.com/en&#95;us/topics/insights/2016/using-twitter-as-a-go-to-communication-channel-during-severe-weather-events.html
statusInt展开过程的最终 HTTP 状态码,200 表示成功。示例:

200
titleString链接的 HTML 标题。示例:

“title”:“Using X as a ‘go-to’ communication channel during severe weather”
descriptionString链接的 HTML 描述。示例:

“description”:“Using X as a ‘go-to’ communication channel during severe weather”

用户提及对象  

entities 部分包含一个 user_mentions 数组,Post 正文中每出现一次用户提及就对应一个对象;如果没有用户提及,则该数组为空。 PowerTrack @ 运算符用于匹配 screen_name 属性。has:mentions 运算符在数组中至少有一项时匹配。
字段类型说明
idInt64被提及用户的 ID,整数。示例:

“id”:6253282
id_strString被提及用户的 id,字符串。示例:

“id_str”:“6253282”
indicesArray of Int整数数组,表示该用户引用在 Post 文本中的起止偏移。第一个整数为该用户提及中“@”字符的位置;第二个整数为该用户提及后首个非 screen_name 字符的位置。示例:

“indices”:[4,15]
nameString被引用用户的显示名称。示例:

“name”:“API”
screen_nameString被引用用户的用户名(screen_name)。示例:

“screen_name”:“api”

符号对象  

entities 部分将包含一个 symbols 数组,其中每个出现在 Post 正文中的 $cashtag 都对应一个对象;如果没有符号,则为一个空数组。 PowerTrack 的 $ 运算符用于匹配 text 属性。has:symbols 运算符在数组中至少存在一项时匹配。
字段类型说明
indicesInt 数组一个整数数组,表示该符号/cashtag 在 Post 文本中的起止偏移。第一个整数表示 Post 文本字符串中 字符的位置。第二个整数表示cashtag之后的第一个字符的位置。因此,两数之差等于cashtag名称长度加一(包含“ 字符的位置。第二个整数表示 cashtag 之后的第一个字符的位置。因此,两数之差等于 cashtag 名称长度加一(包含 “” 字符)。示例:

“indices”:[12,17]
text字符串cashtag 的名称,不包含前导 “$” 字符。示例:

“text”:“twtr”

Poll 对象

如果 Post 包含投票,entities 部分将包含一个 polls 数组,其中包含单个 poll 对象。如果不包含投票,则 entities 部分中不会有 polls 数组。 请注意,这些投票元数据仅在以下企业版 API 中可用:
字段类型描述
optionsArray of Option Object选项数组,每个选项包含投票位置及该位置的文本。示例:

“options”: [

“position”: 1,
“text”: “I read documentation once.”
}
]
}
end_datetimeString投票结束时间的时间戳 (UTC)。示例:

“end_datetime”: “Thu May 25 22:20:27 +0000 2017”
duration_minutesString投票持续时长(分钟)。示例:

“duration_minutes”: 60

转发与引用 Tweet 详情

从 X API 的角度来看,转发与引用 Tweet 是包含原始 Post 的特殊类型 Post(以嵌入对象形式)。因此,转发与引用 Tweet 对象作为“原始”Post 的父级对象(从而对象体量加倍)。转发包含顶层的 “retweeted_status” 对象,而引用 Tweet 包含 “quoted_status” 对象。为保持一致性,这些顶层的转发与引用 Tweet 对象也有 text 属性和对应的 entities。然而,顶层的 entities 可能与嵌入的“原始”entities 不同。对于转发,新文本会添加在原始 Post 正文之前;对于引用的 Post,新文本会附加在 Post 正文之后。 一般的最佳实践是:在存在 retweeted_status 时,从其中的原始 Post 获取文本、entities、原作者和日期。例外是在需要获取属于附加引用部分的 X 实体时。详见下文以获取更多细节与提示。

转发

转发的一个重要细节是无法向 Post 添加额外的 X 实体。用户在转发时无法添加话题标签、URL 或其他详细信息。但是,转发的(顶层)文本属性由原始 Post 文本加上前缀 “RT @username: ” 组成。 在某些情况下,特别是对于用户名较长的账户,这些新增字符与原始 Post 正文的组合很容易超过原始 Post 文本长度限制的 140 个字符。为了保持对基于 140 个字符的显示和存储的支持,顶层正文会截断 Post 正文的末尾并添加省略号(”…”)。因此,位于原始 Post 末尾的某些顶层实体可能不正确或缺失,例如话题标签或 URL 条目被截断的情况。 这条 Post,https://x.com/FloodSocial/status/907974220298125312,包含以下 Post 文本: Just another test Post that needs to be exactly 140 characters with trailing URL and hashtag http://wapo.st/2w8iwPQ #Testing 在上面的示例中,URL 和话题标签都受到了影响。由于话题标签被完全截断,URL 被部分截断,这些内容在顶层实体中缺失。您还会注意到文本字段中 “RT @floodsocial: ” 前缀产生的额外 user_mentions 顶层实体。 但是,retweeted_status 中的 Post 文本和实体完美地反映了原始 Post,没有截断或不正确的实体,因此我们建议在处理转发时依赖嵌套的 retweeted_status 对象。

引用 Post

引用 Post 于 2016 年推出,与转发不同的是,当你”引用”一条 Post 时,你是在被分享 Post 的”上方”添加新内容。这些新内容几乎可以包含原始 Post 所能包含的任何内容,包括新文本、话题标签、提及和 URL。 引用 Post 可以包含原生媒体(照片、视频和 GIF),并将出现在 entities 对象下。 由于可以添加 X 实体,引用的实体可能与原始实体不同。 在此示例中,新的 URL 和话题标签被放置在引用 Post 的末尾。 此 Post https://x.com/FloodSocial/status/907983973225160704 具有以下 Post 文本: strange and equally tragic when islands flood… trans-atlantic testing of quote tweets | @thisuser @thatuserhttp://bit.ly/2vMMDuu #testing 在这种情况下,顶层实体不会反映引用的详细信息。 然而,extended_tweet 中的 Post 文本和实体完美地反映了引用 Post,没有截断或错误的实体,因此我们建议在处理引用 Post 时依赖嵌套的 _extended_tweet _ 对象。

用户对象的实体

用户对象的实体用于描述出现在用户自定义的个人资料 URL 和简介字段中的 URL。它们不用于描述 hashtag 或 user_mention。与 Post 实体不同,用户实体可应用于其父对象内的多个字段——为消除歧义,你会看到名为 url 和 description 的父节点,用于指示哪个字段包含实体化的 URL。 在此示例中,用户的 url 字段包含一个 t.co 链接,并在响应的 entities/url/urls[0] 节点中被完整展开。该用户的简介中没有被包装的 URL。

JSON 示例

{
  "id": 6253282,
  "id_str": "6253282",
  "name": "X API",
  "screen_name": "xapi",
  "location": "加利福尼亚州旧金山",
  "description": "官方 X API 账号。我会发布 API 更新、服务状态相关内容,并解答关于 X 和我们 API 的问题。未获回复?请访问我的网站。",
  "url": "http:\/\/t.co\/78pYTvWfJd",
  "entities": {
    "url": {
      "urls": [
        {
          "url": "http:\/\/t.co\/78pYTvWfJd",
          "expanded_url": "http:\/\/dev.x.com",
          "display_url": "dev.x.com",
          "indices": [
            0,
            22
          ]
        }
      ]
    },
    "description": {
      "urls": [

      ]
    }
  }
}

X 扩展实体 

跳转到本页 简介 Extended Entities 对象 示例 Tweet 与 JSON 负载   - 包含四张原生照片的 Tweet   - 包含原生视频的 Tweet   - 包含动画 GIF 的 Tweet 后续步骤

介绍

如果某个 Post 包含原生媒体(通过 Post 的用户界面直接附加,而非外部链接),则还会出现一个 extended_entities 部分。对于任何原生媒体(照片、视频或 GIF),出于多种原因,extended_entities 是首选的元数据来源。目前,一个 Post 最多可附加四张照片。entities 元数据只包含第一张照片(在 2014 年之前仅支持一张照片),而 extended_entities 部分会包含所有已附加的照片。对于原生媒体,entities.media 元数据的另一个不足在于其媒体类型始终显示为“photo”,即使附加的是视频或动画 GIF。媒体的实际类型在 extended_entities.media[].type 属性中指定,取值为 photovideoanimated_gif。基于以上原因,如果你处理的是原生媒体,extended_entities 元数据是首选。 所有附加了照片、视频或动画 GIF 的 Posts 都会包含一个 extended_entities JSON 对象。extended_entities 对象包含单个 media 数组,数组元素为 media 对象(其数据字典参见 entities 部分)。extended_entities 部分不包含其他实体类型,例如话题标签和链接。extended_entities 部分中的 media 对象在结构上与 entities 部分中的完全相同。 Posts 只能附加一种类型的媒体。对于照片,最多可附加四张;对于视频和 GIF,只能附加一个。由于 extended_entities 部分中的媒体 type 元数据能够正确指示媒体类型(“photo”“video”“animated_gif”),并且支持最多 4 张照片,因此它是原生媒体的首选元数据来源。
{
      "extended_entities": {
        "media": [

        ]
      }
    }

示例 Post 与 JSON 载荷

以下是一些示例 Post 及其关联的实体元数据。 包含四张原生照片的 Post 包含话题标签、提及用户、股票标记(cashtag)、URL 和四张原生照片的 Post:
以下是该 Post 的 entities 部分:
{
      "entities": {
        "hashtags": [
          {
            "text": "hashtag",
            "indices": [
              59,
              67
            ]
          }
        ],
        "urls": [
          {
            "url": "https://t.co/RzmrQ6wAzD",
            "expanded_url": "http://bit.ly/2pUk4be",
            "display_url": "bit.ly/2pUk4be",
            "unwound": {
              "url": "https://blog.gnip.com/tweeting-in-the-rain/",
              "status": 200,
              "title": "Tweeting in the Rain, Part 1 - Gnip Blog - Social Data and Data Science Blog",
              "description": "If you would have told me a few years ago that one day I'd be comparing precipitation and social media time-series data, I would have assumed you were joking.  For 13 years at OneRain I helped develop software and monitoring … Continue reading →"
            },
            "indices": [
              35,
              58
            ]
          }
        ],
        "user_mentions": [
          {
            "screen_name": "MentionThis",
            "name": "Just Me",
            "id": 50247739,
            "id_str": "50247739",
            "indices": [
              16,
              28
            ]
          }
        ],
        "symbols": [
          {
            "text": "twtr",
            "indices": [
              29,
              34
            ]
          }
        ],
        "media": [
          {
            "id": 861627472244162561,
            "id_str": "861627472244162561",
            "indices": [
              68,
              91
            ],
            "media_url": "http://pbs.twimg.com/media/C_UdnvPUwAE3Dnn.jpg",
            "media_url_https": "https://pbs.twimg.com/media/C_UdnvPUwAE3Dnn.jpg",
            "url": "https://t.co/9r69akA484",
            "display_url": "pic.x.com/9r69akA484",
            "expanded_url": "https://x.com/FloodSocial/status/861627479294746624/photo/1",
            "type": "photo",
            "sizes": {
              "medium": {
                "w": 1200,
                "h": 900,
                "resize": "fit"
              },
              "small": {
                "w": 680,
                "h": 510,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "large": {
                "w": 2048,
                "h": 1536,
                "resize": "fit"
              }
            }
          }
        ]
      }
    }
只有在下面这个“extended”负载中,你才能看到最多四张原生照片。请注意,数组中的第一张照片与非扩展的 X entities 部分中所含的那张单张照片相同。照片的 media 元数据结构在 entitiesextended_entities 两个部分中相同。 以下是此 Post 的 extended_entities 部分:
{
    "extended_entities": {
        "media": [
          {
            "id": 861627472244162561,
            "id_str": "861627472244162561",
            "indices": [
              68,
              91
            ],
            "media_url": "http://pbs.twimg.com/media/C_UdnvPUwAE3Dnn.jpg",
            "media_url_https": "https://pbs.twimg.com/media/C_UdnvPUwAE3Dnn.jpg",
            "url": "https://t.co/9r69akA484",
            "display_url": "pic.x.com/9r69akA484",
            "expanded_url": "https://x.com/FloodSocial/status/861627479294746624/photo/1",
            "type": "photo",
            "sizes": {
              "medium": {
                "w": 1200,
                "h": 900,
                "resize": "fit"
              },
              "small": {
                "w": 680,
                "h": 510,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "large": {
                "w": 2048,
                "h": 1536,
                "resize": "fit"
              }
            }
          },
          {
            "id": 861627472244203520,
            "id_str": "861627472244203520",
            "indices": [
              68,
              91
            ],
            "media_url": "http://pbs.twimg.com/media/C_UdnvPVYAAZbEs.jpg",
            "media_url_https": "https://pbs.twimg.com/media/C_UdnvPVYAAZbEs.jpg",
            "url": "https://t.co/9r69akA484",
            "display_url": "pic.x.com/9r69akA484",
            "expanded_url": "https://x.com/FloodSocial/status/861627479294746624/photo/1",
            "type": "photo",
            "sizes": {
              "small": {
                "w": 680,
                "h": 680,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "medium": {
                "w": 1200,
                "h": 1200,
                "resize": "fit"
              },
              "large": {
                "w": 2048,
                "h": 2048,
                "resize": "fit"
              }
            }
          },
          {
            "id": 861627474144149504,
            "id_str": "861627474144149504",
            "indices": [
              68,
              91
            ],
            "media_url": "http://pbs.twimg.com/media/C_Udn2UUQAADZIS.jpg",
            "media_url_https": "https://pbs.twimg.com/media/C_Udn2UUQAADZIS.jpg",
            "url": "https://t.co/9r69akA484",
            "display_url": "pic.x.com/9r69akA484",
            "expanded_url": "https://x.com/FloodSocial/status/861627479294746624/photo/1",
            "type": "photo",
            "sizes": {
              "medium": {
                "w": 1200,
                "h": 900,
                "resize": "fit"
              },
              "small": {
                "w": 680,
                "h": 510,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "large": {
                "w": 2048,
                "h": 1536,
                "resize": "fit"
              }
            }
          },
          {
            "id": 861627474760708096,
            "id_str": "861627474760708096",
            "indices": [
              68,
              91
            ],
            "media_url": "http://pbs.twimg.com/media/C_Udn4nUMAAgcIa.jpg",
            "media_url_https": "https://pbs.twimg.com/media/C_Udn4nUMAAgcIa.jpg",
            "url": "https://t.co/9r69akA484",
            "display_url": "pic.x.com/9r69akA484",
            "expanded_url": "https://x.com/FloodSocial/status/861627479294746624/photo/1",
            "type": "photo",
            "sizes": {
              "small": {
                "w": 680,
                "h": 680,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "medium": {
                "w": 1200,
                "h": 1200,
                "resize": "fit"
              },
              "large": {
                "w": 2048,
                "h": 2048,
                "resize": "fit"
              }
            }
          }
        ]
      }
    }

含原生视频的 Post

以下是该 Post 的扩展实体元数据(包含视频):
{
      "extended_entities": {
        "media": [
          {
            "id": 869317980307415040,
            "id_str": "869317980307415040",
            "indices": [
              31,
              54
            ],
            "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/869317980307415040/pu/img/t_E6wyADk_PvxuzF.jpg",
            "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/869317980307415040/pu/img/t_E6wyADk_PvxuzF.jpg",
            "url": "https://t.co/TLSTTOvvmP",
            "display_url": "pic.x.com/TLSTTOvvmP",
            "expanded_url": "https://x.com/FloodSocial/status/869318041078820864/video/1",
            "type": "video",
            "sizes": {
              "small": {
                "w": 340,
                "h": 604,
                "resize": "fit"
              },
              "large": {
                "w": 720,
                "h": 1280,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "medium": {
                "w": 600,
                "h": 1067,
                "resize": "fit"
              }
            },
            "video_info": {
              "aspect_ratio": [
                9,
                16
              ],
              "duration_millis": 10704,
              "variants": [
                {
                  "bitrate": 320000,
                  "content_type": "video/mp4",
                  "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/vid/180x320/FMei8yCw7yc_Z7e-.mp4"
                },
                {
                  "bitrate": 2176000,
                  "content_type": "video/mp4",
                  "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/vid/720x1280/octt5pFbISkef8RB.mp4"
                },
                {
                  "bitrate": 832000,
                  "content_type": "video/mp4",
                  "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/vid/360x640/2OmqK74SQ9jNX8mZ.mp4"
                },
                {
                  "content_type": "application/x-mpegURL",
                  "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/pl/wcJQJ2nxiFU4ZZng.m3u8"
                }
              ]
            }
          }
        ]
      }
    }
当广告主选择将视频播放限制为仅在 X 自有并运营的平台上播放时,video_info 对象将被 additional_media_info 对象替换。 additional_media_info 将包含发布者提供的附加媒体信息,例如 titledescriptionembeddable flag。当 embeddable=false 时,视频内容仅对 X 官方客户端可用。在这种情况下,负载中提供的所有视频 URL 都将以 X 为基础,用户可通过点击链接在 X 自有产品/服务中打开该视频。 以下是在这种情况下扩展实体对象的示例:
{
      "extended_entities": {
        "media": [
          {
            "id": 924685332347469824,
            "id_str": "924685332347469824",
            "indices": [
              49,
              72
            ],
            "media_url": "http://pbs.twimg.com/media/DNUkdLMVwAEzj8K.jpg",
            "media_url_https": "https://pbs.twimg.com/media/DNUkdLMVwAEzj8K.jpg",
            "url": "https://t.co/90xOJqKMox",
            "display_url": "pic.x.com/90xOJqKMox",
            "expanded_url": "https://x.com/nyjets/status/924685391524798464/video/1",
            "type": "photo",
            "sizes": {
              "small": {
                "w": 680,
                "h": 383,
                "resize": "fit"
              },
              "medium": {
                "w": 1200,
                "h": 675,
                "resize": "fit"
              },
              "large": {
                "w": 1280,
                "h": 720,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              }
            },
            "additional_media_info": {
              "title": "#ATLvsNYJ: Tomlinson TD from McCown",
              "description": "NFL",
              "embeddable": false,
              "monetizable": true
            }
          }
        ]
      }
    }
如上所述,下面是 entities 部分,其中 type 被错误地设置为 “photo”。同样,对于所有原生媒体类型(包括 “video” 和 “animated_gif”),应优先使用 extended_entities 部分。
    {
    "entities": {
        "hashtags": [

        ],
        "urls": [

        ],
        "user_mentions": [

        ],
        "symbols": [

        ],
        "media": [
          {
            "id": 869317980307415040,
            "id_str": "869317980307415040",
            "indices": [
              31,
              54
            ],
            "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/869317980307415040/pu/img/t_E6wyADk_PvxuzF.jpg",
            "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/869317980307415040/pu/img/t_E6wyADk_PvxuzF.jpg",
            "url": "https://t.co/TLSTTOvvmP",
            "display_url": "pic.x.com/TLSTTOvvmP",
            "expanded_url": "https://x.com/FloodSocial/status/869318041078820864/video/1",
            "type": "photo",
            "sizes": {
              "small": {
                "w": 340,
                "h": 604,
                "resize": "fit"
              },
              "large": {
                "w": 720,
                "h": 1280,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "medium": {
                "w": 600,
                "h": 1067,
                "resize": "fit"
              }
            }
          }
        ]
      }

    }

含动画 GIF 的 Post

下面是该含动画 GIF 的 Post 的扩展实体元数据:
{
      "extended_entities": {
        "media": [
          {
            "id": 870042654213459968,
            "id_str": "870042654213459968",
            "indices": [
              29,
              52
            ],
            "media_url": "http://pbs.twimg.com/tweet_video_thumb/DBMDLy_U0AAqUWP.jpg",
            "media_url_https": "https://pbs.twimg.com/tweet_video_thumb/DBMDLy_U0AAqUWP.jpg",
            "url": "https://t.co/nD6G4bWSKb",
            "display_url": "pic.x.com/nD6G4bWSKb",
            "expanded_url": "https://x.com/FloodSocial/status/870042717589340160/photo/1",
            "type": "animated_gif",
            "sizes": {
              "medium": {
                "w": 350,
                "h": 262,
                "resize": "fit"
              },
              "small": {
                "w": 340,
                "h": 255,
                "resize": "fit"
              },
              "thumb": {
                "w": 150,
                "h": 150,
                "resize": "crop"
              },
              "large": {
                "w": 350,
                "h": 262,
                "resize": "fit"
              }
            },
            "video_info": {
              "aspect_ratio": [
                175,
                131
              ],
              "variants": [
                {
                  "bitrate": 0,
                  "content_type": "video/mp4",
                  "url": "https://video.twimg.com/tweet_video/DBMDLy_U0AAqUWP.mp4"
                }
              ]
            }
          }
        ]
      }
    }

原生增强型示例有效负载

Post

{
	"created_at": "Fri Sep 18 18:36:15 +0000 2020",
	"id": 1307025659294675000,
	"id_str": "1307025659294674945",
	"text": "这篇文章重点介绍了新 Tweet payload v2 的更新内容 https://t.co/oeF3ZHeKQQ",
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
	"truncated": false,
	"in_reply_to_status_id": 1304102743196356600,
	"in_reply_to_status_id_str": "1304102743196356610",
	"in_reply_to_user_id": 2244994945,
	"in_reply_to_user_id_str": "2244994945",
	"in_reply_to_screen_name": "XDevelopers",
	"user": {
		"id": 2244994945,
		"id_str": "2244994945",
		"name": "X Dev",
		"screen_name": "XDevelopers",
		"location": "127.0.0.1",
		"url": "https://developer.x.com/en/community",
		"description": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
		"translator_type": "regular",
		"protected": false,
		"verified": true,
		"followers_count": 512292,
		"friends_count": 2038,
		"listed_count": 1666,
		"favourites_count": 2147,
		"statuses_count": 3634,
		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
		"utc_offset": null,
		"time_zone": null,
		"geo_enabled": true,
		"lang": null,
		"contributors_enabled": false,
		"is_translator": false,
		"profile_background_color": "FFFFFF",
		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_tile": false,
		"profile_link_color": "0084B4",
		"profile_sidebar_border_color": "FFFFFF",
		"profile_sidebar_fill_color": "DDEEF6",
		"profile_text_color": "333333",
		"profile_use_background_image": false,
		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
		"default_profile": false,
		"default_profile_image": false,
		"following": null,
		"follow_request_sent": null,
		"notifications": null
	},
	"geo": null,
	"coordinates": null,
	"place": null,
	"contributors": null,
	"is_quote_status": false,
	"quote_count": 1,
	"reply_count": 2,
	"retweet_count": 11,
	"favorite_count": 70,
	"entities": {
		"hashtags": [],
		"urls": [{
			"url": "https://t.co/oeF3ZHeKQQ",
			"expanded_url": "https://dev.to/twitterdev/understanding-the-new-tweet-payload-in-the-twitter-api-v2-1fg5",
			"display_url": "dev.to/twitterdev/und…",
			"unwound": {
				"url": "https://dev.to/twitterdev/understanding-the-new-tweet-payload-in-the-twitter-api-v2-1fg5",
				"status": 200,
				"title": "了解 X API v2 中的新 Tweet payload",
				"description": "X 最近发布了全新的 X API v2,从零重构以提供新功能...",
			},
			"indices": [
				74,
				97
			]
		}],
		"user_mentions": [],
		"symbols": []
	},
	"favorited": false,
	"retweeted": false,
	"possibly_sensitive": false,
	"filter_level": "low",
	"lang": "en",
	"matching_rules": [{
		"tag": null
	}]
}

回复 Post

{
	"created_at": "Fri Aug 21 19:10:05 +0000 2020",
	"id": 1296887316556980200,
	"id_str": "1296887316556980230",
	"text": "了解 @PennMedCDH 如何利用 X 数据深入分析 COVID-19 健康危机 📊\n\nhttps://t.co/1tdA8uDWes",
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
	"truncated": false,
	"in_reply_to_status_id": 1296887091901718500,
	"in_reply_to_status_id_str": "1296887091901718529",
	"in_reply_to_user_id": 2244994945,
	"in_reply_to_user_id_str": "2244994945",
	"in_reply_to_screen_name": "XDevelopers",
	"user": {
		"id": 2244994945,
		"id_str": "2244994945",
		"name": "X Dev",
		"screen_name": "XDevelopers",
		"location": "127.0.0.1",
		"url": "https://developer.x.com/en/community",
		"description": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
		"translator_type": "regular",
		"protected": false,
		"verified": true,
		"followers_count": 512292,
		"friends_count": 2038,
		"listed_count": 1666,
		"favourites_count": 2147,
		"statuses_count": 3634,
		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
		"utc_offset": null,
		"time_zone": null,
		"geo_enabled": true,
		"lang": null,
		"contributors_enabled": false,
		"is_translator": false,
		"profile_background_color": "FFFFFF",
		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_tile": false,
		"profile_link_color": "0084B4",
		"profile_sidebar_border_color": "FFFFFF",
		"profile_sidebar_fill_color": "DDEEF6",
		"profile_text_color": "333333",
		"profile_use_background_image": false,
		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
		"default_profile": false,
		"default_profile_image": false,
		"following": null,
		"follow_request_sent": null,
		"notifications": null
	},
	"geo": null,
	"coordinates": null,
	"place": null,
	"contributors": null,
	"is_quote_status": false,
	"quote_count": 2,
	"reply_count": 3,
	"retweet_count": 9,
	"favorite_count": 26,
	"entities": {
		"hashtags": [],
		"urls": [{
			"url": "https://t.co/1tdA8uDWes",
			"expanded_url": "https://developer.x.com/en/use-cases/success-stories/penn",
			"display_url": "developer.x.com/en/use-cases/s…",
			"unwound": {
				"url": "https://developer.x.com/en/use-cases/success-stories/penn",
				"status": 200,
				"title": "宾夕法尼亚大学医学院数字健康中心",
				"description": "宾夕法尼亚大学医学院数字健康中心创建了 COVID-19 X 地图,包含详细展示情绪、报告症状、各州数据细分以及 COVID-19 疫情边境数据的图表。此外,其 Penn Med With You 计划利用来自 X 的区域汇总信息为网站和短信服务提供支持,通过该服务传播相关且及时的资源。"
			},
			"indices": [
				87,
				110
			]
		}],
		"user_mentions": [{
			"screen_name": "PennMedCDH",
			"name": "Penn Med CDH",
			"id": 1615654896,
			"id_str": "1615654896",
			"indices": [
				8,
				19
			]
		}],
		"symbols": []
	},
	"favorited": false,
	"retweeted": false,
	"possibly_sensitive": false,
	"filter_level": "low",
	"lang": "en",
	"matching_rules": [{
		"tag": null
	}]
}

扩展版 Post

{
	"created_at": "Wed Aug 19 16:26:16 +0000 2020",
	"id": 1296121314218897400,
	"id_str": "1296121314218897408",
	"text": "隐藏回复端点今日上线!\n\n开发者可以隐藏 Tweet 的回复 - 这是开发者帮助改善公共对话健康的重要方式… https://t.co/VyfXs1RTXn",
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
	"truncated": true,
	"in_reply_to_status_id": null,
	"in_reply_to_status_id_str": null,
	"in_reply_to_user_id": null,
	"in_reply_to_user_id_str": null,
	"in_reply_to_screen_name": null,
	"user": {
		"id": 2244994945,
		"id_str": "2244994945",
		"name": "X Dev",
		"screen_name": "XDevelopers",
		"location": "127.0.0.1",
		"url": "https://developer.x.com/en/community",
		"description": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
		"translator_type": "regular",
		"protected": false,
		"verified": true,
		"followers_count": 512292,
		"friends_count": 2038,
		"listed_count": 1666,
		"favourites_count": 2147,
		"statuses_count": 3634,
		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
		"utc_offset": null,
		"time_zone": null,
		"geo_enabled": true,
		"lang": null,
		"contributors_enabled": false,
		"is_translator": false,
		"profile_background_color": "FFFFFF",
		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_tile": false,
		"profile_link_color": "0084B4",
		"profile_sidebar_border_color": "FFFFFF",
		"profile_sidebar_fill_color": "DDEEF6",
		"profile_text_color": "333333",
		"profile_use_background_image": false,
		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
		"default_profile": false,
		"default_profile_image": false,
		"following": null,
		"follow_request_sent": null,
		"notifications": null
	},
	"geo": null,
	"coordinates": null,
	"place": null,
	"contributors": null,
	"is_quote_status": false,
	"extended_tweet": {
		"full_text": "隐藏回复端点今日上线!\n\n开发者可以隐藏 Tweet 的回复 - 这是开发者使用 #XAPI 帮助改善公共对话健康的重要方式。\n\nhttps://t.co/khXhTurm9x",
		"display_text_range": [
			0,
			215
		],
		"entities": {
			"hashtags": [{
				"text": "XAPI",
				"indices": [
					178,
					189
				]
			}],
			"urls": [{
				"url": "https://t.co/khXhTurm9x",
				"expanded_url": "https://devcommunity.x.com/t/hide-replies-now-available-in-the-new-twitter-api/140996",
				"display_url": "devcommunity.com/t/hide-replies…",
				"unwound": {
					"url": "https://devcommunity.x.com/t/hide-replies-now-available-in-the-new-twitter-api/140996",
					"status": 200,
					"title": "新版 X API 现已提供隐藏回复功能",
					"description": "今天,我们很高兴宣布新版 X API 中隐藏回复端点正式上线。隐藏回复端点允许您构建工具,帮助用户隐藏或取消隐藏其 Tweet 的回复。用户管理回复的原因有很多,包括减少对辱骂性、干扰性、误导性评论的关注,或使对话更具吸引力。通过此端点,您可以构建工具帮助 X 上的用户更快、更便捷地隐藏或取消隐藏回复..."
				},
				"indices": [
					192,
					215
				]
			}],
			"user_mentions": [],
			"symbols": []
		}
	},
	"quote_count": 23,
	"reply_count": 9,
	"retweet_count": 54,
	"favorite_count": 172,
	"entities": {
		"hashtags": [],
		"urls": [{
			"url": "https://t.co/VyfXs1RTXn",
			"expanded_url": "https://x.com/i/web/status/1296121314218897408",
			"display_url": "x.com/i/web/status/1…",
			"indices": [
				117,
				140
			]
		}],
		"user_mentions": [],
		"symbols": []
	},
	"favorited": false,
	"retweeted": false,
	"possibly_sensitive": false,
	"filter_level": "low",
	"lang": "en",
	"matching_rules": [{
		"tag": null
	}]
}

带有 extended_entities 的 Post

{
	"created_at": "Wed Aug 12 17:01:42 +0000 2020",
	"id": 1293593516040269800,
	"id_str": "1293593516040269825",
	"text": "终于来了!🥁 向全新的 #XAPI 问好。\n\n我们正在从零开始重建 X API v2,以更好地… https://t.co/UeCndQGMjx",
	"display_text_range": [
		0,
		140
	],
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
	"truncated": true,
	"in_reply_to_status_id": null,
	"in_reply_to_status_id_str": null,
	"in_reply_to_user_id": null,
	"in_reply_to_user_id_str": null,
	"in_reply_to_screen_name": null,
	"user": {
		"id": 2244994945,
		"id_str": "2244994945",
		"name": "X 开发者",
		"screen_name": "XDevelopers",
		"location": "127.0.0.1",
		"url": "https://developer.x.com/en/community",
		"description": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
		"translator_type": "regular",
		"protected": false,
		"verified": true,
		"followers_count": 512292,
		"friends_count": 2038,
		"listed_count": 1666,
		"favourites_count": 2147,
		"statuses_count": 3634,
		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
		"utc_offset": null,
		"time_zone": null,
		"geo_enabled": true,
		"lang": null,
		"contributors_enabled": false,
		"is_translator": false,
		"profile_background_color": "FFFFFF",
		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_tile": false,
		"profile_link_color": "0084B4",
		"profile_sidebar_border_color": "FFFFFF",
		"profile_sidebar_fill_color": "DDEEF6",
		"profile_text_color": "333333",
		"profile_use_background_image": false,
		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
		"default_profile": false,
		"default_profile_image": false,
		"following": null,
		"follow_request_sent": null,
		"notifications": null
	},
	"geo": null,
	"coordinates": null,
	"place": null,
	"contributors": null,
	"is_quote_status": false,
	"extended_tweet": {
		"full_text": "终于来了!🥁 向全新的 #XAPI 问好。\n\n我们正在从零开始重建 X API v2,以更好地服务我们的开发者社区。今天的发布仅仅是个开始。\n\nhttps://t.co/32VrwpGaJw https://t.co/KaFSbjWUA8",
		"display_text_range": [
			0,
			218
		],
		"entities": {
			"hashtags": [{
				"text": "XAPI",
				"indices": [
					42,
					53
				]
			}],
			"urls": [{
				"url": "https://t.co/32VrwpGaJw",
				"expanded_url": "https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html",
				"display_url": "blog.x.com/developer/en_u…",
				"unwound": {
					"url": "https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html",
					"status": 200,
					"title": "推出全新改进的 X API",
					"description": "推出全新的 X API - 从零开始重建,以更快地提供新功能,让开发者能够帮助世界连接到 X 上正在进行的公共对话。",
				},
				"indices": [
					195,
					218
				]
			}],
			"user_mentions": [],
			"symbols": [],
			"media": [{
				"id": 1293565706408038400,
				"id_str": "1293565706408038401",
				"indices": [
					219,
					242
				],
				"additional_media_info": {
					"monetizable": false
				},
				"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"url": "https://t.co/KaFSbjWUA8",
				"display_url": "pic.x.com/KaFSbjWUA8",
				"expanded_url": "https://x.com/XDevelopers/status/1293593516040269825/video/1",
				"type": "video",
				"video_info": {
					"aspect_ratio": [
						16,
						9
					],
					"duration_millis": 34875,
					"variants": [{
							"bitrate": 256000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/480x270/Fg9lnGGsITO0uq2K.mp4?tag=10"
						},
						{
							"bitrate": 832000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/640x360/-crbtZE4y8vKN_uF.mp4?tag=10"
						},
						{
							"content_type": "application/x-mpegURL",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/pl/OvIqQojosF6sMIHR.m3u8?tag=10"
						},
						{
							"bitrate": 2176000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/1280x720/xkxyb-VPVY4OI0j9.mp4?tag=10"
						}
					]
				},
				"sizes": {
					"thumb": {
						"w": 150,
						"h": 150,
						"resize": "裁剪"
					},
					"medium": {
						"w": 1200,
						"h": 675,
						"resize": "适应"
					},
					"small": {
						"w": 680,
						"h": 383,
						"resize": "适应"
					},
					"large": {
						"w": 1280,
						"h": 720,
						"resize": "适应"
					}
				}
			}]
		},
		"extended_entities": {
			"media": [{
				"id": 1293565706408038400,
				"id_str": "1293565706408038401",
				"indices": [
					219,
					242
				],
				"additional_media_info": {
					"monetizable": false
				},
				"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"url": "https://t.co/KaFSbjWUA8",
				"display_url": "pic.x.com/KaFSbjWUA8",
				"expanded_url": "https://x.com/XDevelopers/status/1293593516040269825/video/1",
				"type": "video",
				"video_info": {
					"aspect_ratio": [
						16,
						9
					],
					"duration_millis": 34875,
					"variants": [{
							"bitrate": 256000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/480x270/Fg9lnGGsITO0uq2K.mp4?tag=10"
						},
						{
							"bitrate": 832000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/640x360/-crbtZE4y8vKN_uF.mp4?tag=10"
						},
						{
							"content_type": "application/x-mpegURL",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/pl/OvIqQojosF6sMIHR.m3u8?tag=10"
						},
						{
							"bitrate": 2176000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/1280x720/xkxyb-VPVY4OI0j9.mp4?tag=10"
						}
					]
				},
				"sizes": {
					"thumb": {
						"w": 150,
						"h": 150,
						"resize": "crop"
					},
					"medium": {
						"w": 1200,
						"h": 675,
						"resize": "fit"
					},
					"small": {
						"w": 680,
						"h": 383,
						"resize": "fit"
					},
					"large": {
						"w": 1280,
						"h": 720,
						"resize": "fit"
					}
				}
			}]
		}
	},
	"quote_count": 332,
	"reply_count": 172,
	"retweet_count": 958,
	"favorite_count": 2844,
	"entities": {
		"hashtags": [{
			"text": "XAPI",
			"indices": [
				42,
				53
			]
		}],
		"urls": [{
			"url": "https://t.co/UeCndQGMjx",
			"expanded_url": "https://x.com/i/web/status/1293593516040269825",
			"display_url": "x.com/i/web/status/1…",
			"indices": [
				117,
				140
			]
		}],
		"user_mentions": [],
		"symbols": []
	},
	"favorited": false,
	"retweeted": false,
	"possibly_sensitive": false,
	"filter_level": "low",
	"lang": "en",
	"matching_rules": [{
		"tag": null
	}]
}

转发

{
	"created_at": "Tue Feb 18 19:33:59 +0000 2020",
	"id": 1229851574555508700,
	"id_str": "1229851574555508737",
	"text": "RT @suhemparack: 我使用 APL 为 X 构建了一个 Alexa 技能,让你可以在 echo show 上查看 Tweet 和趋势!\n\n点击查看…",
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
	"truncated": false,
	"in_reply_to_status_id": null,
	"in_reply_to_status_id_str": null,
	"in_reply_to_user_id": null,
	"in_reply_to_user_id_str": null,
	"in_reply_to_screen_name": null,
	"user": {
		"id": 2244994945,
		"id_str": "2244994945",
		"name": "X Dev",
		"screen_name": "X Developers",
		"location": "127.0.0.1",
		"url": "https://developer.x.com/en/community",
		"description": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
		"translator_type": "regular",
		"protected": false,
		"verified": true,
		"followers_count": 512292,
		"friends_count": 2038,
		"listed_count": 1666,
		"favourites_count": 2147,
		"statuses_count": 3634,
		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
		"utc_offset": null,
		"time_zone": null,
		"geo_enabled": true,
		"lang": null,
		"contributors_enabled": false,
		"is_translator": false,
		"profile_background_color": "FFFFFF",
		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_tile": false,
		"profile_link_color": "0084B4",
		"profile_sidebar_border_color": "FFFFFF",
		"profile_sidebar_fill_color": "DDEEF6",
		"profile_text_color": "333333",
		"profile_use_background_image": false,
		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
		"default_profile": false,
		"default_profile_image": false,
		"following": null,
		"follow_request_sent": null,
		"notifications": null
	},
	"geo": null,
	"coordinates": null,
	"place": null,
	"contributors": null,
	"retweeted_status": {
		"created_at": "Tue Feb 18 19:01:58 +0000 2020",
		"id": 1229843515603144700,
		"id_str": "1229843515603144704",
		"text": "我使用 APL 为 X 构建了一个 Alexa 技能,让你可以在 echo show 上查看 Tweet 和趋势!\n\n点击查看… https://t.co/RP9NgltX7i",
		"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
		"truncated": true,
		"in_reply_to_status_id": null,
		"in_reply_to_status_id_str": null,
		"in_reply_to_user_id": null,
		"in_reply_to_user_id_str": null,
		"in_reply_to_screen_name": null,
		"user": {
			"id": 857699969263964200,
			"id_str": "857699969263964161",
			"name": "Suhem Parack",
			"screen_name": "suhemparack",
			"location": "Seattle, WA",
			"url": "https://developer.x.com",
			"description": "@X 学术研究开发者关系负责人。欢迎与我讨论使用 X 数据进行研究。曾任职于 Amazon Alexa。观点仅代表个人",
			"translator_type": "none",
			"protected": false,
			"verified": false,
			"followers_count": 732,
			"friends_count": 501,
			"listed_count": 12,
			"favourites_count": 358,
			"statuses_count": 458,
			"created_at": "Thu Apr 27 20:56:22 +0000 2017",
			"utc_offset": null,
			"time_zone": null,
			"geo_enabled": false,
			"lang": null,
			"contributors_enabled": false,
			"is_translator": false,
			"profile_background_color": "F5F8FA",
			"profile_background_image_url": "",
			"profile_background_image_url_https": "",
			"profile_background_tile": false,
			"profile_link_color": "1DA1F2",
			"profile_sidebar_border_color": "C0DEED",
			"profile_sidebar_fill_color": "DDEEF6",
			"profile_text_color": "333333",
			"profile_use_background_image": true,
			"profile_image_url": "http://pbs.twimg.com/profile_images/1230703695051935747/TbQKe91L_normal.jpg",
			"profile_image_url_https": "https://pbs.twimg.com/profile_images/1230703695051935747/TbQKe91L_normal.jpg",
			"profile_banner_url": "https://pbs.twimg.com/profile_banners/857699969263964161/1593055939",
			"default_profile": true,
			"default_profile_image": false,
			"following": null,
			"follow_request_sent": null,
			"notifications": null
		},
		"geo": null,
		"coordinates": null,
		"place": null,
		"contributors": null,
		"is_quote_status": false,
		"extended_tweet": {
			"full_text": "我使用 APL 为 X 构建了一个 Alexa 技能,让你可以在 echo show 上查看 Tweet 和趋势!\n\n点击查看 👇\n\nhttps://t.co/l5J8wq748G",
			"display_text_range": [
				0,
				150
			],
			"entities": {
				"hashtags": [],
				"urls": [{
					"url": "https://t.co/l5J8wq748G",
					"expanded_url": "https://dev.to/twitterdev/building-an-alexa-skill-for-twitter-using-alexa-presentation-language-1aj0",
					"display_url": "dev.to/twitterdev/bui…",
					"unwound": {
						"url": "https://dev.to/twitterdev/building-an-alexa-skill-for-twitter-using-alexa-presentation-language-1aj0",
						"status": 200,
						"title": null,
						"description": null
					},
					"indices": [
						127,
						150
					]
				}],
				"user_mentions": [],
				"symbols": []
			}
		},
		"quote_count": 6,
		"reply_count": 1,
		"retweet_count": 19,
		"favorite_count": 71,
		"entities": {
			"hashtags": [],
			"urls": [{
				"url": "https://t.co/RP9NgltX7i",
				"expanded_url": "https://x.com/i/web/status/1229843515603144704",
				"display_url": "x.com/i/web/status/1…",
				"indices": [
					116,
					139
				]
			}],
			"user_mentions": [],
			"symbols": []
		},
		"favorited": false,
		"retweeted": false,
		"possibly_sensitive": false,
		"filter_level": "low",
		"lang": "en"
	},
	"is_quote_status": false,
	"quote_count": 0,
	"reply_count": 0,
	"retweet_count": 0,
	"favorite_count": 0,
	"entities": {
		"hashtags": [],
		"urls": [],
		"user_mentions": [{
			"screen_name": "suhemparack",
			"name": "Suhem Parack",
			"id": 857699969263964200,
			"id_str": "857699969263964161",
			"indices": [
				3,
				15
			]
		}],
		"symbols": []
	},
	"favorited": false,
	"retweeted": false,
	"filter_level": "low",
	"lang": "en",
	"matching_rules": [{
		"tag": null
	}]
}

引用 Tweet

{
	"created_at": "Mon Nov 16 18:09:36 +0000 2020",
	"id": 1328399838128468000,
	"id_str": "1328399838128467969",
	"text": "按计划,下方提及的 Labs v2 端点现已停用。如有问题,请在论坛中告知我们… https://t.co/ahQvTYaOcZ",
	"display_text_range": [
		0,
		140
	],
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
	"truncated": true,
	"in_reply_to_status_id": null,
	"in_reply_to_status_id_str": null,
	"in_reply_to_user_id": null,
	"in_reply_to_user_id_str": null,
	"in_reply_to_screen_name": null,
	"user": {
		"id": 2244994945,
		"id_str": "2244994945",
		"name": "X Dev",
		"screen_name": "XDevelopers",
		"location": "127.0.0.1",
		"url": "https://developer.x.com/en/community",
		"description": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
		"translator_type": "regular",
		"protected": false,
		"verified": true,
		"followers_count": 512292,
		"friends_count": 2038,
		"listed_count": 1666,
		"favourites_count": 2147,
		"statuses_count": 3634,
		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
		"utc_offset": null,
		"time_zone": null,
		"geo_enabled": true,
		"lang": null,
		"contributors_enabled": false,
		"is_translator": false,
		"profile_background_color": "FFFFFF",
		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
		"profile_background_tile": false,
		"profile_link_color": "0084B4",
		"profile_sidebar_border_color": "FFFFFF",
		"profile_sidebar_fill_color": "DDEEF6",
		"profile_text_color": "333333",
		"profile_use_background_image": false,
		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
		"default_profile": false,
		"default_profile_image": false,
		"following": null,
		"follow_request_sent": null,
		"notifications": null
	},
	"geo": null,
	"coordinates": null,
	"place": null,
	"contributors": null,
	"quoted_status_id": 1327011423252144000,
	"quoted_status_id_str": "1327011423252144128",
	"quoted_status": {
		"created_at": "Thu Nov 12 22:12:32 +0000 2020",
		"id": 1327011423252144000,
		"id_str": "1327011423252144128",
		"text": "👋 友情提醒:X Developer Labs v2 隐藏回复和近期搜索功能将于下周一(11 月)停用… https://t.co/EEWN2Q9aXh",
		"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X 网页应用</a>",
		"truncated": true,
		"in_reply_to_status_id": null,
		"in_reply_to_status_id_str": null,
		"in_reply_to_user_id": null,
		"in_reply_to_user_id_str": null,
		"in_reply_to_screen_name": null,
		"user": {
			"id": 2244994945,
			"id_str": "2244994945",
			"name": "X Dev",
			"screen_name": "XDevelopers",
			"location": "127.0.0.1",
			"url": "https://developer.x.com/en/community",
			"description": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
			"translator_type": "regular",
			"protected": false,
			"verified": true,
			"followers_count": 512292,
			"friends_count": 2038,
			"listed_count": 1666,
			"favourites_count": 2147,
			"statuses_count": 3634,
			"created_at": "Sat Dec 14 04:35:55 +0000 2013",
			"utc_offset": null,
			"time_zone": null,
			"geo_enabled": true,
			"lang": null,
			"contributors_enabled": false,
			"is_translator": false,
			"profile_background_color": "FFFFFF",
			"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
			"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
			"profile_background_tile": false,
			"profile_link_color": "0084B4",
			"profile_sidebar_border_color": "FFFFFF",
			"profile_sidebar_fill_color": "DDEEF6",
			"profile_text_color": "333333",
			"profile_use_background_image": false,
			"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
			"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
			"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
			"default_profile": false,
			"default_profile_image": false,
			"following": null,
			"follow_request_sent": null,
			"notifications": null
		},
		"geo": null,
		"coordinates": null,
		"place": null,
		"contributors": null,
		"is_quote_status": false,
		"extended_tweet": {
			"full_text": "👋 友情提醒:X Developer Labs v2 隐藏回复和近期搜索功能将于下周一(11 月 16 日)停用!我们建议您迁移至 v2 #XAPI 中现已提供的新隐藏回复和近期搜索端点。详情: https://t.co/r6z6CI7kEy",
			"display_text_range": [
				0,
				273
			],
			"entities": {
				"hashtags": [{
					"text": "XAPI",
					"indices": [
						228,
						239
					]
				}],
				"urls": [{
					"url": "https://t.co/r6z6CI7kEy",
					"expanded_url": "https://devcommunity.x.com/t/retiring-labs-v2-recent-search-and-hide-replies/145795",
					"display_url": "devcommunity.com/t/retiring-lab…",
					"unwound": {
						"url": "https://devcommunity.x.com/t/retiring-labs-v2-recent-search-and-hide-replies/145795",
						"status": 200,
						"title": "停用 Labs v2 近期搜索和隐藏回复功能",
						"description": "正如我们在早期访问和隐藏回复公告中所述,以下 X Developer Labs v2 端点将于 11 月 16 日停用。Labs v2 近期搜索 Labs v2 隐藏回复 调用这些端点时,将返回 HTTP 410 状态且不返回任何数据。根据您对 Labs 的反馈,我们已将相应功能整合到 X API v2 中。相关文档可通过以下链接查看。如果您尚未注册 v2 访问权限,请点击此处注册..."
					},
					"indices": [
						250,
						273
					]
				}],
				"user_mentions": [],
				"symbols": []
			}
		},
		"quote_count": 4,
		"reply_count": 2,
		"retweet_count": 8,
		"favorite_count": 33,
		"entities": {
			"hashtags": [],
			"urls": [{
				"url": "https://t.co/EEWN2Q9aXh",
				"expanded_url": "https://x.com/i/web/status/1327011423252144128",
				"display_url": "x.com/i/web/status/1…",
				"indices": [
					117,
					140
				]
			}],
			"user_mentions": [],
			"symbols": []
		},
		"favorited": false,
		"retweeted": false,
		"possibly_sensitive": false,
		"filter_level": "low",
		"lang": "en"
	},
	"quoted_status_permalink": {
		"url": "https://t.co/JaxttUMmjX",
		"expanded": "https://x.com/XDevelopers/status/1327011423252144128",
		"display": "x.com/XDevelopers/sta…"
	},
	"is_quote_status": true,
	"extended_tweet": {
		"full_text": "按计划,下方引用的 Labs v2 端点现已停用。如果您对 X API v2 有任何疑问或需要帮助,请在论坛中告知我们! https://t.co/JaxttUMmjX",
		"display_text_range": [
			0,
			166
		],
		"entities": {
			"hashtags": [],
			"urls": [{
				"url": "https://t.co/JaxttUMmjX",
				"expanded_url": "https://x.com/XDevelopers/status/1327011423252144128",
				"display_url": "x.com/XDevelopers/sta…",
				"indices": [
					167,
					190
				]
			}],
			"user_mentions": [],
			"symbols": []
		}
	},
	"quote_count": 1,
	"reply_count": 4,
	"retweet_count": 7,
	"favorite_count": 29,
	"entities": {
		"hashtags": [],
		"urls": [{
			"url": "https://t.co/ahQvTYaOcZ",
			"expanded_url": "https://x.com/i/web/status/1328399838128467969",
			"display_url": "x.com/i/web/status/1…",
			"indices": [
				117,
				140
			]
		}],
		"user_mentions": [],
		"symbols": []
	},
	"favorited": false,
	"retweeted": false,
	"possibly_sensitive": false,
	"filter_level": "low",
	"lang": "en",
	"matching_rules": [{
		"tag": null
	}]
}

被转推的引用 Tweet

{
 	"created_at": "Thu Feb 06 17:26:44 +0000 2020",
 	"id": 1225470895902412800,
 	"id_str": "1225470895902412800",
 	"text": "RT @AureliaSpecker: 📣 If you enjoyed the London commute tutorial I wrote in November last year, check out the refactored version that uses…",
 	"source": "<a href=\"http://x.com/download/iphone\" rel=\"nofollow\">X for iPhone</a>",
 	"truncated": false,
 	"in_reply_to_status_id": null,
 	"in_reply_to_status_id_str": null,
 	"in_reply_to_user_id": null,
 	"in_reply_to_user_id_str": null,
 	"in_reply_to_screen_name": null,
 	"user": {
 		"id": 2244994945,
 		"id_str": "2244994945",
 		"name": "X Dev",
 		"screen_name": "XDevelopers",
 		"location": "127.0.0.1",
 		"url": "https://developer.x.com/en/community",
 		"description": "#X开发者 团队的官方声音,您获取 #XAPI 相关更新、资讯和活动的官方来源。",
 		"translator_type": "regular",
 		"protected": false,
 		"verified": true,
 		"followers_count": 512292,
 		"friends_count": 2038,
 		"listed_count": 1666,
 		"favourites_count": 2147,
 		"statuses_count": 3634,
 		"created_at": "Sat Dec 14 04:35:55 +0000 2013",
 		"utc_offset": null,
 		"time_zone": null,
 		"geo_enabled": true,
 		"lang": null,
 		"contributors_enabled": false,
 		"is_translator": false,
 		"profile_background_color": "FFFFFF",
 		"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
 		"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
 		"profile_background_tile": false,
 		"profile_link_color": "0084B4",
 		"profile_sidebar_border_color": "FFFFFF",
 		"profile_sidebar_fill_color": "DDEEF6",
 		"profile_text_color": "333333",
 		"profile_use_background_image": false,
 		"profile_image_url": "http://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
 		"profile_image_url_https": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
 		"profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1594913664",
 		"default_profile": false,
 		"default_profile_image": false,
 		"following": null,
 		"follow_request_sent": null,
 		"notifications": null
 	},
 	"geo": null,
 	"coordinates": null,
 	"place": null,
 	"contributors": null,
 	"retweeted_status": {
 		"created_at": "Tue Feb 04 15:01:25 +0000 2020",
 		"id": 1224709550214873000,
 		"id_str": "1224709550214873090",
 		"text": "📣 如果您喜欢我去年11月写的伦敦通勤教程,不妨看看重构后的版本… https://t.co/cAepHunkFp",
 		"display_text_range": [
 			0,
 			140
 		],
 		"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X Web App</a>",
 		"truncated": true,
 		"in_reply_to_status_id": null,
 		"in_reply_to_status_id_str": null,
 		"in_reply_to_user_id": null,
 		"in_reply_to_user_id_str": null,
 		"in_reply_to_screen_name": null,
 		"user": {
 			"id": 1102321381,
 			"id_str": "1102321381",
 			"name": "Aurelia Specker",
 			"screen_name": "AureliaSpecker",
 			"location": "London, UK",
 			"url": null,
 			"description": "devrel @TwitterUK • 伦敦的瑞士人 • 植物妈妈 • @_dormrod 的专属理发师",
 			"translator_type": "none",
 			"protected": false,
 			"verified": false,
 			"followers_count": 1032,
 			"friends_count": 1331,
 			"listed_count": 26,
 			"favourites_count": 4979,
 			"statuses_count": 854,
 			"created_at": "Fri Jan 18 23:45:43 +0000 2013",
 			"utc_offset": null,
 			"time_zone": null,
 			"geo_enabled": true,
 			"lang": null,
 			"contributors_enabled": false,
 			"is_translator": false,
 			"profile_background_color": "8B542B",
 			"profile_background_image_url": "http://abs.twimg.com/images/themes/theme8/bg.gif",
 			"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme8/bg.gif",
 			"profile_background_tile": false,
 			"profile_link_color": "5E341C",
 			"profile_sidebar_border_color": "D9B17E",
 			"profile_sidebar_fill_color": "EADEAA",
 			"profile_text_color": "333333",
 			"profile_use_background_image": true,
 			"profile_image_url": "http://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
 			"profile_image_url_https": "https://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
 			"profile_banner_url": "https://pbs.twimg.com/profile_banners/1102321381/1587552672",
 			"default_profile": false,
 			"default_profile_image": false,
 			"following": null,
 			"follow_request_sent": null,
 			"notifications": null
 		},
 		"geo": null,
 		"coordinates": null,
 		"place": null,
 		"contributors": null,
 		"quoted_status_id": 1195000047089389600,
 		"quoted_status_id_str": "1195000047089389573",
 		"quoted_status": {
 			"created_at": "Thu Nov 14 15:26:27 +0000 2019",
 			"id": 1195000047089389600,
 			"id_str": "1195000047089389573",
 			"text": "我写了一篇教程,介绍如何使用 X API 获取定制化通勤信息🚇\n\n#DEVcommunity #Pythontutorial… https://t.co/pL0qJ4vhtE",
 			"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X Web App</a>",
 			"truncated": true,
 			"in_reply_to_status_id": null,
 			"in_reply_to_status_id_str": null,
 			"in_reply_to_user_id": null,
 			"in_reply_to_user_id_str": null,
 			"in_reply_to_screen_name": null,
 			"user": {
 				"id": 1102321381,
 				"id_str": "1102321381",
 				"name": "Aurelia Specker",
 				"screen_name": "AureliaSpecker",
 				"location": "London, UK",
 				"url": null,
 				"description": "devrel @TwitterUK • 伦敦的瑞士人 • 植物妈妈 • @_dormrod 的专属理发师",
 				"translator_type": "none",
 				"protected": false,
 				"verified": false,
 				"followers_count": 1032,
 				"friends_count": 1331,
 				"listed_count": 26,
 				"favourites_count": 4979,
 				"statuses_count": 854,
 				"created_at": "Fri Jan 18 23:45:43 +0000 2013",
 				"utc_offset": null,
 				"time_zone": null,
 				"geo_enabled": true,
 				"lang": null,
 				"contributors_enabled": false,
 				"is_translator": false,
 				"profile_background_color": "8B542B",
 				"profile_background_image_url": "http://abs.twimg.com/images/themes/theme8/bg.gif",
 				"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme8/bg.gif",
 				"profile_background_tile": false,
 				"profile_link_color": "5E341C",
 				"profile_sidebar_border_color": "D9B17E",
 				"profile_sidebar_fill_color": "EADEAA",
 				"profile_text_color": "333333",
 				"profile_use_background_image": true,
 				"profile_image_url": "http://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
 				"profile_image_url_https": "https://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
 				"profile_banner_url": "https://pbs.twimg.com/profile_banners/1102321381/1587552672",
 				"default_profile": false,
 				"default_profile_image": false,
 				"following": null,
 				"follow_request_sent": null,
 				"notifications": null
 			},
 			"geo": null,
 			"coordinates": null,
 			"place": null,
 			"contributors": null,
 			"is_quote_status": false,
 			"extended_tweet": {
 				"full_text": "我写了一篇教程,介绍如何使用 X API 获取个性化通勤信息🚇\n\n#DEVcommunity #Pythontutorial \n\n点击查看 👇\nhttps://t.co/sOjXW4YhbN",
 				"display_text_range": [
 					0,
 					160
 				],
 				"entities": {
 					"hashtags": [{
 							"text": "DEVcommunity",
 							"indices": [
 								85,
 								98
 							]
 						},
 						{
 							"text": "Pythontutorial",
 							"indices": [
 								99,
 								114
 							]
 						}
 					],
 					"urls": [{
 						"url": "https://t.co/sOjXW4YhbN",
 						"expanded_url": "https://dev.to/twitterdev/using-the-twitter-api-to-make-your-commute-easier-3od0",
 						"display_url": "dev.to/twitterdev/usi…",
 						"unwound": {
 							"url": "https://dev.to/twitterdev/using-the-twitter-api-to-make-your-commute-easier-3od0",
 							"status": 200,
 							"title": null,
 							"description": null
 						},
 						"indices": [
 							137,
 							160
 						]
 					}],
 					"user_mentions": [],
 					"symbols": []
 				}
 			},
 			"quote_count": 4,
 			"reply_count": 5,
 			"retweet_count": 31,
 			"favorite_count": 123,
 			"entities": {
 				"hashtags": [{
 						"text": "DEVcommunity",
 						"indices": [
 							85,
 							98
 						]
 					},
 					{
 						"text": "Pythontutorial",
 						"indices": [
 							99,
 							114
 						]
 					}
 				],
 				"urls": [{
 					"url": "https://t.co/pL0qJ4vhtE",
 					"expanded_url": "https://x.com/i/web/status/1195000047089389573",
 					"display_url": "x.com/i/web/status/1…",
 					"indices": [
 						116,
 						139
 					]
 				}],
 				"user_mentions": [],
 				"symbols": []
 			},
 			"favorited": false,
 			"retweeted": false,
 			"possibly_sensitive": false,
 			"filter_level": "low",
 			"lang": "en"
 		},
 		"quoted_status_permalink": {
 			"url": "https://t.co/dXrJYvn3hY",
 			"expanded": "https://x.com/AureliaSpecker/status/1195000047089389573",
 			"display": "x.com/AureliaSpecker…"
 		},
 		"is_quote_status": true,
 		"extended_tweet": {
 			"full_text": "📣 如果你喜欢我去年11月写的伦敦通勤教程,不妨看看使用 X 新搜索端点的重构版本 🚇 https://t.co/87XIPZmZBJ\n\n#DEVcommunity #Pythontutorial @XDev @XAPI https://t.co/dXrJYvn3hY",
 			"display_text_range": [
 				0,
 				229
 			],
 			"entities": {
 				"hashtags": [{
 						"text": "DEVcommunity",
 						"indices": [
 							176,
 							189
 						]
 					},
 					{
 						"text": "Pythontutorial",
 						"indices": [
 							190,
 							205
 						]
 					}
 				],
 				"urls": [{
 						"url": "https://t.co/87XIPZmZBJ",
 						"expanded_url": "https://bit.ly/2OrnrCC",
 						"display_url": "bit.ly/2OrnrCC",
 						"unwound": {
 							"url": "https://dev.to/twitterdev/migrate-to-twitter-s-newly-released-labs-recent-search-endpoint-3npe",
 							"status": 200,
 							"title": null,
 							"description": null
 						},
 						"indices": [
 							151,
 							174
 						]
 					},
 					{
 						"url": "https://t.co/dXrJYvn3hY",
 						"expanded_url": "https://x.com/AureliaSpecker/status/1195000047089389573",
 						"display_url": "x.com/AureliaSpecker…",
 						"indices": [
 							230,
 							253
 						]
 					}
 				],
 				"user_mentions": [{
 						"screen_name": "XDev",
 						"name": "X Dev",
 						"id": 2244994945,
 						"id_str": "2244994945",
 						"indices": [
 							206,
 							217
 						]
 					},
 					{
 						"screen_name": "XAPI",
 						"name": "X API",
 						"id": 6253282,
 						"id_str": "6253282",
 						"indices": [
 							218,
 							229
 						]
 					}
 				],
 				"symbols": []
 			}
 		},
 		"quote_count": 2,
 		"reply_count": 0,
 		"retweet_count": 12,
 		"favorite_count": 43,
 		"entities": {
 			"hashtags": [],
 			"urls": [{
 				"url": "https://t.co/cAepHunkFp",
 				"expanded_url": "https://x.com/i/web/status/1224709550214873090",
 				"display_url": "x.com/i/web/status/1…",
 				"indices": [
 					117,
 					140
 				]
 			}],
 			"user_mentions": [],
 			"symbols": []
 		},
 		"favorited": false,
 		"retweeted": false,
 		"possibly_sensitive": false,
 		"filter_level": "low",
 		"lang": "en"
 	},
 	"quoted_status_id": 1195000047089389600,
 	"quoted_status_id_str": "1195000047089389573",
 	"quoted_status": {
 		"created_at": "Thu Nov 14 15:26:27 +0000 2019",
 		"id": 1195000047089389600,
 		"id_str": "1195000047089389573",
 		"text": "我写了一篇教程,介绍如何使用 X API 获取个性化通勤信息🚇\n\n#DEVcommunity #Pythontutorial… https://t.co/pL0qJ4vhtE",
 		"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X Web App</a>",
 		"truncated": true,
 		"in_reply_to_status_id": null,
 		"in_reply_to_status_id_str": null,
 		"in_reply_to_user_id": null,
 		"in_reply_to_user_id_str": null,
 		"in_reply_to_screen_name": null,
 		"user": {
 			"id": 1102321381,
 			"id_str": "1102321381",
 			"name": "Aurelia Specker",
 			"screen_name": "AureliaSpecker",
 			"location": "London, UK",
 			"url": null,
 			"description": "devrel @TwitterUK • 瑞士人在伦敦 • 植物妈妈 • @_dormrod 的专属理发师",
 			"translator_type": "none",
 			"protected": false,
 			"verified": false,
 			"followers_count": 1032,
 			"friends_count": 1331,
 			"listed_count": 26,
 			"favourites_count": 4979,
 			"statuses_count": 854,
 			"created_at": "Fri Jan 18 23:45:43 +0000 2013",
 			"utc_offset": null,
 			"time_zone": null,
 			"geo_enabled": true,
 			"lang": null,
 			"contributors_enabled": false,
 			"is_translator": false,
 			"profile_background_color": "8B542B",
 			"profile_background_image_url": "http://abs.twimg.com/images/themes/theme8/bg.gif",
 			"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme8/bg.gif",
 			"profile_background_tile": false,
 			"profile_link_color": "5E341C",
 			"profile_sidebar_border_color": "D9B17E",
 			"profile_sidebar_fill_color": "EADEAA",
 			"profile_text_color": "333333",
 			"profile_use_background_image": true,
 			"profile_image_url": "http://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
 			"profile_image_url_https": "https://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
 			"profile_banner_url": "https://pbs.twimg.com/profile_banners/1102321381/1587552672",
 			"default_profile": false,
 			"default_profile_image": false,
 			"following": null,
 			"follow_request_sent": null,
 			"notifications": null
 		},
 		"geo": null,
 		"coordinates": null,
 		"place": null,
 		"contributors": null,
 		"is_quote_status": false,
 		"extended_tweet": {
 			"full_text": "I wrote a tutorial on how to get bespoke commute information using the X API🚇\n\n#DEVcommunity #Pythontutorial \n\nCheck it out here 👇\nhttps://t.co/sOjXW4YhbN",
 			"display_text_range": [
 				0,
 				160
 			],
 			"entities": {
 				"hashtags": [{
 						"text": "DEVcommunity",
 						"indices": [
 							85,
 							98
 						]
 					},
 					{
 						"text": "Pythontutorial",
 						"indices": [
 							99,
 							114
 						]
 					}
 				],
 				"urls": [{
 					"url": "https://t.co/sOjXW4YhbN",
 					"expanded_url": "https://dev.to/twitterdev/using-the-twitter-api-to-make-your-commute-easier-3od0",
 					"display_url": "dev.to/twitterdev/usi…",
 					"unwound": {
 						"url": "https://dev.to/twitterdev/using-the-twitter-api-to-make-your-commute-easier-3od0",
 						"status": 200,
 						"title": null,
 						"description": null
 					},
 					"indices": [
 						137,
 						160
 					]
 				}],
 				"user_mentions": [],
 				"symbols": []
 			}
 		},
 		"quote_count": 4,
 		"reply_count": 5,
 		"retweet_count": 31,
 		"favorite_count": 123,
 		"entities": {
 			"hashtags": [{
 					"text": "DEVcommunity",
 					"indices": [
 						85,
 						98
 					]
 				},
 				{
 					"text": "Pythontutorial",
 					"indices": [
 						99,
 						114
 					]
 				}
 			],
 			"urls": [{
 				"url": "https://t.co/pL0qJ4vhtE",
 				"expanded_url": "https://x.com/i/web/status/1195000047089389573",
 				"display_url": "x.com/i/web/status/1…",
 				"indices": [
 					116,
 					139
 				]
 			}],
 			"user_mentions": [],
 			"symbols": []
 		},
 		"favorited": false,
 		"retweeted": false,
 		"possibly_sensitive": false,
 		"filter_level": "low",
 		"lang": "en"
 	},
 	"quoted_status_permalink": {
 		"url": "https://t.co/dXrJYvn3hY",
 		"expanded": "https://x.com/AureliaSpecker/status/1195000047089389573",
 		"display": "x.com/AureliaSpecker…"
 	},
 	"is_quote_status": true,
 	"quote_count": 0,
 	"reply_count": 0,
 	"retweet_count": 0,
 	"favorite_count": 0,
 	"entities": {
 		"hashtags": [],
 		"urls": [],
 		"user_mentions": [{
 			"screen_name": "AureliaSpecker",
 			"name": "Aurelia Specker",
 			"id": 1102321381,
 			"id_str": "1102321381",
 			"indices": [
 				3,
 				18
 			]
 		}],
 		"symbols": []
 	},
 	"favorited": false,
 	"retweeted": false,
 	"filter_level": "low",
 	"lang": "en",
 	"matching_rules": [{
 		"tag": null
 	}]
 }

企业版 Activity Streams 数据对象

想了解 Activity Streams 数据格式如何映射到 X API v2 格式吗?
请查看我们的对比指南:Activity Streams 与 X API v2 的比较
请注意:我们强烈建议在企业数据 API 中使用 Enriched Native 格式。
  • Enriched Native 格式包含自 2017 年以来新增的所有元数据,例如 投票元数据,以及诸如 reply_count 和 quote_count 等其他指标。
  • 自 2017 年字符数更新以来,Activity Streams 格式未再加入新的元数据或富化内容。

Activity 对象

Activity Streams 是由 Gnip 基于第三方的 Activity Base Schema(见此) 对 X 的原始数据格式进行的对象架构映射,用于“规范化格式”,以统一 Post 数据和其他社交媒体数据。Posts 会被规范化为 Activity Streams 架构,其中包括将 note、person、place 和 service 等对象类型作为嵌套对象。Posts 还可以包含用于转发(Retweets)的其他嵌套 Post 活动对象,或其他类型,包括 twitter_quoted_status、long_object。 基础层级的对象类型“activity”与原生富化格式中的 Post 基础层级对象类似。Activity Streams 格式的示例负载见此处

数据字典

以下是这些“根级”“activity” 属性的数据字典,以及指向其子对象数据字典的链接。
属性类型说明
id字符串该 Post 的唯一 IRI。具体来说,“标记”是该架构,“search.x.com”表示该架构的域,2005 则表示该架构被制定的年份。
在存储 Post 时,建议将其作为唯一标识符或主键使用。
“id”:“tag:search.x.com,2005:1050118621198921728”
objectType字符串对象类型,始终为”活动”
“objectType”:“活动”
对象对象表示正在发布或分享的 Post 的对象。
对于转推(Retweets),这将包含完整的”活动”,并包含此架构中所述的相关 fields。
对于原创 Post,此处将包含一个”注意”对象,其 fields 如下所述。
“对象”:
“对象”:
“objectType”:“注意”,
“id”:“object:search.x.com,2005:1050118621198921728”,
“概述”:“为了腾出更多表达空间,我们现在将所有表情符号按相同方式计数——包括带有性别和肤色变体的表情符号 t…https://t.co/MkGjXf9aXm”,
“链接”:“http://x.com/API/statuses/1050118621198921728”,
“postedTime”:“2018-10-10T20:19:24.000Z”
长时间_对象对象当帖子文本超过 140 个字符时,用于表示完整文本正文的对象。


“长_对象”:
“主体”:“为了提供更多表达空间,我们现在将所有表情符号按相同方式计数——包括带有性别和肤色修饰的表情符号 👍🏻👍🏽👍🏿。这已在 Twitter-Text(我们的开源库)中体现。 \n\n在使用 Twitter-Text?请查看论坛帖了解详情:https://t.co/Nx1XZmRCXA”,
“显示_文本_范围”: [
0,
277
],
“Twitter_实体”:
“主题标签”: [],
“URL”: [

“URL”:“https://t.co/Nx1XZmRCXA”,
“已展开_URL”:“https://devcommunity.x.com/t/new-update-to-the-twitter-text-library-emoji-character-count/114607”,
“显示_url”:“devcommunity.com/t/new-update-t…”,
“索引”: [
254,
277
]

],
“用户_提及”: [],
“符号”: []

显示_文本_范围数组如果 Post 文本超过 140 个字符。


“显示_文本_范围”: [
0,
142
]
动词string用户执行的操作类型。
Post,“post”
转发,“share”
已删除的 Post,“delete”
使用相应的动词是区分 Tweet 与真正的转发的正确方式。但这只适用于真正的转发,不适用于修改或引用的 Tweets,因为这些并未使用 X 的转发功能。有关 AS 动词的说明
点击此处了解详情
对于删除操作,请注意仅会包含数量有限的 fields,具体见下方示例负载。
“动词”:“Post”
postedTime日期(ISO 8601)执行该操作的时间,例如该 Post 的发布时间。


“postedTime”:“2018-10-10T20:19:24.000Z”
生成器对象一个对象,表示用于发布 Post 的工具。它将包含名称(“displayName”)以及一个链接(“链接”)用于生成该 Post 的源应用。
“生成器”:
“显示名称”:“X Web 客户端”,
“链接”:“http://x.com
提供者对象一个表示该活动提供方的 JSON 对象。其中将包含一个 objectType (“服务”),提供者名称(“displayName”)、以及指向该服务提供方的链接’的网站(“链接”)。
“提供商”:

“objectType”:“服务”,
“displayName”:“X”,
“链接”:“http://www.x.com
链接字符串该 Post 的永久链接。
“链接”:“http://x.com/API/statuses/1050118621198921728
正文内容字符串帖子内容。

在转发(Retweets)中,请注意,X 会在根级别通过添加来修改 body 的值”转推 @username”在转发(Retweets)中,请注意 X 会在开头添加“RT @username”,并截断原始文本、在末尾加上省略号,从而修改根级别的 body 值。因此,对于转发,你的应用应查看 object.body,确保提取的是原始 Post(被转发)的未修改文本。
“主体”:“随着卡迪夫城、水晶宫和赫尔城从英冠升级至英超,赛季末的保级大战将格外精彩。“
显示_文字_范围数组描述正文文本中指示可见 Post 的字符范围。以 @ 提及开头的 Post 起始索引将大于 0;附带媒体或超过 140 个字符的 Post 将通过 display_text_range 指定可见范围_文本_long 类型的取值范围_对象。

“显示_文本_范围”: [
14,
42
]

”long_对象”:
“显示_文本_范围”:[
0,
277
]…
参与方对象表示发布该内容的 X 用户的对象。Actor 对象指代一个 X 用户,并包含与该用户相关的所有元数据。
参见
参与方对象详细信息
inReplyTo对象一个 JSON 对象(如适用)用于引用被回复的 Post。包含指向该 Post 的链接。
“inReplyTo”:

“链接”:“http://x.com/GOP/statuses/349573991561838593
位置对象一个 JSON 对象,表示创建该 Post 时所在的 X“Place”。这是由 X 平台直接传递的对象。

参见
location 对象
Twitter_实体对象X 的 entities 对象’来自 X 的数据格式中的 entities 对象,包含 urls、mentions 和 hashtags 的列表。请在此参考 X 关于 Entities 的文档。请注意,在转发(Retweets)中,X 可能会在根级别截断其提取的实体值。因此,对于转发,您的应用应查看 object.twitter_entities,以确保您使用未截断的值。

参见 Twitter_entities 对象详情
X(原 Twitter)_延长_实体对象来自 X 的对象’的原生数据格式,包含:“媒体”。对于任何包含 twitter_entities 对象且其“media”字段有数据的 Post,都将出现此对象_entities 对象在以下位置包含 data:“媒体”字段;如果该 Post 中存在多张照片,将会包含所有照片。请注意,对于含多张照片的 Post,应在此处获取媒体信息。

多张照片在“media”数组中表示为由逗号分隔的 JSON 对象”媒体”数组。

请参阅twitter_extended_entities 对象详细信息
Gnip对象一个添加到活动负载中的对象,用于指示匹配规则,并基于在流或产品中启用的增强处理,附加经丰富的data。

请参阅GNIP 对象详情
编辑_历史记录对象用于标示某个 Post 所有版本的唯一标识符。对于未编辑的 Post,仅有一个 ID。对于有编辑历史的 Post,将有多个 ID,按升序排列以对应编辑顺序,数组最后一个元素为最新版本。

可以使用这些 Post 的 id 来复原并查看该 Post 的历史版本。

示例:

编辑_历史记录”:
“初始值_Tweet_id”:“1283764123”
“编辑_Tweet_ids”: [“1283764123”,“1394263866”]
编辑_控件对象如果存在,表示该 Post 剩余的可编辑时长和剩余编辑次数。Post 仅在创建后前 30 分钟内可编辑,且最多可编辑五次。

可以使用 Post 的 id 来恢复并查看该 Post 的早期版本。

示例:

“编辑_控件”:
“可编辑的_直至_ms”:123
“编辑记录_剩余”: 3
可编辑的布尔如果存在,表示一条 Post 在发布时是否符合编辑资格。此字段为静态字段,不会因 Post 达到可编辑的时间限制或编辑次数上限而从 True 切换为 False。‘当 Post 达到可编辑的时间上限或最大编辑次数时,t 会从 True 切换为 False。以下 Post 功能将导致该字段为 False:

- 已推广的 Post
- 帖子含有投票
- Post 是对他人线程的回复
- Post 为转推(注意:引用推文可进行编辑)
- Post 为静默投放
- 社区 Post
- 超级关注 Post
- 协作型 Post

其他 Post 属性

属性类型描述
twitter_langstring
favoritesCountint可为空。 表示该 Post 被 X 用户点赞的大致次数。

“favoritesCount”: 298
retweetCountint该 Post 被转发的次数。示例:

“retweetCount”: 153

已弃用的属性

字段类型描述
geoobject创建该 Post 时的点位坐标。
twitter_filter_levelstring为避免破坏性变更而保留的弃用字段

嵌套的 Post 活动对象

在多种情况下,一个 Post 对象会包含其他嵌套的 Post。 如果你在处理嵌套对象,那么该 JSON 载荷将包含多个对象,并且每个 Post 对象可能还包含其各自的对象。根级对象会包含所执行操作的类型信息,即它是转发(Retweet)还是引用(Quote Tweet),并且还可能包含一个用于描述所分享“原始”Post 的对象。扩展的 Post 将包含一个嵌套的扩展对象,其内容超过 140 个字符,这是在 2017 年更新时为避免引入破坏性变更而采用的方案。下面描述每个嵌套对象字典。 转发(Retweets) 转发的活动流格式包含一个嵌套对象,其类型为 “activity”,动词为 “note”,用于表示被转发的原始 Post。
{
	"id": "tag:search.x.com,2005:222222222222",
	"objectType": "activity",
	"verb": "share",
	"body": "RT @TheOriginalTweeter: Coffee and art ☕️",
	"actor": {
		"displayName": "TheRetweeter"
	},
	"object": {
		"id": "tag:search.x.com,2005:11111111111",
		"objectType": "activity",
		"verb": "post",
		"body": "Coffee and art ☕️",
		"actor": {
			"displayName": "TheOriginalTweeter"
		},
		"object": {
			"objectType": "note",
			"id": "object:search.x.com,2005:11111111111",
			"summary": "Coffee and art ☕️",
			"link": "http://x.com/originaltweeter/statuses/11111111111",
			"postedTime": "2020-12-04T11:00:01.000Z"
		},
		"twitter_entities": {},
		"twitter_extended_entities": {}
	},
	"twitter_entities": {},
	"twitter_extended_entities": {},
	"gnip": {}
}
X 引用状态 Activity Streams 格式中嵌入的引用 Tweet { "id": "tag:search.x.com,2005:222222222222", "objectType": "activity", "verb": "post", "body": "Quoting a Tweet: https://t.co/mxiFJ59FlB", "actor": { "displayName": "TheQuoter2" }, "object": { "objectType": "note", "id": "object:search.x.com,2005:111111111", "summary": "https://t.co/mxiFJ59FlB" }, "twitter_entities": {}, "twitter_extended_entities": {}, "gnip": {}, "twitter_quoted_status": { "id": "tag:search.x.com,2005:111111111", "objectType": "activity", "verb": "post", "body": "console.log('Happy birthday, JavaScript!');", "actor": { "displayName": "TheOriginalTweeter" }, "object": { "objectType": "note", "id": "object:search.x.com,2005:111111111" }, "twitter_entities": {} } } 被转推的引用 Tweet:
    {
    	"id": "tag:search.x.com,2005:1293612267087384577",
    	"objectType": "activity",
    	"verb": "share",
    	"postedTime": "2020-08-12T18:16:13.000Z",
    	"generator": {},
    	"provider": {},
    	"link": "http://x.com/XDevelopers/statuses/1293612267087384577",
    	"body": "RT @compston: So excited to make this first set of endpoints available - many more to come before we're done. The @XDevelopers #DevRel team…",
    	"actor": {},
    	"object": {},
    	"favoritesCount": 0,
    	"twitter_entities": {},
    	"twitter_lang": "en",
    	"retweetCount": 13,
    	"gnip": {},
    	"twitter_filter_level": "low",
    	"twitter_quoted_status": {}
    }

长对象

extended_tweet 的 Activity Streams 格式
{
  "id": "tag:search.x.com,2005:1050118621198921728",
  "objectType": "activity",
  "verb": "post",
  "postedTime": "2018-10-10T20:19:24.000Z",
  "generator": {
    "displayName": "X Web Client",
    "link": "http://x.com"
  },
  "provider": {
    "objectType": "service",
    "displayName": "X",
    "link": "http://www.x.com"
  },
  "link": "http://x.com/API/statuses/1050118621198921728",
  "body": "为了给表达留出更多空间,我们现在将所有表情符号一视同仁——包括带有性别‍‍‍ ‍‍和肤色… https://t.co/MkGjXf9aXm",
  "long_object": {
    "body": "为了给表达留出更多空间,我们现在将所有表情符号一视同仁——包括带有性别‍‍‍ ‍‍和肤色修饰符的表情 👍🏻👍🏽👍🏿。此变更现已体现在我们的开源库 Twitter-Text 中。\n\n正在使用 Twitter-Text?详情请参阅论坛帖子:https://t.co/Nx1XZmRCXA",
    "display_text_range": [
      0,
      277
    ],
    "twitter_entities": {see twitter_entities object},
  "actor": {see actor object},
  "object": {
    "objectType": "note",
    "id": "object:search.x.com,2005:1050118621198921728",
    "summary": "为了给表达留出更多空间,我们现在将所有表情符号一视同仁——包括带有性别‍‍‍ ‍‍和肤色… https://t.co/MkGjXf9aXm",
    "link": "http://x.com/API/statuses/1050118621198921728",
    "postedTime": "2018-10-10T20:19:24.000Z"
  },
  "favoritesCount": 298,
  "twitter_entities": {see twitter_entities object},
  "twitter_lang": "en",
  "retweetCount": 153,
  "gnip": {see gnip object},
  "twitter_filter_level": "low"
}

Actor 对象

Actor 对象包含用于描述创建该活动的 X 用户的 X 用户账户元数据。

数据字典

属性类型描述
objectTypestring”objectType”: “person”
idstring此作者的唯一标识符的字符串表示形式。示例:

“id:x.com:2244994945”
linkhttp://www.x.com/XDeveloeprs
displayNameString用户自定义的名称。不一定是真实姓名。通常限制为 50 个字符,但可能会变化。示例:

“displayName”: “XDevelopers”
preferredUsernamestring此用户用于标识自己的屏幕名称、用户名或别名。具有唯一性但可能会更改。请尽可能使用 id 作为用户标识符。通常最多为 15 个字符,但某些历史账户可能存在更长的名称。示例:

“preferredUsername”: “XDevelopers”
locationobject** “location”:

“objectType”:** “place”,

“displayName”: “127.0.0.1”

** }**
linksarray可为空。用户在其个人资料中提供的 URL。示例:

** “links”: [

{

“href”:** “https://developer.x.com/en/community,

“rel”: “me”

** }

]**
summarystring可为空。用户自定义的 UTF-8 字符串,用于描述其账户。示例:

“summary”: “The voice of the #XDevelopers team…“
protectedBoolean当为 true 时,表示此用户已选择保护其帖子。请参阅关于公开和受保护的帖子。示例:

“protected”: true
verifiedBoolean当为 true 时,表示该用户拥有已验证账户。请参阅已验证账户。示例:

“verified”: false
followersCountInt此账户当前的关注者数量。在某些特殊情况下,此字段将暂时显示为 “0”。示例:

“followers_count”: 21
friendsCountInt此账户正在关注的用户数量(即其”正在关注”)。在某些特殊情况下,此字段将暂时显示为 “0”。示例:

“friends_count”: 32
listedCountInt此用户所属的公开列表数量。示例:

“listed_count”: 9274
favoritesCountInt此用户在账户生命周期内点赞的帖子数量。字段名称使用英式拼写是出于历史原因。示例:

“favourites_count”: 13
statusesCountInt用户发布的帖子数量(包括转帖)。示例:

“statuses_count”: 42
postedTimedate用户账户在 X 上创建的 UTC 日期时间。示例:

“postedTime”: “2013-12-14T04:35:55.036Z”
imagestring指向用户个人资料图片的基于 HTTPS 的 URL。示例:

“image”:https://pbs.twimg.com/profile&#95;images/1283786620521652229/lEODkLTh&#95;normal.jpg

不再支持(已弃用)的属性

字段类型说明
utcOffsetnull值将设为 null。仍可通过 GET account/settings 获取
twitterTimeZonenull值将设为 null。仍可通过 GET account/settings 的 tzinfo_name 获取
languagesnull值将设为 null。仍可通过 GET account/settings 的 language 获取

示例:

			"actor": {
        "objectType": "person",
        "id": "id:twitter.com:2244994945",
        "link": "http://www.x.com/XDevelopers",
        "displayName": "X Dev",
        "postedTime": "2013-12-14T04:35:55.036Z",
        "image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
        "summary": "#XDevelopers 团队的官方账号,为您提供 #XAPI 相关的更新、资讯和活动信息。",
        "friendsCount": 2039,
        "followersCount": 512197,
        "listedCount": 1662,
        "statusesCount": 3632,
        "twitterTimeZone": null,
        "verified": true,
        "utcOffset": null,
        "preferredUsername": "XDevelopers",
        "languages": [],
        "links": [
          {
            "href": "https://developer.x.com/en/community",
            "rel": "me"
          }
        ],
        "location": {
          "objectType": "place",
          "displayName": "127.0.0.1"
        },
        "favoritesCount": 2147
      }
"actor": {
    "objectType": "person",
    "id": "id:twitter.com:6253282",
    "link": "http://www.x.com/API",
    "displayName": "X API",
    "postedTime": "2007-05-23T06:01:13.000Z",
    "image": "https://pbs.twimg.com/profile_images/942858479592554497/BbazLO9L_normal.jpg",
    "summary": "发布有关变更和服务问题的内容。关注 @XDevelopers 了解更多。",
    "friendsCount": 39,
    "followersCount": 6054164,
    "listedCount": 12285,
    "statusesCount": 3689,
    "twitterTimeZone": null,
    "verified": true,
    "utcOffset": null,
    "preferredUsername": "API",
    "languages": [

    ],
    "links": [
      {
        "href": "https://developer.x.com",
        "rel": "me"
      }
    ],
    "favoritesCount": 4
  }

位置对象

位置对象可以存在于 X 账户级别的 actor 对象中,或存在于 gnip 对象 的 profileLocations 对象中。位置对象的类型为 place,并且可以包含名称、地址或地理坐标。位置对象与原生增强格式中的 Geo 类似。

位置数据字典

字段类型描述
objectTypestring有关更详细的信息,请参见此处。示例:

“objectType”: “place”
displayNamestring位置的完整名称。

“displayName”: “United States”
namestring来自 X 的 place JSON 格式的地点名称。
linkstring指向该地点在 X 中完整 JSON 表示的链接。

“link”:https://api.x.com/1.1/geo/id/27c45d804c777999.json
geoobject来自 X 的地理坐标对象,可能是多边形或点。

参见 geo
countryCodeString表示包含该地点的国家/地区的两字母国家代码。示例:

“countryCode”: “US”
countryString包含该地点的国家/地区名称。示例:

“country”: “United States”

profileLocations 衍生对象

字段类型描述
addressobject位于 gnip 对象 中的 profileLocation 的 location 对象内。由 profile geo 丰富 推断的地址,粒度可能不同。

“address”: {

**          “country”: “United States”,

          “countryCode”: “US”,

          “locality”: “Providence”,

          “region”: “Rhode Island”,

          “subRegion”: “Providence County”

        }**
geoobject位于 gnip 对象 中的 profileLocation 的 location 对象内。由 profile geo 丰富 推断的位置重心坐标。

“geo”: {

**          “coordinates”: [

-98.5
,

39.76

          ],

          “type”: “point”

        }**
示例
	"location": {
    "objectType": "place",
    "displayName": "堪萨斯州,美国",
    "name": "堪萨斯州",
    "country_code": "美国",
    "twitter_country_code": "US",
    "twitter_place_type": "admin",
    "link": "https://api.x.com/1.1/geo/id/27c45d804c777999.json",
    "geo": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -102.051769,
            36.99311
          ],
          [
            -102.051769,
            40.003282
          ],
          [
            -94.588081,
            40.003282
          ],
          [
            -94.588081,
            36.99311
          ]
        ]
      ]
    }
    "location": {
      "objectType": "place",
      "displayName": "美国加利福尼亚州"
    }

X 实体对象

对于 Activity Streams 格式,twitter_entities 的格式和数据字典与原生增强格式中的 entities 对象相同。

示例:

"twitter_entities": {
	"hashtags": [{
		"text": "API",
		"indices": [
			228,
			239
		]
	}],
	"urls": [{
		"url": "https://t.co/r6z6CI7kEy",
		"expanded_url": "https://devcommunity.x.com/t/retiring-labs-v2-recent-search-and-hide-replies/145795",
		"display_url": "devcommunity.com/t/retiring-lab…",
		"indices": [
			250,
			273
		]
	}],
	"user_mentions": [],
	"symbols": []
}

X 扩展实体对象

对于 Activity Streams 格式,twitter_extended_entities 的格式和数据字典与原生增强格式中的 extended_entities 对象 相同。

示例:

"twitter_extended_entities":{
	"media": [{
		"id": 1293565706408038400,
		"id_str": "1293565706408038401",
		"indices": [
			219,
			242
		],
		"additional_media_info": {
			"monetizable": false
		},
		"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
		"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
		"url": "https://t.co/KaFSbjWUA8",
		"display_url": "pic.x.com/KaFSbjWUA8",
		"expanded_url": "https://x.com/XDevelopers/status/1293593516040269825/video/1",
		"type": "video",
		"video_info": {
			"aspect_ratio": [
				16,
				9
			],
			"duration_millis": 34875,
			"variants": [{
					"bitrate": 256000,
					"content_type": "video/mp4",
					"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/480x270/Fg9lnGGsITO0uq2K.mp4?tag=10"
				},
				{
					"bitrate": 832000,
					"content_type": "video/mp4",
					"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/640x360/-crbtZE4y8vKN_uF.mp4?tag=10"
				},
				{
					"content_type": "application/x-mpegURL",
					"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/pl/OvIqQojosF6sMIHR.m3u8?tag=10"
				},
				{
					"bitrate": 2176000,
					"content_type": "video/mp4",
					"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/1280x720/xkxyb-VPVY4OI0j9.mp4?tag=10"
				}
			]
		},
		"sizes": {
			"thumb": {
				"w": 150,
				"h": 150,
				"resize": "crop"
			},
			"medium": {
				"w": 1200,
				"h": 675,
				"resize": "fit"
			},
			"small": {
				"w": 680,
				"h": 383,
				"resize": "fit"
			},
			"large": {
				"w": 1280,
				"h": 720,
				"resize": "fit"
			}
		}
	}]
}

Gnip 对象

在 Activity Streams 格式中,gnip 对象包含由启用的富化处理添加的元数据,以及与该活动匹配的规则指示信息。

数据字典

字段类型说明
matching_rulesarray包含一个匹配规则对象的数组,指示该活动所匹配到的规则。
“matching_rules”: [

**      {

        “tag”: null,

“id”:** 1026514022567358500**,

“id_str”:** “1026514022567358464”

**      }

    ]**
urlsarray包含活动中的链接数组,以及用于“URL 展开解析”增强的扩展 URL 元数据

**    “urls”: [

      {

“url”:** “https://t.co/tGQqNxxyhU,

“expanded_url”:https://www.youtube.com/channel/UCwUxW2CV2p5mzjMBqvqLzJA,

“expanded_status”: 200**,

“expanded_url_title”:** “Birdys Daughter”,

“expanded_url_description”: “Premium, single-origin, handpicked Jamaica Blue Mountain Coffee”

**      }

    ]**
profileLocationsarray of location objects包含来自 Profile Geo(资料地理)增强的派生位置对象

**    “profileLocations”: [

      {

        “address”: {

“country”:** “Canada”,

“countryCode”: “CA”,

“locality”: “Toronto”,

“region”: “Ontario”

**        },

“displayName”:** “Toronto, Ontario, Canada”,

**        “geo”: {

          “coordinates”: [

-79.4163
,

43.70011

          ],

“type”:** “point”

**        },

“objectType”:** “place”

**      }

    ]

  }**

示例:

	"gnip": {
    "matching_rules": [
      {
        "tag": null
      }
    ],
    "urls": [
      {
        "url": "https://t.co/Nx1XZmRCXA",
        "expanded_url": "https://devcommunity.x.com/t/new-update-to-the-twitter-text-library-emoji-character-count/114607",
        "expanded_status": 200,
        "expanded_url_title": null,
        "expanded_url_description": null
      }
    ]
  }

活动流负载示例

Post 活动
{
	"id": "tag:search.x.com,2005:1307025659294674945",
	"objectType": "activity",
	"verb": "post",
	"postedTime": "2020-09-18T18:36:15.000Z",
	"generator": {
		"displayName": "X Web App",
		"link": "https://mobile.x.com"
	},
	"provider": {
		"objectType": "service",
		"displayName": "X",
		"link": "http://www.x.com"
	},
	"link": "http://x.com/XDevelopers/statuses/1307025659294674945",
	"body": "这篇文章介绍了新版 Tweet payload v2 的更新内容 https://t.co/oeF3ZHeKQQ",
	"actor": {
		"objectType": "person",
		"id": "id:twitter.com:2244994945",
		"link": "http://www.x.com/XDevelopers",
		"displayName": "X Dev",
		"postedTime": "2013-12-14T04:35:55.036Z",
		"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"summary": "#XDevelopers 团队的官方账号,为您提供 #XAPI 相关的更新、资讯和活动信息。",
		"friendsCount": 2038,
		"followersCount": 512292,
		"listedCount": 1666,
		"statusesCount": 3634,
		"twitterTimeZone": null,
		"verified": true,
		"utcOffset": null,
		"preferredUsername": "XDevelopers",
		"languages": [],
		"links": [{
			"href": "https://developer.x.com/en/community",
			"rel": "me"
		}],
		"location": {
			"objectType": "place",
			"displayName": "127.0.0.1"
		},
		"favoritesCount": 2147
	},
	"object": {
		"objectType": "note",
		"id": "object:search.x.com,2005:1307025659294674945",
		"summary": "这篇文章介绍了新版 Tweet payload v2 的更新内容 https://t.co/oeF3ZHeKQQ",
		"link": "http://x.com/XDevelopers/statuses/1307025659294674945",
		"postedTime": "2020-09-18T18:36:15.000Z"
	},
	"inReplyTo": {
		"link": "http://x.com/XDevelopers/statuses/1304102743196356610"
	},
	"favoritesCount": 70,
	"twitter_entities": {
		"hashtags": [],
		"urls": [{
			"url": "https://t.co/oeF3ZHeKQQ",
			"expanded_url": "https://dev.to/twitterdev/understanding-the-new-tweet-payload-in-the-twitter-api-v2-1fg5",
			"display_url": "dev.to/twitterdev/und…",
			"indices": [
				74,
				97
			]
		}],
		"user_mentions": [],
		"symbols": []
	},
	"twitter_lang": "en",
	"retweetCount": 11,
	"gnip": {
		"matching_rules": [{
			"tag": null
		}],
		"urls": [{
			"url": "https://t.co/oeF3ZHeKQQ",
			"expanded_url": "https://dev.to/twitterdev/understanding-the-new-tweet-payload-in-the-twitter-api-v2-1fg5",
			"expanded_status": 200,
			"expanded_url_title": "了解 X API v2 中的新版 Tweet payload",
			"expanded_url_description": "X 最近发布了全新的 X API v2,从底层重构以提供新功能...",
		}]
	},
	"twitter_filter_level": "low"
}
回复 Post 活动
{
	"id": "tag:search.x.com,2005:1296887316556980230",
	"objectType": "activity",
	"verb": "post",
	"postedTime": "2020-08-21T19:10:05.000Z",
	"generator": {
		"displayName": "X 网页应用",
		"link": "https://mobile.x.com"
	},
	"provider": {
		"objectType": "service",
		"displayName": "X",
		"link": "http://www.x.com"
	},
	"link": "http://x.com/XDevelopers/statuses/1296887316556980230",
	"body": "了解 @PennMedCDH 如何使用 X 数据分析 COVID-19 健康危机 📊\n\nhttps://t.co/1tdA8uDWes",
	"actor": {
		"objectType": "person",
		"id": "id:twitter.com:2244994945",
		"link": "http://www.x.com/XDevelopers",
		"displayName": "X 开发者",
		"postedTime": "2013-12-14T04:35:55.036Z",
		"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"summary": "#XDevelopers 团队的官方账号,为您提供 #API 相关的更新、新闻和活动信息。",
		"friendsCount": 2038,
		"followersCount": 512292,
		"listedCount": 1666,
		"statusesCount": 3634,
		"twitterTimeZone": null,
		"verified": true,
		"utcOffset": null,
		"preferredUsername": "XDevelopers",
		"languages": [],
		"links": [{
			"href": "https://developer.x.com/en/community",
			"rel": "me"
		}],
		"location": {
			"objectType": "place",
			"displayName": "127.0.0.1"
		},
		"favoritesCount": 2147
	},
	"object": {
		"objectType": "note",
		"id": "object:search.x.com,2005:1296887316556980230",
		"summary": "了解 @PennMedCDH 如何使用 X 数据分析 COVID-19 健康危机 📊\n\nhttps://t.co/1tdA8uDWes",
		"link": "http://x.com/XDevelopers/statuses/1296887316556980230",
		"postedTime": "2020-08-21T19:10:05.000Z"
	},
	"inReplyTo": {
		"link": "http://x.com/XDevelopers/statuses/1296887091901718529"
	},
	"favoritesCount": 26,
	"twitter_entities": {
		"hashtags": [],
		"urls": [{
			"url": "https://t.co/1tdA8uDWes",
			"expanded_url": "https://developer.x.com/en/use-cases/success-stories/penn",
			"display_url": "developer.x.com/en/use-cases/s…",
			"indices": [
				87,
				110
			]
		}],
		"user_mentions": [{
			"screen_name": "PennMedCDH",
			"name": "Penn Med CDH",
			"id": 1615654896,
			"id_str": "1615654896",
			"indices": [
				8,
				19
			]
		}],
		"symbols": []
	},
	"twitter_lang": "en",
	"retweetCount": 9,
	"gnip": {
		"matching_rules": [{
			"tag": null
		}],
		"urls": [{
			"url": "https://t.co/1tdA8uDWes",
			"expanded_url": "https://developer.x.com/en/use-cases/success-stories/penn",
			"expanded_status": 200,
			"expanded_url_title": "宾夕法尼亚大学医学院数字健康中心",
			"expanded_url_description": "宾夕法尼亚大学医学院数字健康中心创建了一个 COVID-19 X 地图,包含详细展示情绪分析、症状报告、各州数据细分以及 COVID-19 疫情边境数据的图表。此外,他们的 Penn Med With You 计划利用来自 X 的区域汇总信息为其网站和短信服务提供数据支持。该服务通过这些信息传播相关且及时的资源。"
		}]
	},
	"twitter_filter_level": "low"
}
包含 long_object 的 Post 活动
{
	"id": "tag:search.x.com,2005:1296121314218897408",
	"objectType": "activity",
	"verb": "post",
	"postedTime": "2020-08-19T16:26:16.000Z",
	"generator": {
		"displayName": "X Web App",
		"link": "https://mobile.x.com"
	},
	"provider": {
		"objectType": "service",
		"displayName": "X",
		"link": "http://www.x.com"
	},
	"link": "http://x.com/XDevelopers/statuses/1296121314218897408",
	"body": "隐藏回复端点今日上线!\n\n开发者可以隐藏 Post 的回复 - 这是开发者帮助改善公共对话健康的关键方式… https://t.co/VyfXs1RTXn",
	"long_object": {
		"body": "隐藏回复端点今日上线!\n\n开发者可以隐藏 Post 的回复 - 这是开发者使用 #XAPI 帮助改善公共对话健康的关键方式。\n\nhttps://t.co/khXhTurm9x",
		"display_text_range": [
			0,
			215
		],
		"twitter_entities": {
			"hashtags": [{
				"text": "API",
				"indices": [
					178,
					189
				]
			}],
			"urls": [{
				"url": "https://t.co/khXhTurm9x",
				"expanded_url": "https://devcommunity.x.com/t/hide-replies-now-available-in-the-new-twitter-api/140996",
				"display_url": "devcommunity.com/t/hide-replies…",
				"indices": [
					192,
					215
				]
			}],
			"user_mentions": [],
			"symbols": []
		}
	},
	"actor": {
		"objectType": "person",
		"id": "id:twitter.com:2244994945",
		"link": "http://www.x.com/XDevelopers",
		"displayName": "X Dev",
		"postedTime": "2013-12-14T04:35:55.036Z",
		"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"summary": "#XDevelopers 团队的官方声音,您获取 #XAPI 相关更新、新闻和活动的官方来源。",
		"friendsCount": 2038,
		"followersCount": 512292,
		"listedCount": 1666,
		"statusesCount": 3634,
		"twitterTimeZone": null,
		"verified": true,
		"utcOffset": null,
		"preferredUsername": "XDevelopers",
		"languages": [],
		"links": [{
			"href": "https://developer.x.com/en/community",
			"rel": "me"
		}],
		"location": {
			"objectType": "place",
			"displayName": "127.0.0.1"
		},
		"favoritesCount": 2147
	},
	"object": {
		"objectType": "note",
		"id": "object:search.x.com,2005:1296121314218897408",
		"summary": "隐藏回复端点今日上线!\n\n开发者可以隐藏 Post 的回复 - 这是开发者帮助改善公共对话健康的关键方式… https://t.co/VyfXs1RTXn",
		"link": "http://x.com/XDevelopers/statuses/1296121314218897408",
		"postedTime": "2020-08-19T16:26:16.000Z"
	},
	"favoritesCount": 172,
	"twitter_entities": {
		"hashtags": [],
		"urls": [{
			"url": "https://t.co/VyfXs1RTXn",
			"expanded_url": "https://x.com/i/web/status/1296121314218897408",
			"display_url": "x.com/i/web/status/1…",
			"indices": [
				117,
				140
			]
		}],
		"user_mentions": [],
		"symbols": []
	},
	"twitter_lang": "en",
	"retweetCount": 54,
	"gnip": {
		"matching_rules": [{
			"tag": null
		}],
		"urls": [{
			"url": "https://t.co/khXhTurm9x",
			"expanded_url": "https://devcommunity.x.com/t/hide-replies-now-available-in-the-new-twitter-api/140996",
			"expanded_status": 200,
			"expanded_url_title": "新版 X API 现已提供隐藏回复功能",
			"expanded_url_description": "今天,我们很高兴宣布隐藏回复端点在新版 X API 中正式推出。隐藏回复端点允许您构建工具,帮助用户隐藏或取消隐藏其 Post 的回复。用户管理回复的原因有很多,包括减少对辱骂性、干扰性、误导性评论的关注,或使对话更具吸引力。通过此端点,您可以构建工具,帮助 X 上的用户更快、更便捷地隐藏或取消隐藏回复..."
		}]
	},
	"twitter_filter_level": "low"
}
使用 twitter_extended_entities 的 Post 活动情况
{
	"id": "tag:search.x.com,2005:1293593516040269825",
	"objectType": "activity",
	"verb": "post",
	"postedTime": "2020-08-12T17:01:42.000Z",
	"generator": {
		"displayName": "X 网页应用",
		"link": "https://mobile.x.com"
	},
	"provider": {
		"objectType": "service",
		"displayName": "X",
		"link": "http://www.x.com"
	},
	"link": "http://x.com/XDevelopers/statuses/1293593516040269825",
	"body": "终于来了!🥁 向全新的 #XAPI 问好。\n\n我们正在从零开始重建 X API v2,以更好地… https://t.co/UeCndQGMjx",
	"long_object": {
		"body": "终于来了!🥁 向全新的 #XAPI 问好。\n\n我们正在从零开始重建 X API v2,以更好地服务我们的开发者社区。今天的发布仅仅是个开始。\n\nhttps://t.co/32VrwpGaJw https://t.co/KaFSbjWUA8",
		"display_text_range": [
			0,
			218
		],
		"twitter_entities": {
			"hashtags": [{
				"text": "API",
				"indices": [
					42,
					53
				]
			}],
			"urls": [{
				"url": "https://t.co/32VrwpGaJw",
				"expanded_url": "https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html",
				"display_url": "blog.x.com/developer/en_u…",
				"indices": [
					195,
					218
				]
			}],
			"user_mentions": [],
			"symbols": [],
			"media": [{
				"id": 1293565706408038400,
				"id_str": "1293565706408038401",
				"indices": [
					219,
					242
				],
				"additional_media_info": {
					"monetizable": false
				},
				"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"url": "https://t.co/KaFSbjWUA8",
				"display_url": "pic.x.com/KaFSbjWUA8",
				"expanded_url": "https://x.com/XDevelopers/status/1293593516040269825/video/1",
				"type": "video",
				"video_info": {
					"aspect_ratio": [
						16,
						9
					],
					"duration_millis": 34875,
					"variants": [{
							"bitrate": 256000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/480x270/Fg9lnGGsITO0uq2K.mp4?tag=10"
						},
						{
							"bitrate": 832000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/640x360/-crbtZE4y8vKN_uF.mp4?tag=10"
						},
						{
							"content_type": "application/x-mpegURL",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/pl/OvIqQojosF6sMIHR.m3u8?tag=10"
						},
						{
							"bitrate": 2176000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/1280x720/xkxyb-VPVY4OI0j9.mp4?tag=10"
						}
					]
				},
				"sizes": {
					"thumb": {
						"w": 150,
						"h": 150,
						"resize": "crop"
					},
					"medium": {
						"w": 1200,
						"h": 675,
						"resize": "fit"
					},
					"small": {
						"w": 680,
						"h": 383,
						"resize": "fit"
					},
					"large": {
						"w": 1280,
						"h": 720,
						"resize": "fit"
					}
				}
			}]
		},
		"twitter_extended_entities": {
			"media": [{
				"id": 1293565706408038400,
				"id_str": "1293565706408038401",
				"indices": [
					219,
					242
				],
				"additional_media_info": {
					"monetizable": false
				},
				"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1293565706408038401/pu/img/66P2dvbU4a02jYbV.jpg",
				"url": "https://t.co/KaFSbjWUA8",
				"display_url": "pic.x.com/KaFSbjWUA8",
				"expanded_url": "https://x.com/XDevelopers/status/1293593516040269825/video/1",
				"type": "video",
				"video_info": {
					"aspect_ratio": [
						16,
						9
					],
					"duration_millis": 34875,
					"variants": [{
							"bitrate": 256000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/480x270/Fg9lnGGsITO0uq2K.mp4?tag=10"
						},
						{
							"bitrate": 832000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/640x360/-crbtZE4y8vKN_uF.mp4?tag=10"
						},
						{
							"content_type": "application/x-mpegURL",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/pl/OvIqQojosF6sMIHR.m3u8?tag=10"
						},
						{
							"bitrate": 2176000,
							"content_type": "video/mp4",
							"url": "https://video.twimg.com/ext_tw_video/1293565706408038401/pu/vid/1280x720/xkxyb-VPVY4OI0j9.mp4?tag=10"
						}
					]
				},
				"sizes": {
					"thumb": {
						"w": 150,
						"h": 150,
						"resize": "crop"
					},
					"medium": {
						"w": 1200,
						"h": 675,
						"resize": "fit"
					},
					"small": {
						"w": 680,
						"h": 383,
						"resize": "fit"
					},
					"large": {
						"w": 1280,
						"h": 720,
						"resize": "fit"
					}
				}
			}]
		}
	},
	"display_text_range": [
		0,
		140
	],
	"actor": {
		"objectType": "person",
		"id": "id:twitter.com:2244994945",
		"link": "http://www.x.com/XDevelopers",
		"displayName": "X Dev",
		"postedTime": "2013-12-14T04:35:55.036Z",
		"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"summary": "#XDevelopers 团队的官方声音,您获取 #TwitterAPI 相关更新、新闻和活动的官方来源。",
		"friendsCount": 2038,
		"followersCount": 512292,
		"listedCount": 1666,
		"statusesCount": 3634,
		"twitterTimeZone": null,
		"verified": true,
		"utcOffset": null,
		"preferredUsername": "XDevelopers",
		"languages": [],
		"links": [{
			"href": "https://developer.x.com/en/community",
			"rel": "me"
		}],
		"location": {
			"objectType": "place",
			"displayName": "127.0.0.1"
		},
		"favoritesCount": 2147
	},
	"object": {
		"objectType": "note",
		"id": "object:search.x.com,2005:1293593516040269825",
		"summary": "终于来了!🥁向全新的 #API 问好。\n\n我们正在从零开始重建 X API v2,以便… https://t.co/UeCndQGMjx",
		"link": "http://x.com/XDevelopers/statuses/1293593516040269825",
		"postedTime": "2020-08-12T17:01:42.000Z"
	},
	"favoritesCount": 2844,
	"twitter_entities": {
		"hashtags": [{
			"text": "API",
			"indices": [
				42,
				53
			]
		}],
		"urls": [{
			"url": "https://t.co/UeCndQGMjx",
			"expanded_url": "https://x.com/i/web/status/1293593516040269825",
			"display_url": "x.com/i/web/status/1…",
			"indices": [
				117,
				140
			]
		}],
		"user_mentions": [],
		"symbols": []
	},
	"twitter_lang": "en",
	"retweetCount": 958,
	"gnip": {
		"matching_rules": [{
			"tag": null
		}],
		"urls": [{
			"url": "https://t.co/32VrwpGaJw",
			"expanded_url": "https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html",
			"expanded_status": 200,
			"expanded_url_title": "介绍全新升级的 X API",
			"expanded_url_description": "介绍全新的 X API——从零开始重建,以更快速度交付新功能,帮助开发者让全世界连接到 X 上正在进行的公共对话。"
		}]
	},
	"twitter_filter_level": "low"
}
转推活动
{
	"id": "tag:search.x.com,2005:1229851574555508737",
	"objectType": "activity",
	"verb": "share",
	"postedTime": "2020-02-18T19:33:59.000Z",
	"generator": {
		"displayName": "X 网页应用",
		"link": "https://mobile.x.com"
	},
	"provider": {
		"objectType": "service",
		"displayName": "X",
		"link": "http://www.x.com"
	},
	"link": "http://x.com/XDevelopers/statuses/1229851574555508737",
	"body": "RT @suhemparack: 我使用 APL 为 X 构建了一个 Alexa 技能,可以在 echo show 上查看帖子和趋势!\n\n点击查看…",
	"actor": {
		"objectType": "person",
		"id": "id:twitter.com:2244994945",
		"link": "http://www.x.com/XDevelopers",
		"displayName": "X Dev",
		"postedTime": "2013-12-14T04:35:55.036Z",
		"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"summary": "#XDevelopers 团队的官方账号,为您提供 #XAPI 相关的更新、资讯和活动信息。",
		"friendsCount": 2038,
		"followersCount": 512292,
		"listedCount": 1666,
		"statusesCount": 3634,
		"twitterTimeZone": null,
		"verified": true,
		"utcOffset": null,
		"preferredUsername": "XDevelopers",
		"languages": [],
		"links": [{
			"href": "https://developer.x.com/en/community",
			"rel": "me"
		}],
		"location": {
			"objectType": "place",
			"displayName": "127.0.0.1"
		},
		"favoritesCount": 2147
	},
	"object": {
		"id": "tag:search.x.com,2005:1229843515603144704",
		"objectType": "activity",
		"verb": "post",
		"postedTime": "2020-02-18T19:01:58.000Z",
		"generator": {
			"displayName": "X 网页应用",
			"link": "https://mobile.x.com"
		},
		"provider": {
			"objectType": "service",
			"displayName": "X",
			"link": "http://www.x.com"
		},
		"link": "http://x.com/suhemparack/statuses/1229843515603144704",
		"body": "我使用 APL 为 X 构建了一个 Alexa 技能,可以在 echo show 上查看帖子和趋势!\n\n点击查看… https://t.co/RP9NgltX7i",
		"long_object": {
			"body": "我使用 APL 为 X 构建了一个 Alexa 技能,可以在 echo show 上查看帖子和趋势!\n\n点击查看 👇\n\nhttps://t.co/l5J8wq748G",
			"display_text_range": [
				0,
				150
			],
			"twitter_entities": {
				"hashtags": [],
				"urls": [{
					"url": "https://t.co/l5J8wq748G",
					"expanded_url": "https://dev.to/XDevelopers/building-an-alexa-skill-for-twitter-using-alexa-presentation-language-1aj0",
					"display_url": "dev.to/twitterdev/bui…",
					"indices": [
						127,
						150
					]
				}],
				"user_mentions": [],
				"symbols": []
			}
		},
		"actor": {
			"objectType": "person",
			"id": "id:twitter.com:857699969263964161",
			"link": "http://www.x.com/suhemparack",
			"displayName": "Suhem Parack",
			"postedTime": "2017-04-27T20:56:22.883Z",
			"image": "https://pbs.twimg.com/profile_images/1230703695051935747/TbQKe91L_normal.jpg",
			"summary": "@X 学术研究开发者关系。欢迎与我讨论使用 X 数据进行研究。曾任职:Amazon Alexa。仅代表个人观点",
			"friendsCount": 501,
			"followersCount": 732,
			"listedCount": 12,
			"statusesCount": 458,
			"twitterTimeZone": null,
			"verified": false,
			"utcOffset": null,
			"preferredUsername": "suhemparack",
			"languages": [],
			"links": [{
				"href": "https://developer.x.com",
				"rel": "me"
			}],
			"location": {
				"objectType": "place",
				"displayName": "西雅图,华盛顿州"
			},
			"favoritesCount": 358
		},
		"object": {
			"objectType": "note",
			"id": "object:search.x.com,2005:1229843515603144704",
			"summary": "我使用 APL 为 X 构建了一个 Alexa 技能,可以在 echo show 上查看帖子和趋势!\n\n点击查看… https://t.co/RP9NgltX7i",
			"link": "http://x.com/suhemparack/statuses/1229843515603144704",
			"postedTime": "2020-02-18T19:01:58.000Z"
		},
		"favoritesCount": 71,
		"twitter_entities": {
			"hashtags": [],
			"urls": [{
				"url": "https://t.co/RP9NgltX7i",
				"expanded_url": "https://x.com/i/web/status/1229843515603144704",
				"display_url": "x.com/i/web/status/1…",
				"indices": [
					116,
					139
				]
			}],
			"user_mentions": [],
			"symbols": []
		},
		"twitter_lang": "en",
		"twitter_filter_level": "low"
	},
	"favoritesCount": 0,
	"twitter_entities": {
		"hashtags": [],
		"urls": [],
		"user_mentions": [{
			"screen_name": "suhemparack",
			"name": "Suhem Parack",
			"id": 857699969263964200,
			"id_str": "857699969263964161",
			"indices": [
				3,
				15
			]
		}],
		"symbols": []
	},
	"twitter_lang": "en",
	"retweetCount": 19,
	"gnip": {
		"matching_rules": [{
			"tag": null
		}],
		"urls": [{
			"url": "https://t.co/l5J8wq748G",
			"expanded_url": "https://dev.to/twitterdev/building-an-alexa-skill-for-twitter-using-alexa-presentation-language-1aj0",
			"expanded_status": 200,
			"expanded_url_title": null,
			"expanded_url_description": null
		}]
	},
	"twitter_filter_level": "low"
}
引用 Tweet 动态
{
 	"id": "tag:search.x.com,2005:1328399838128467969",
 	"objectType": "activity",
 	"verb": "post",
 	"postedTime": "2020-11-16T18:09:36.000Z",
 	"generator": {
 		"displayName": "X 网页应用",
 		"link": "https://mobile.x.com"
 	},
 	"provider": {
 		"objectType": "service",
 		"displayName": "X",
 		"link": "http://www.x.com"
 	},
 	"link": "http://x.com/XDevelopers/statuses/1328399838128467969",
 	"body": "按计划,下方提及的 Labs v2 端点现已停用。如有疑问,请在论坛告知我们… https://t.co/ahQvTYaOcZ",
 	"long_object": {
 		"body": "按计划,下方提及的 Labs v2 端点现已停用。如有疑问或需要 X API v2 方面的帮助,请在论坛告知我们!https://t.co/JaxttUMmjX",
 		"display_text_range": [
 			0,
 			166
 		],
 		"twitter_entities": {
 			"hashtags": [],
 			"urls": [{
 				"url": "https://t.co/JaxttUMmjX",
 				"expanded_url": "https://x.com/XDevelopers/status/1327011423252144128",
 				"display_url": "x.com/XDevelopers/sta…",
 				"indices": [
 					167,
 					190
 				]
 			}],
 			"user_mentions": [],
 			"symbols": []
 		}
 	},
 	"display_text_range": [
 		0,
 		140
 	],
 	"actor": {
 		"objectType": "person",
 		"id": "id:twitter.com:2244994945",
 		"link": "http://www.x.com/XDevelopers",
 		"displayName": "X Dev",
 		"postedTime": "2013-12-14T04:35:55.036Z",
 		"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
 		"summary": "#XDevelopers 团队官方账号,为您提供 #XAPI 相关的更新、资讯和活动信息。",
 		"friendsCount": 2038,
 		"followersCount": 512292,
 		"listedCount": 1666,
 		"statusesCount": 3634,
 		"twitterTimeZone": null,
 		"verified": true,
 		"utcOffset": null,
 		"preferredUsername": "XDevelopers",
 		"languages": [],
 		"links": [{
 			"href": "https://developer.x.com/en/community",
 			"rel": "me"
 		}],
 		"location": {
 			"objectType": "place",
 			"displayName": "127.0.0.1"
 		},
 		"favoritesCount": 2147
 	},
 	"object": {
 		"objectType": "note",
 		"id": "object:search.x.com,2005:1328399838128467969",
 		"summary": "按计划,下方提及的 Labs v2 端点现已停用。如有疑问,请在论坛告知我们… https://t.co/ahQvTYaOcZ",
 		"link": "http://x.com/XDevelopers/statuses/1328399838128467969",
 		"postedTime": "2020-11-16T18:09:36.000Z"
 	},
 	"favoritesCount": 29,
 	"twitter_entities": {
 		"hashtags": [],
 		"urls": [{
 			"url": "https://t.co/ahQvTYaOcZ",
 			"expanded_url": "https://x.com/i/web/status/1328399838128467969",
 			"display_url": "x.com/i/web/status/1…",
 			"indices": [
 				117,
 				140
 			]
 		}],
 		"user_mentions": [],
 		"symbols": []
 	},
 	"twitter_lang": "en",
 	"retweetCount": 7,
 	"gnip": {
 		"matching_rules": [{
 			"tag": null
 		}],
 		"urls": [{
 			"url": "https://t.co/r6z6CI7kEy",
 			"expanded_url": "https://devcommunity.x.com/t/retiring-labs-v2-recent-search-and-hide-replies/145795",
 			"expanded_status": 200,
 			"expanded_url_title": "停用 Labs v2 近期搜索和隐藏回复功能",
 			"expanded_url_description": "正如我们在早期访问和隐藏回复公告中所述,以下 X Developer Labs v2 端点将于 11 月 16 日停用。Labs v2 近期搜索 Labs v2 隐藏回复 调用这些端点时,将返回 HTTP 410 状态且不返回任何数据。根据您对 Labs 的反馈,我们已将相应功能整合到 X API v2 中。相关文档可通过以下链接查看。如果您尚未注册 v2 访问权限,请点击此处注册..."
 		}]
 	},
 	"twitter_filter_level": "low",
 	"twitter_quoted_status": {
 		"id": "tag:search.x.com,2005:1327011423252144128",
 		"objectType": "activity",
 		"verb": "post",
 		"postedTime": "2020-11-12T22:12:32.000Z",
 		"generator": {
 			"displayName": "X 网页应用",
 			"link": "https://mobile.x.com"
 		},
 		"provider": {
 			"objectType": "service",
 			"displayName": "X",
 			"link": "http://www.x.com"
 		},
 		"link": "http://x.com/XDevelopers/statuses/1327011423252144128",
 		"body": "👋 友情提醒:X Developer Labs v2 隐藏回复和近期搜索功能将于下周一(11 月…)停用 https://t.co/EEWN2Q9aXh",
 		"long_object": {
 			"body": "👋 友情提醒:X Developer Labs v2 隐藏回复和近期搜索功能将于下周一(11 月 16 日)停用!我们建议您迁移到 v2 #XAPI 中现已提供的新隐藏回复和近期搜索端点。详情:https://t.co/r6z6CI7kEy",
 			"display_text_range": [
 				0,
 				273
 			],
 			"twitter_entities": {
 				"hashtags": [{
 					"text": "API",
 					"indices": [
 						228,
 						239
 					]
 				}],
 				"urls": [{
 					"url": "https://t.co/r6z6CI7kEy",
 					"expanded_url": "https://devcommunity.x.com/t/retiring-labs-v2-recent-search-and-hide-replies/145795",
 					"display_url": "devcommunity.com/t/retiring-lab…",
 					"indices": [
 						250,
 						273
 					]
 				}],
 				"user_mentions": [],
 				"symbols": []
 			}
 		},
 		"actor": {
 			"objectType": "person",
 			"id": "id:twitter.com:2244994945",
 			"link": "http://www.x.com/XDevelopers",
 			"displayName": "X Dev",
 			"postedTime": "2013-12-14T04:35:55.036Z",
 			"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
 			"summary": "#XDevelopers 团队官方账号,为您提供 #XAPI 相关的更新、资讯和活动信息。",
 			"friendsCount": 2038,
 			"followersCount": 512292,
 			"listedCount": 1666,
 			"statusesCount": 3634,
 			"twitterTimeZone": null,
 			"verified": true,
 			"utcOffset": null,
 			"preferredUsername": "XDevelopers",
 			"languages": [],
 			"links": [{
 				"href": "https://developer.x.com/en/community",
 				"rel": "me"
 			}],
 			"location": {
 				"objectType": "place",
 				"displayName": "127.0.0.1"
 			},
 			"favoritesCount": 2147
 		},
 		"object": {
 			"objectType": "note",
 			"id": "object:search.x.com,2005:1327011423252144128",
 			"summary": "👋 友情提醒:X Developer Labs v2 隐藏回复和近期搜索功能将于下周一(11 月…)停用 https://t.co/EEWN2Q9aXh",
 			"link": "http://x.com/XDevelopers/statuses/1327011423252144128",
 			"postedTime": "2020-11-12T22:12:32.000Z"
 		},
 		"favoritesCount": 33,
 		"twitter_entities": {
 			"hashtags": [],
 			"urls": [{
 				"url": "https://t.co/EEWN2Q9aXh",
 				"expanded_url": "https://x.com/i/web/status/1327011423252144128",
 				"display_url": "x.com/i/web/status/1…",
 				"indices": [
 					117,
 					140
 				]
 			}],
 			"user_mentions": [],
 			"symbols": []
 		},
 		"twitter_lang": "en",
 		"twitter_filter_level": "low"
 	}
 }
转推与引用 Tweet 活动
{
	"id": "tag:search.x.com,2005:1225470895902412800",
	"objectType": "activity",
	"verb": "share",
	"postedTime": "2020-02-06T17:26:44.000Z",
	"generator": {
		"displayName": "X iPhone 版",
		"link": "http://x.com/download/iphone"
	},
	"provider": {
		"objectType": "service",
		"displayName": "X",
		"link": "http://www.x.com"
	},
	"link": "http://x.com/XDevelopers/statuses/1225470895902412800",
	"body": "RT @AureliaSpecker: 📣 如果你喜欢我去年11月写的伦敦通勤教程,可以看看使用了…的重构版本",
	"actor": {
		"objectType": "person",
		"id": "id:twitter.com:2244994945",
		"link": "http://www.x.com/XDevelopers",
		"displayName": "X Dev",
		"postedTime": "2013-12-14T04:35:55.036Z",
		"image": "https://pbs.twimg.com/profile_images/1283786620521652229/lEODkLTh_normal.jpg",
		"summary": "#XDevelopers 团队的官方账号,为您提供 #XAPI 相关的更新、新闻和活动信息。",
		"friendsCount": 2038,
		"followersCount": 512292,
		"listedCount": 1666,
		"statusesCount": 3634,
		"twitterTimeZone": null,
		"verified": true,
		"utcOffset": null,
		"preferredUsername": "XDevelopers",
		"languages": [],
		"links": [{
			"href": "https://developer.x.com/zh/community",
			"rel": "me"
		}],
		"location": {
			"objectType": "place",
			"displayName": "127.0.0.1"
		},
		"favoritesCount": 2147
	},
	"object": {
		"id": "tag:search.x.com,2005:1224709550214873090",
		"objectType": "activity",
		"verb": "post",
		"postedTime": "2020-02-04T15:01:25.000Z",
		"generator": {
			"displayName": "X 网页版",
			"link": "https://mobile.x.com"
		},
		"provider": {
			"objectType": "service",
			"displayName": "X",
			"link": "http://www.x.com"
		},
		"link": "http://x.com/AureliaSpecker/statuses/1224709550214873090",
		"body": "📣 如果你喜欢我去年11月写的伦敦通勤教程,可以看看重构版本… https://t.co/cAepHunkFp",
		"long_object": {
			"body": "📣 如果你喜欢我去年11月写的伦敦通勤教程,可以看看使用 X 新搜索端点的重构版本 🚇 https://t.co/87XIPZmZBJ\n\n#DEVcommunity #Pythontutorial @XDevelopers @API https://t.co/dXrJYvn3hY",
			"display_text_range": [
				0,
				229
			],
			"twitter_entities": {
				"hashtags": [{
						"text": "DEVcommunity",
						"indices": [
							176,
							189
						]
					},
					{
						"text": "Pythontutorial",
						"indices": [
							190,
							205
						]
					}
				],
				"urls": [{
						"url": "https://t.co/87XIPZmZBJ",
						"expanded_url": "https://bit.ly/2OrnrCC",
						"display_url": "bit.ly/2OrnrCC",
						"indices": [
							151,
							174
						]
					},
					{
						"url": "https://t.co/dXrJYvn3hY",
						"expanded_url": "https://x.com/AureliaSpecker/status/1195000047089389573",
						"display_url": "x.com/AureliaSpecker…",
						"indices": [
							230,
							253
						]
					}
				],
				"user_mentions": [{
						"screen_name": "XDevelopers",
						"name": "X Dev",
						"id": 2244994945,
						"id_str": "2244994945",
						"indices": [
							206,
							217
						]
					},
					{
						"screen_name": "API",
						"name": "X API",
						"id": 6253282,
						"id_str": "6253282",
						"indices": [
							218,
							229
						]
					}
				],
				"symbols": []
			}
		},
		"display_text_range": [
			0,
			140
		],
		"actor": {
			"objectType": "person",
			"id": "id:twitter.com:1102321381",
			"link": "http://www.x.com/AureliaSpecker",
			"displayName": "Aurelia Specker",
			"postedTime": "2013-01-18T23:45:43.000Z",
			"image": "https://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
			"summary": "devrel @TwitterUK • 在伦敦的瑞士人 • 植物妈妈 • @_dormrod 的专属理发师",
			"friendsCount": 1331,
			"followersCount": 1032,
			"listedCount": 26,
			"statusesCount": 854,
			"twitterTimeZone": null,
			"verified": false,
			"utcOffset": null,
			"preferredUsername": "AureliaSpecker",
			"languages": [],
			"links": [{
				"href": null,
				"rel": "me"
			}],
			"location": {
				"objectType": "place",
				"displayName": "英国伦敦"
			},
			"favoritesCount": 4979
		},
		"object": {
			"objectType": "note",
			"id": "object:search.x.com,2005:1224709550214873090",
			"summary": "📣 如果你喜欢我去年11月写的伦敦通勤教程,可以看看重构版本… https://t.co/cAepHunkFp",
			"link": "http://x.com/AureliaSpecker/statuses/1224709550214873090",
			"postedTime": "2020-02-04T15:01:25.000Z"
		},
		"favoritesCount": 43,
		"twitter_entities": {
			"hashtags": [],
			"urls": [{
				"url": "https://t.co/cAepHunkFp",
				"expanded_url": "https://x.com/i/web/status/1224709550214873090",
				"display_url": "x.com/i/web/status/1…",
				"indices": [
					117,
					140
				]
			}],
			"user_mentions": [],
			"symbols": []
		},
		"twitter_lang": "en",
		"twitter_filter_level": "low"
	},
	"favoritesCount": 0,
	"twitter_entities": {
		"hashtags": [],
		"urls": [],
		"user_mentions": [{
			"screen_name": "AureliaSpecker",
			"name": "Aurelia Specker",
			"id": 1102321381,
			"id_str": "1102321381",
			"indices": [
				3,
				18
			]
		}],
		"symbols": []
	},
	"twitter_lang": "en",
	"retweetCount": 12,
	"gnip": {
		"matching_rules": [{
			"tag": null
		}],
		"urls": [{
				"url": "https://t.co/87XIPZmZBJ",
				"expanded_url": "https://dev.to/XDevelopers/migrate-to-twitter-s-newly-released-labs-recent-search-endpoint-3npe",
				"expanded_status": 200,
				"expanded_url_title": null,
				"expanded_url_description": null
			},
			{
				"url": "https://t.co/sOjXW4YhbN",
				"expanded_url": "https://dev.to/XDevelopers/using-the-twitter-api-to-make-your-commute-easier-3od0",
				"expanded_status": 200,
				"expanded_url_title": null,
				"expanded_url_description": null
			}
		]
	},
	"twitter_filter_level": "low",
	"twitter_quoted_status": {
		"id": "tag:search.x.com,2005:1195000047089389573",
		"objectType": "activity",
		"verb": "post",
		"postedTime": "2019-11-14T15:26:27.000Z",
		"generator": {
			"displayName": "X 网页应用",
			"link": "https://mobile.x.com"
		},
		"provider": {
			"objectType": "service",
			"displayName": "X",
			"link": "http://www.x.com"
		},
		"link": "http://x.com/AureliaSpecker/statuses/1195000047089389573",
		"body": "我写了一篇教程,介绍如何使用 X API 获取个性化通勤信息🚇\n\n#DEVcommunity #Pythontutorial… https://t.co/pL0qJ4vhtE",
		"long_object": {
			"body": "我写了一篇教程,介绍如何使用 X API 获取个性化通勤信息🚇\n\n#DEVcommunity #Pythontutorial \n\n点击查看 👇\nhttps://t.co/sOjXW4YhbN",
			"display_text_range": [
				0,
				160
			],
			"twitter_entities": {
				"hashtags": [{
						"text": "DEVcommunity",
						"indices": [
							85,
							98
						]
					},
					{
						"text": "Pythontutorial",
						"indices": [
							99,
							114
						]
					}
				],
				"urls": [{
					"url": "https://t.co/sOjXW4YhbN",
					"expanded_url": "https://dev.to/XDevelopers/using-the-twitter-api-to-make-your-commute-easier-3od0",
					"display_url": "dev.to/twitterdev/usi…",
					"indices": [
						137,
						160
					]
				}],
				"user_mentions": [],
				"symbols": []
			}
		},
		"actor": {
			"objectType": "person",
			"id": "id:twitter.com:1102321381",
			"link": "http://www.x.com/AureliaSpecker",
			"displayName": "Aurelia Specker",
			"postedTime": "2013-01-18T23:45:43.000Z",
			"image": "https://pbs.twimg.com/profile_images/1137517534104772608/8FBYgc6G_normal.jpg",
			"summary": "devrel @TwitterUK • 在伦敦的瑞士人 • 植物妈妈 • @_dormrod 的专属理发师",
			"friendsCount": 1331,
			"followersCount": 1032,
			"listedCount": 26,
			"statusesCount": 854,
			"twitterTimeZone": null,
			"verified": false,
			"utcOffset": null,
			"preferredUsername": "AureliaSpecker",
			"languages": [],
			"links": [{
				"href": null,
				"rel": "me"
			}],
			"location": {
				"objectType": "place",
				"displayName": "英国伦敦"
			},
			"favoritesCount": 4979
		},
		"object": {
			"objectType": "note",
			"id": "object:search.x.com,2005:1195000047089389573",
			"summary": "我写了一篇教程,介绍如何使用 X API 获取个性化通勤信息🚇\n\n#DEVcommunity #Pythontutorial… https://t.co/pL0qJ4vhtE",
			"link": "http://x.com/AureliaSpecker/statuses/1195000047089389573",
			"postedTime": "2019-11-14T15:26:27.000Z"
		},
		"favoritesCount": 123,
		"twitter_entities": {
			"hashtags": [{
					"text": "DEVcommunity",
					"indices": [
						85,
						98
					]
				},
				{
					"text": "Pythontutorial",
					"indices": [
						99,
						114
					]
				}
			],
			"urls": [{
				"url": "https://t.co/pL0qJ4vhtE",
				"expanded_url": "https://x.com/i/web/status/1195000047089389573",
				"display_url": "x.com/i/web/status/1…",
				"indices": [
					116,
					139
				]
			}],
			"user_mentions": [],
			"symbols": []
		},
		"twitter_lang": "en",
		"twitter_filter_level": "low"
	}
}

Tweet 元数据时间轴

跳转到本页 简介 关键概念 X 时间轴 筛选提示 下一步

引言**

从本质上讲,X 是一个公开、实时、全球性的通信网络。自 2006 年以来,X 的演进既受用户使用模式与约定推动,也受新产品功能与改进推动。如果你使用 X 数据进行历史研究,了解这段演进的时间线对于从数据存档中发现你感兴趣的 Posts 至关重要。 X 最初作为一款简单的短信(SMS)移动应用上线,随后发展为一个完备的通信平台——拥有一整套 API。API 一直是 X 网络的支柱。第一版 API 在 X 上线后不久便推出。当在 2009 年首次引入为 Posts 添加地理标签时,该功能通过 Geo API 提供(随后,“为 Post 添加地理标签”的能力被集成到 X.com 的用户界面中)。如今,X 的 API 驱动着这张双向通信网络,使其成为突发新闻与信息分享的源头。基于这一全球、实时通信渠道进行构建的机会不胜枚举。 X 提供了两个历史 API,可访问每一条公开可用的 Post:Historical PowerTrack 和 Full-Archive Search API。这两个 API 都提供一组用于查询和收集目标 Posts 的_运算符_。这些运算符可匹配与每条 Post 关联的多种属性——多达数百项,例如 Post 的文本内容、作者的账号名,以及 Post 中分享的链接。Posts 及其属性以 JSON 编码,这是一种常见的基于文本的数据交换格式。因此,随着新功能的引入,会出现新的 JSON 属性,通常也会引入新的 API 运算符来匹配这些属性。如果你的用例需要_倾听_全球在 X 上说过的内容,那么越了解各类运算符从何时开始拥有可匹配的 JSON 元数据,你的历史 PowerTrack 过滤器就会越高效。 接下来,我们将介绍一些关键概念,为理解 Post 元数据的更新如何影响你定位感兴趣的数据信号铺垫基础。

关键概念**

从用户约定到 X 的一等对象

X 的用户自发在 X 网络中引入了新的、而今已成为基础的交流模式。一个开创性的例子是 hashtag(话题标签),如今几乎被所有社交网络广泛采用。Hashtag 起初用于组织对话与话题。在一个每天产生数以亿计消息的网络中,帮助查找感兴趣 Post 的工具至关重要,而 hashtag 已成为其中的关键方法。随着 hashtag 的使用迅速增长,它们获得了 X 的官方地位与支持。Hashtag 成为“一等”对象意味着多方面的变化:例如,hashtag 在 X.com 的用户界面中变得可点击、可搜索;也意味着 hashtag 成为 X 的 entities 家族的一员,与 @mentions、附加媒体、股票代码和分享链接并列。这些实体被方便地编码在一个预解析的 JSON 数组中,便于开发者处理、扫描与存储。 Retweets 是另一种由用户约定演变为官方对象的例子。Retweeting 起初是将内容“转发”给他人的做法,最初通过手动复制/粘贴一个 Post 并在前面加上“RT @”的方式实现。随后,这一流程通过新增的 Retweet 按钮被自动化,并配套提供新的 JSON 元数据。“官方” Retweet 因此诞生。其他例子还包括“mentions”、分享媒体与网页链接,以及随 Post 分享位置。每一种使用模式都催生了新的 x.com 用户界面功能、配套的 JSON,从而带来了匹配 Post 的新方法。所有这些基础的 Post 属性最终都形成了用于匹配它们的 PowerTrack Operators。

Post 元数据、可变性、更新与时效性

尽管 Post 消息有固定的字符上限,但一个 Post 的 JSON 描述包含 100 多个属性。这些属性包括由谁发布、发布时间、它是原始 Post 还是 Retweet,以及一组一等对象,如 hashtags、mentions 和共享链接。对于发布该内容的账号,还有一个 User(或 Actor)对象,包含多种属性,提供用户的 Profile 以及其他账号元数据。Profile 包括简短的个人简介、主页位置(自由文本)、首选语言,以及可选的网站链接。 有些账号元数据永不变化(例如数值型用户 id 和创建日期),有些会随时间缓慢变化,另一些则更为频繁。个人可能更换工作或搬迁,公司也会更新其信息。当你收集历史 Post 时,理解哪些元数据是_发布当时的状态_,而哪些元数据是_提交查询时的状态_非常重要。 对于所有历史 API,用户的个人资料简介、显示名称以及个人资料的“主页”属性都会更新为查询时的值。

“原生”媒体

X.com 和 X 移动端应用支持通过点击按钮并浏览你的相册,将照片和视频添加到 Post。由于这些功能已被作为一等操作集成,以这种方式分享的视频和照片被称为“原生”媒体。 许多查询运算符可用于这些“原生”资源,包括 has:videoshas:imageshas:media。它们只会匹配通过 X 内建功能分享的媒体内容。若要匹配托管在 X 平台之外的媒体,你需要使用基于 URL 元数据进行匹配的运算符。 因此,在我们深入介绍 Historical PowerTrack 和 Full-Archive Search 产品细节之前,先来回顾一下 X 作为产品和平台随时间如何演进。 X 时间线 下面是 X 的部分时间线。以下大多数 X 的更新在某种程度上从根本上影响了用户行为、Post 的 JSON 内容、查询运算符,或三者皆有。从将 X 视作一个 API 平台的角度来看,以下事件在某种程度上影响了用于编码 Post 的 JSON 负载。反过来,这些 JSON 细节会影响 X 历史 API 对它们的匹配方式。 请注意,此时间线列表通常准确但并不全面。

2006

  • 十月
    • @replies 成为一种约定用法。
    • cashtags首次出现,但用于标注股票代码直到2009年初才普及。cashtags 首次出现,但用于标注股票代码直到 2009 年初才普及。cashtags 于 2012 年 6 月起可点击/可搜索。
  • 十一月 - 推出 Favorites(收藏)。

2007

  • 1月 - @replies 成为一等对象,并在 UI 中提供带有 in_reply_to 元数据的回复按钮。
  • 4月 - Retweets 成为一种惯例。
  • 8月 - #hashtags 成为搜索和组织 Post 的主要工具。

2009

  • 2月 - $cashtags 成为讨论股票代码的通用约定。
  • 5月 - 推出 Retweet “beta”,在 Post 正文前加上 “Via @”。
  • 6月 - 推出已验证账号。
  • 8月 - Retweets 升级为一等对象,采用 “RT @” 模式并加入新的 retweet_status 元数据。
  • 10月 - 列表功能上线。
  • 11月 - Post 地理标记 API 上线,首次为用户通过第三方应用分享位置信息提供方法。

2010

  • 6月 - 推出 X Places,用于为 Post 添加地理标记。
  • 8月 - 网站上线 Post 按钮,分享链接更为便捷。

2011

  • 5月 - 推出 Follow 按钮,更便于关注与网站关联的账号。
  • 8月 - 推出原生照片功能。

2012

  • 6 月——$Cashtags 成为可点击、可搜索的链接。

2014

  • 3月 - 支持照片标记及最多四张照片。引入了_扩展版_ X Entities 元数据。
  • 4月 - X 界面原生支持表情符号。自至少 2008 年起,表情符号已在 Post 中被广泛使用。

2015

  • 4月 - 由于 X 的“post”用户界面设计调整,带地理标签的 Post 数量减少。
  • 10月 - 推出 X Polls。Polls 最初仅支持两个选项,投票期限为 24 小时。自 11 月起,Polls 支持四个选项,投票期限范围为 5 分钟至 7 天。Poll 的元数据于 2017 年 2 月提供(仅限富化的原生格式)。

2016

2017

  • 2月 - 在 Post 元数据中包含 X Poll 元数据(仅限增强的原生格式)。
  • 4月 - 推出“简化回复”:被回复的账号不计入 140 个字符(“dmw140,第 2 部分”)。
2018 2022
  • 9月29日 - 向小规模测试群体推出可编辑 Post 的功能。在适用时,会将已编辑 Post 的元数据添加到 Post 对象中。这包括 edit_history 和 edit_controls 对象。对于在可编辑功能推出前创建的 Posts,这些元数据不会返回。没有与这些元数据关联的 Operators。要了解 Post 编辑的工作方式,请参阅编辑 Posts 基础
筛选技巧 熟悉 X 关于新功能何时以及如何添加的时间线,有助于你创建更高效的查询。这里的“查询”指应用于 X 历史 API 的 Post 存档的“筛选器”或“规则”,使用 PowerTrack Operators 匹配 Post JSON。示例包括用于匹配指定语言的 lang: Operator。X 提供语言分类服务(支持 50 多种语言),X API 会在为每个 Post 生成的 JSON 中提供此元数据。因此,如果某条 Post 使用西班牙语撰写,则“lang” JSON 属性将设置为“es”。因此,如果你构建包含 lang:es 子句的筛选器,它将只匹配被分类为西班牙语的 Post 消息。 时间线信息还有助于更好地解读接收的 Post 数据。假设你在研究 2008 年和 2012 年夏季奥运会的内容传播情况。如果你只应用 is:retweet Operator 来匹配转发,2008 年将没有数据匹配;而在 2012 年则可能有数百万次转发。由此你可能会错误地得出结论,认为 2008 年转发并不是一种用户习惯,或者当年没人转发相关内容。由于 Retweets 在 2009 年成为一等对象,你需要添加 “RT @” 规则子句来帮助识别 2008 年的转发。 Retweets 和 Post 语言分类都是具有悠久历史且包含许多产品细节的 Post 属性示例。下面我们将讨论这些以及其他对匹配与理解 X Data 至关重要的属性类别的更多细节。

识别假阴性

在编写过滤器时,有一个关键点:用于匹配的各类元数据运算符都有“生效时间”。如果你使用的运算符针对的是在该 Post 发布之后才引入的元数据,你就会得到假阴性。比如,你想检索所有提到“snow”且分享视频的 Posts。如果你用 has:videos 运算符(该运算符匹配带有本机视频的 Posts)来写规则,那么该子句将无法匹配到 2015 年之前的任何 Post。 不过,早在 2015 年之前,在 X 上分享视频就很常见了。在此之前,用户通常分享的是指向外部托管视频的链接;到了 2015 年,X 才把“分享视频”功能直接内置到平台中。要寻找这些更早的目标 Posts,你可以加入诸如 url:"youtube.com" 的规则子句。 请注意,对于 Search APIs,随着索引重建,确有某些元数据被“回填”的情况。一个典型例子是 cashtags:自2009年起,人们广泛用它来讨论股票代码。2015年在引入cashtags:自 2009 年起,人们广泛用它来讨论股票代码。2015 年在引入 cashtag 运算符后,Search 索引被重建,在此过程中会从所有 Post 正文中抽取符号实体,甚至包括 2006 年早期、当时 $ 主要用于俚语的内容;“I hope it nownow $oon!”。

识别并基于与您的用例相关的重要 Post 属性进行筛选

某些元数据(例如 X 账户的数值型 id)自平台诞生起就存在(也是永不改变的账户元数据的一个例子)。其他元数据则是在 X 于 2006 年上线后相当长一段时间才引入的。新引入的元数据示例包括转发(Retweets)元数据、Post 所在位置、URL 的标题与描述,以及“原生”媒体。以下是一些最常见的 Post 属性类型,这些属性因上述 X 平台更新而发生了根本性的变化。 在大多数情况下,这些属性的筛选/匹配行为取决于所使用的历史 Post API。为帮助您判断哪款产品最契合您的研究与用例,下面的属性详情中包含概览级别的产品信息。

X 个人资料

由于 X 的核心是一种全球实时通信渠道,使用 Post 数据进行研究通常会侧重于“谁在沟通”。了解 X 用户自称的所在地往往很有帮助。知道某个账号的个人简介提到了兴趣与爱好,常常能引导你找到相关的 Post。监听来自目标账号的 Posts 也非常常见。个人资料属性是以上所有用例的关键。 X 上的每个账号都有一个个人资料,其中包含元数据,如 X @handle、显示名称、简短简介、居住地(用户输入的自由文本)、粉丝数量等。某些属性从不改变,例如数值型用户 id 和账号创建时间。其他属性通常会按日、周或月发生变化,例如已发布的 Posts 数量以及关注数和粉丝数。还有一些账号属性在任何时候都可能更改,但通常变动不那么频繁:显示名称、居住地和简介。 每条 Post 的 JSON 负载都包含该 Post 作者的账号个人资料元数据。如果它是一次转发(Retweet),还会包含发布原始 Post 的账号的个人资料元数据。 Post 的个人资料元数据的可变性完全取决于所使用的历史产品。Search APIs 提供的历史 Posts 所附带的个人资料设置为检索时的状态。对于 Historical PowerTrack,个人资料为该 Post 发布时的状态,但 2011 年之前的数据除外。对于早于 2011 年的 Posts,个人资料元数据反映的是 2011 年 9 月时的个人资料状态。

原始 Post 与转推(Retweets)

转推是用户自发约定演变为官方对象的又一例证。转推最初是一种将内容“转发”给他人的做法,起初通过手动复制/粘贴一个 Post,并在前面加上“RT @”模式实现。随后,这一流程通过新增的转推按钮实现自动化,并配套提供新的 JSON 元数据。“官方”转推由此诞生,转推这一动作成为一类一等公民的 Post 事件。随着新的转推按钮,还引入了新的元数据,例如原始 Post 的完整载荷。 Post 是否为原创或分享,是常见的筛选“开关”。在某些场景下,只需要原创内容;在另一些场景下,Post 互动最为重要,因此转推至关重要。PowerTrack is:retweet 运算符允许用户包含或排除转推。如果拉取的是 2009 年 8 月之前的数据,用户需要准备两套用于匹配(或不匹配)转推的策略。对于 2009 年 8 月之前的时段,需要检查 Post 文本本身,使用精确短语匹配来识别“RT @”模式。对于 2009 年 8 月之后的时段,可以使用 is:retweet 运算符。

Post 语言分类

Post 使用的语言是一个常见关注点。Post 的语言有助于推断其位置,而且在分析或展示时通常只需要特定语言。(X 的个人资料也提供首选语言设置。) 在按 Post 的语言分类进行过滤时,X 的历史产品(Search API 和 Historical PowerTrack)存在明显差异。构建搜索存档时,所有 Post 都被回填了 X 的语言分类,因此可在整个 Post 存档中使用 lang: 运算符。对于 Historical PowerTrack,X 的语言分类元数据自 2013 年 3 月 26 日起在存档中可用。 

帖文地理标注

能够判断一条 Post 是从何处发布(即进行地理标注)对许多用例都很重要。对 Post 进行地理标注主要有三种方法:
  • 帖文内容中的地理引用
  • 用户为帖文添加的地理标签
  • 用户在账号资料中设置的“所在地”位置
Post 消息中的地理引用
在 Post 消息中基于地理引用进行匹配,尽管通常最具挑战性(因为依赖本地知识),但对于整个 Post 存档仍是一种可行的方法。以下是一个 2006 年的地理引用匹配示例,面向旧金山地区,基于“golden gate”筛选条件: https://x.com/biz/statuses/28311
由用户地理标记的 Posts
2009 年 11 月,X 推出了 Post Geotagging API,使 Posts 可以精确到具体位置进行地理标记。2010 年 6 月,X 推出 X Places,用于表示场馆、街区或城镇尺度的地理区域。约有 1–2% 的 Posts 通过上述任一方式进行了地理标记。 可用的地理标记历史取决于您使用的 Historical API。对于 Search APIs,使用部分 Geo Operators 匹配 Posts 的能力始于 2010 年 3 月,其他则始于 2015 年 2 月。若您使用 Historical PowerTrack,地理参照自 2011 年 9 月 1 日开始。构建 Historical PowerTrack 存档时,该日期之前的所有地理标记均未被纳入。
由用户设置的账号资料“主页”位置
所有 X 用户都可以设置其资料位置(Profile Location),以标示其常驻地点。数以百万计的 X 用户提供了此信息,这大幅增加了 X Firehose 中的地理数据量。此位置元数据为非规范化的、用户生成的自由格式字符串。约有 30% 的账号拥有可解析到国家级别的 Profile Geo 元数据。 与 Post 地理位置信息类似,匹配方法和可用的时间范围取决于所使用的 Historical API。Historical PowerTrack 允许用户对这些自由格式字符串进行自定义匹配。为简化此过程,X 还提供了Profile Geo Enrichment,在可能的情况下执行地理编码,提供规范化的元数据及相应的 Operators。Profile Geo Operators 同时适用于 Historical PowerTrack 和 Search APIs。使用 Historical PowerTrack,这些 Profile Geo 元数据自 2014 年 6 月起可用;在 Search APIs 中则自 2015 年 2 月起可用。 共享网页链接、照片和视频一直是 X 的核心用例。早期,执行这些操作都需要在 Post 消息本身中包含一个 URL。2011 年,X 将照片分享直接集成进其用户界面。2016 年,又新增了原生视频。 基于这一历史,出现了多种用于匹配此类内容的过滤 Operator。有一组 Operator 可用于判断 Post 是否包含共享的链接、照片和视频。此外,由于在 X 上共享的大多数 URL 都会被缩短以尽量减少占用 Post 的字符数(例如由 bitly 或 tinyurl 等服务生成),X 提供了 data 富化,生成完整的、扩展后的 URL 以供匹配。例如,如果你想匹配包含讨论 X 和预警系统的链接的 Post,引用“severe weather communication”的过滤器也会匹配包含该 http://bit.ly/1XV1tG4 URL 的 Post。 2012 年 3 月,引入了扩展 URL 富化。在此之前,Post 负载仅包含用户提供的 URL。因此,如果用户包含的是短链,要匹配你关心的(扩展后)URL 会比较困难。在 Historical PowerTrack 和 Search API 中,这些元数据自 2012 年 3 月起可用。 2016 年 7 月,又引入了增强型 URL 富化。该增强版本在 Post 负载中提供网站的 HTML 标题和描述,并提供用于匹配这些内容的 Operator。在 Historical PowerTrack 中,这些元数据自 2016 年 7 月起可用;在 Search API 中,这些元数据自 2014 年 12 月开始提供。 2016 年 9 月,X 引入了“原生附件”,尾随的共享链接不再计入 140 个 Post 字符限制。上述两种 URL 富化仍适用于这些共享链接。 有关 URL 过滤的更多与产品相关的细节,请参阅相应的文章。