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

X API:Enterprise 数据词典

介绍

Enterprise Post 是构成 X 一切内容的基本原子单元。所有返回 Post 的 X API 都以 JavaScript Object Notation (JSON) 对这些数据进行编码。JSON 基于键值对,由具名属性及其对应的值组成。从 API 检索到的 Post 对象包含 X 用户的“状态更新”,同时转发、回复和引用 Tweet 也都是 Post 对象。若某个 Post 与另一条 Post 存在关联(如转发、回复或引用 Tweet),这些关联都会在该 Post 对象中被标识或嵌入。即使是最简单的原生 X 数据格式的 Post,也会包含嵌套的 JSON 对象,用于表示该 Post 的其他属性,例如作者、被提及的用户、标注的地点位置、话题标签、货币标签符号、媒体或 URL 链接。处理 X 数据时,理解这一点非常重要。你从 X API 接收到的 Post 数据格式取决于收到的 Post 类型、所使用的 X API,以及格式设置。 返回 Post 对象的 Enterprise endpoint 已更新,提供理解 Post 编辑历史所需的 metadata。请在“编辑 Post”基础知识页面了解更多这些 metadata:“Edit Posts” 基础知识
In native X format, the JSON payload will include of ‘root-level’ attributes, and nested JSON objects (which are represented here with the {} notation):
{
	"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": {}
}

可用的数据格式

请注意:强烈建议在 Enterprise 数据 API 中使用 Enriched Native 格式。
  • Enriched Native 格式包含自 2017 年以来新增的所有 metadata,例如 投票 metadata,以及 reply_count、quote_count 等其他度量。
  • 自 2017 年字符更新以来,Activity Streams 格式未再加入新的 metadata 或富化内容。
Enterprise 数据 API 提供两种不同的格式。与 Standard v1.1 原生格式最接近的 Enterprise 格式是 Enriched Native。传统的 Enterprise 数据格式是 Activity Streams,最初由 Gnip 实施,并作为当时在 X 及其他社交媒体数据提供商之间的规范化格式使用。尽管该格式仍可用,但自 2017 年以来,X 仅在 Enriched Native 格式上投入新功能和开发。 Enriched Native 格式名副其实,既包含原生的 X 对象,也包含适用于 Enterprise 数据产品的额外富化信息,例如 URL 展开 metadata、资料地理信息、投票 metadata 以及更多互动度量。

按数据格式进行对象对比

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

解析最佳实践

  • X JSON 使用 UTF-8 字符编码。
  • 解析器应能从容应对字段顺序的变化。应假定 Post 的 JSON 以未排序的 data 哈希提供。
  • 解析器应能容忍添加“new” 字段。
  • 由于并非所有字段都会出现在所有 context 中,JSON 解析器必须能容忍“缺失”的字段。
  • 通常可以将置为 null 的字段、空集合以及字段缺失视为等同情况

Enterprise 原生扩展型 data 对象

原生增强型 Tweet 对象

想了解原生增强型 data 格式如何映射到 X API v2 格式的更多信息吗? 请参阅我们的对比指南:原生增强型与 X API v2 的比较

Post 对象

在使用 Enterprise 数据产品时,你会注意到数据字典的大部分内容与 Post 数据的原生格式相似,并附带一些增强的 metadata。原生增强格式的基础层级在很大程度上沿用了与 X API v1.1 data format 相同的对象名称。Post 对象包含大量“根级”属性,包括 idcreated_attext 等基础属性。Post 对象还包含嵌套对象,如 userentitiesextended_entities。Post 对象还会包含其他嵌套的 Post 对象,例如 retweeted_status、quoted_status 和 extended_tweet。原生增强格式还包含一个 matching_rules 对象。
X 数据字典
下面提供了这些“根级”属性的数据字典,以及其子对象数据字典的链接。
属性类型描述
created_atString此 Post 创建时的 UTC 时间。示例:

“created_at”: “Wed Oct 10 20:19:24 +0000 2018”
idInt64此 Post 唯一标识符的整数表示。此数字大于 53 位,某些编程语言在解释时可能会遇到困难或出现静默缺陷。使用有符号 64 位整数存储此标识符是安全的。为确保安全,请使用 id_str 获取标识符。有关更多信息,请参阅 X IDs。示例:

“id”:1050118621198921728
id_strString此 Post 唯一标识符的字符串表示。实现时应使用此字段而不是 id 中的大整数。示例:

“id_str”:“1050118621198921728”
textString状态更新的实际 UTF-8 文本。有关当前被认为有效的字符的详细信息,请参阅 X-text。示例:

“text”:“To make room for more expression, we will now count all emojis as equal—including those with gender‍‍‍ ‍‍and skin t… https://t.co/MkGjXf9aXm
sourceString用于发布 Post 的工具,以 HTML 格式字符串表示。来自 X 网站的 Post 的 source 值为 web

示例:

“source”:“X Web Client”
truncatedBoolean指示 text 参数的值是否被截断,例如,由于转发超过了原始 Post 文本长度限制 140 个字符。截断的文本将以省略号结尾,如 ...。由于 X 现在拒绝长 Post 而不是截断它们,绝大多数 Post 将此设置为 false。请注意,虽然原生转发可能会缩短其顶级 text 属性,但原始文本将在 retweeted_status 对象下可用,并且 truncated 参数将设置为原始状态的值(在大多数情况下为 false)。示例:

“truncated”:true
in_reply_to_status_idInt64可为空。 如果所表示的 Post 是回复,此字段将包含原始 Post ID 的整数表示。示例:

“in_reply_to_status_id”:1051222721923756032
in_reply_to_status_id_strString可为空。 如果所表示的 Post 是回复,此字段将包含原始 Post ID 的字符串表示。示例:

“in_reply_to_status_id_str”:“1051222721923756032”
in_reply_to_user_idInt64可为空。 如果所表示的 Post 是回复,此字段将包含原始 Post 作者 ID 的整数表示。这不一定总是 Post 中直接提及的用户。示例:

“in_reply_to_user_id”:6253282
in_reply_to_user_id_strString可为空。 如果所表示的 Post 是回复,此字段将包含原始 Post 作者 ID 的字符串表示。这不一定总是 Post 中直接提及的用户。示例:

“in_reply_to_user_id_str”:“6253282”
in_reply_to_screen_nameString可为空。 如果所表示的 Post 是回复,此字段将包含原始 Post 作者的用户名。示例:

“in_reply_to_screen_name”:“xapi”
user用户对象发布此 Post 的用户。有关属性的完整列表,请参阅用户数据字典。

突出显示选定属性的示例:

{ “user”: <br/> “id”: 6253282,
“id_str”: “6253282”,
“name”: “X API”,
“screen_name”: “API”,
“location”: “San Francisco, CA”,
“url”: “https://developer.x.com”,
“description”: “The Real X API. Tweets about API changes, service issues and our Developer Platform. Don’t get an answer? It’s on my website.”,
“verified”: true,
“followers_count”: 6129794,
“friends_count”: 12,
“listed_count”: 12899,
“favourites_count”: 31,
“statuses_count”: 3658,
“created_at”: “Wed May 23 06:01:13 +0000 2007”,
“utc_offset”: null,
“time_zone”: null,
“geo_enabled”: false,
“lang”: “en”,
“contributors_enabled”: false,
“is_translator”: false,
“profile_background_color”: “null”,
“profile_background_image_url”: “null”,
“profile_background_image_url_https”: “null”,
“profile_background_tile”: null,
“profile_link_color”: “null”,
“profile_sidebar_border_color”: “null”,
“profile_sidebar_fill_color”: “null”,
“profile_text_color”: “null”,
“profile_use_background_image”: null,
“profile_image_url”: “null”,
“profile_image_url_https”: “https://pbs.twimg.com/profile&#95;images/942858479592554497/BbazLO9L&#95;normal.jpg”,
“profile_banner_url”: “https://pbs.twimg.com/profile&#95;banners/6253282/1497491515”,
“default_profile”: false,
“default_profile_image”: false,
“following”: null,
“follow_request_sent”: null,
“notifications”: null
}
}
coordinatesCoordinates可为空。 表示用户或客户端应用程序报告的此 Post 的地理位置。内部坐标数组格式为 geoJSON(经度在前,纬度在后)。示例:

“coordinates”:
<br/> “coordinates”:
[
-75.14310264,
40.05701649
],
“type”:“Point”
}
placePlaces可为空 当存在时,表示该 Post 与某个地点相关联(但不一定来源于该地点)。示例:

“place”:
<br/> “attributes”:,
“bounding_box”:
<br/> “coordinates”:
[[
[-77.119759,38.791645],
[-76.909393,38.791645],
[-76.909393,38.995548],
[-77.119759,38.995548]
]],
“type”:“Polygon”
},
“country”:“United States”,
“country_code”:“US”,
“full_name”:“Washington, DC”,
“id”:“01fbe706f872cb32”,
“name”:“Washington”,
“place_type”:“city”,
“url”:“http://api.x.com/1/geo/id/0172cb32.json
}
quoted_status_idInt64此字段仅在 Post 为引用 Tweet 时显示。此字段包含被引用 Tweet 的整数值 Post ID。示例:

“quoted_status_id”:1050119905717055488
quoted_status_id_strString此字段仅在 Post 为引用 Tweet 时显示。这是被引用 Tweet 的字符串表示 Post ID。示例:

“quoted_status_id_str”:“1050119905717055488”
is_quote_statusBoolean指示这是否为引用 Tweet。示例:

“is_quote_status”:false
quoted_statusPost此字段仅在 Post 为引用 Tweet 时显示。此属性包含被引用的原始 Post 的 Post 对象。
retweeted_statusPost用户可以通过转发来扩大其他用户创作的 Post 的传播。转发可以通过 retweeted_status 属性的存在与典型 Post 区分开来。此属性包含被转发的原始 Post 的表示。请注意,转发的转发不会显示中间转发的表示,而只显示原始 Post。(用户也可以通过删除其转发来取消转发他们创建的转发。)
quote_countInteger可为空。 指示此 Post 被 X 用户引用的大致次数。示例:

“quote_count”:33

注意:此对象仅在 Premium 和 Enterprise 层级产品中可用。
reply_countInt此 Post 被回复的次数。示例:

“reply_count”:30

注意:此对象仅在 Premium 和 Enterprise 层级产品中可用。
retweet_countInt此 Post 被转发的次数。示例:

“retweet_count”:160
favorite_countInteger可为空。 指示此 Post 被 X 用户点赞的大致次数。示例:

“favorite_count”:295
entitiesEntities从 Post 文本中解析出的实体。另请参阅 X 对象中的实体。示例:

“entities”:
<br/> “hashtags”:[],
“urls”:[],
“user_mentions”:[],
“media”:[],
“symbols”:[]
“polls”:[]
}
extended_entitiesExtended Entities当 Post 中包含一到四张原生照片或一个视频或一个动画 GIF 时,包含一个数组 ‘media’ metadata。这在引用 Tweet 中也可用。另请参阅 X 对象中的实体。示例:

“entities”:
<br/> “media”:[]
}
favoritedBoolean可为空。 指示此 Post 是否已被认证用户点赞。示例:

“favorited”:true
retweetedBoolean指示此 Post 是否已被认证用户转发。示例:

“retweeted”:false
possibly_sensitiveBoolean可为空。 此字段指示内容可能被识别为敏感内容。Post 作者可以在其账户偏好设置中选择”将您发布的媒体标记为可能包含敏感材料”,因此之后创建的每个 Post 都会设置此标志。

这也可能由 X 内部支持代理判断和标记。

“possibly_sensitive”:false
filter_levelString指示可以使用的 filter_level 参数的最大值,并且仍然可以流式传输此 Post。因此,medium 值将在 nonelowmedium stream 上流式传输。

示例:

“filter_level”: “low”
langString可为空。 当存在时,指示与机器检测到的 Post 文本语言对应的 BCP 47 语言标识符,如果无法检测到语言则为 und

示例:

“lang”: “en”
edit_historyObject唯一标识符,表示 Post 的所有版本。对于未经编辑的 Post,将有一个 ID。对于有编辑历史的 Post,将有多个 ID,按升序排列,反映编辑顺序,最新版本位于数组的最后位置。

Post ID 可用于获取和查看 Post 的先前版本。

示例:

edit_history”: <br/> “initial_tweet_id”: “1283764123”
“edit_tweet_ids”: [“1283764123”, “1394263866”]
}
edit_controlsObject当存在时,表示 Post 仍可编辑的时长以及剩余编辑次数。Post 仅在创建后的前 30 分钟内可编辑,最多可编辑五次。

Post ID 可用于获取和查看 Post 的先前版本。

示例:

“edit_controls”: <br/> “editable_until_ms”: 123
“edits_remaining”: 3
}
editableBoolean当存在时,表示 Post 在发布时是否符合编辑条件。此字段不是动态的,当 Post 达到其可编辑时间限制或最大编辑次数时,不会从 True 切换到 False。以下 Post 功能将导致此字段为 false:

_ Post 被推广
_ Post 包含投票
_ Post 是非自我线程回复
_ Post 是转发(请注意引用 Tweet 符合编辑条件)
_ Post 是 nullcast
_ 社区 Post
_ Superfollow Post
_ 协作 Post
matching_rulesArray of Rule Objects出现在 X Search 和 PowerTrack 等_过滤_产品中。提供与匹配 Post 的规则关联的 idtag。有关匹配规则的更多信息请参见此处。使用 PowerTrack 时,多个规则可以匹配一个 Post。

示例:

“matching_rules”: ” [<br/> “tag”: “xapi emojis”,
“id”: 1050118621198921728,
“id_str”: “1050118621198921728”
}]“
其他 Post 属性
提供 Post 的 X API(例如 GET statuses/lookup endpoint)可能包含以下其他 Post 属性:
属性类型说明
current_user_retweetObject具视角性。仅在支持 include_my_retweet 参数且其值为 true 的方法中出现。提供用户对该 Post 的自身转发(如存在)的 Post ID。示例:

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

“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已弃用。 可为 null。 请改用 coordinates 字段。该已弃用属性的坐标格式为 [lat, long],而其他所有 Post 的地理信息均为 [long, lat] 格式。

嵌套的 Post 对象

在多种情况下,Post 对象会包含其他嵌套对象。若你在处理嵌套对象,则该 JSON 负载将包含多个 Post 对象,并且每个 Post 对象可能包含其自身的对象。根级对象将包含关于所执行操作类型的信息,即它是转发还是引用 Tweet,并且还可能包含一个描述被分享的“原始” Post 的对象。扩展的 Posts 将包含一个嵌套的扩展对象,其长度超过 140 个字符,这是在 2017 年进行更新时为避免破坏性变更而采用的。各个嵌套对象字典的说明如下。 转发 转发始终包含两个 Post 对象。被转发的“原始” Post 位于一个名为 “retweeted_status” 的对象中。根级对象封装了转发本身,包括执行转发操作的账号的用户对象以及转发的时间。转发是一种将 Post 分享给你的关注者的操作,不能添加任何其他新内容。此外,转发不能提供(新的)位置信息。即使“原始” Post 可能带有地理标签,转发的 “geo” 和 “place” 对象始终为 null。 即便在引入扩展 Posts 之前,根级的 “entities” 对象在某些情况下也会因为在被转发的 Post 消息前附加了字符串 “RT @username ” 而被截断且不完整。请注意,如果一个转发再次被转发,“retweeted_status” 仍然会指向原始 Post,这意味着中间的转发不被包含。使用 x.com“显示”转发时也会出现类似的行为。如果你复制分配给该转发“动作”的唯一 Post ID,将会显示原始 Post。 下面是转发的示例结构。同样地,在解析转发时,关键是解析 “retweeted_status” 对象,以获得完整的(原始)Post 消息和实体 metadata。
{
	"tweet": {
		"text": "RT @author 原始消息",
		"user": {
			"screen_name": "Retweeter"
		},
		"retweeted_status": {
			"text": "原始消息",
			"user": {
				"screen_name": "OriginalTweeter"
			},
			"place": {},
			"entities": {},
			"extended_entities": {}
		}
	},
	"entities": {},
	"extended_entities": {}
}
引用 Tweet
引用 Tweet 与 转发 很相似,只是它包含一条新的 Post 消息。这些新消息可以包含各自的标签、链接以及其他“entities” metadata。引用 Tweet 还可以包含由发布该引用 Tweet 的用户共享的位置信息,以及 GIF、视频和照片等媒体。 引用 Tweet 至少包含两个 Post 对象,在某些情况下包含三个。被引用的 Post(其本身也可能是一个被引用的 Tweet)包含在“quoted_status”对象中。根级对象封装了引用 Tweet 本身,包括执行分享操作账户的 用户对象,以及引用 Tweet 的时间。 请注意,现在可以使用“Post”用户界面为引用 Tweet 添加照片、GIF 或视频。当引用 Tweet 的消息中包含指向外部托管媒体的链接时,根级的“entities.urls”会描述这些链接。附加到引用 Tweet 的媒体将出现在根级的“extended_entities” metadata 中。 在引用 Tweet 刚推出时,会在“原始”Post 消息末尾追加一个缩短链接(t.co URL),并将其放入根级的“text”字段中。此外,该 t.co URL 的 metadata 会包含在根级的“entities.urls”数组中。自 2018 年 5 月起,我们进行了更改:指向被引用 Tweet 的缩短 t.co URL 将不再包含在根级的“text”字段中;其次,被引用 Tweet 的 metadata 也不再包含在“entities.urls” metadata 中。相反,被引用 Tweet 的 URL metadata 将位于根级(或顶级)的新“quoted_status_permalink”对象中,与“quoted_status”对象处于相同层级。 下面是使用这种原始格式的引用 Tweet 的示例结构。
{
	"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": "引用测试 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": "啊啊啊啊啊",
		"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’ 数组将不会包含该标签。 为此,引入了新的 ‘extended_tweet’ 字段,用于承载更长的 Post 消息并补全实体元数据。“extended_tweet” 对象提供 “full_text” 字段,当长度超过 140 字符时,该字段包含完整且未截断的 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": []
	}
}

原生增强型用户对象

该用户对象包含用于描述所引用 X 用户的 X 用户账户 metadata。 

用户数据词典

属性类型描述
idInt64此用户唯一标识符的整数表示。此数字大于 53 位,某些编程语言在解释时可能会遇到困难/静默缺陷。使用有符号 64 位整数存储此标识符是安全的。使用 id_str 获取标识符以确保安全。有关更多信息,请参阅 X IDs。示例:

“id”: 6253282
id_strString此用户唯一标识符的字符串表示。实现应使用此字段而不是 id 中可能无法处理的大整数。示例:

“id_str”: “6253282”
nameString用户定义的姓名。不一定是真实姓名。通常限制为 50 个字符,但可能会发生变化。示例:

“name”: “API”
screen_nameString此用户标识自己的屏幕名称、用户名或别名。screen_names 是唯一的但可能会发生变化。尽可能使用 id_str 作为用户标识符。通常最多 15 个字符长,但某些历史账户可能存在更长的名称。示例:

“screen_name”: “api”
locationString可为空。此账户个人资料的用户定义位置。不一定是位置,也不一定可被机器解析。此字段偶尔会被搜索服务模糊解释。示例:

“location”: “San Francisco, CA”
derivedArrays of Enrichment Objects仅限 Enterprise API 为用户派生的丰富元数据集合。提供 Profile Geo 丰富元数据。有关更多信息(包括 JSON 数据字典),请参阅相关文档。示例:

“derived”:“locations”: [“country”:“United States”,“country_code”:“US”,“locality”:“Denver”]
urlString可为空。用户在其个人资料中提供的 URL。示例:

“url”: “https://developer.x.com
descriptionString可为空。用户定义的描述其账户的 UTF-8 字符串。示例:

“description”: “The Real X API.”
protectedBoolean当为 true 时,表示此用户已选择保护其 Post。请参阅 关于公开和受保护的 Post。示例:

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

“verified”: false
followers_countInt此账户当前拥有的关注者数量。在某些压力情况下,此字段将暂时显示”0”。示例:

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

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

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

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

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

“created_at”: “Mon Nov 29 21:18:15 +0000 2010”
profile_banner_urlString指向用户上传的个人资料横幅标准网页表示的基于 HTTPS 的 URL。通过在 URL 末尾添加路径元素,可以获得针对特定显示优化的不同图像尺寸。有关尺寸变体,请参阅 用户个人资料图像和横幅

示例:

“profile_banner_url”: “https://si0.twimg.com/profile&#95;banners/819797/1348102824
profile_image_url_httpsString指向用户个人资料图像的基于 HTTPS 的 URL。示例:

“profile_image_url_https”:
https://abs.twimg.com/sticky/default&#95;profile&#95;images/default&#95;profile&#95;normal.png
default_profileBoolean当为 true 时,表示用户未更改其用户个人资料的主题或背景。示例:

“default_profile”: false
default_profile_imageBoolean当为 true 时,表示用户未上传自己的个人资料图像,而是使用默认图像。示例:

“default_profile_image”: 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 是具有相应地理坐标的特定、具名位置。当用户决定为其 Post 指定位置时,他们会看到一个候选 X Place 列表。使用 API 发帖时,可以在发布时通过指定 place_id 来附加一个 X Place。与 Place 关联的 Post 不一定发布自该位置,也可能是关于该位置。 仅当 Post 被分配了精确位置时,geo 和 coordinates 对象才会出现(非空)。如果提供了精确位置,coordinates 对象将提供一个包含地理坐标的 [long, lat] 数组,并会分配与该位置相对应的一个 X Place。

地点数据字典

字段类型描述
idString表示此地点的 id。注意这是字符串而非整数。示例:

“id”:“01a9a39529b27f36”
urlString指向此地点的附加 place metadata 的位置的 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 时,此 hash 为 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 坐标 fields,该值为“Point”。示例:

“type”: “Point”
Coordinates 对象数据字典
字段类型说明
coordinatesFloat 集合Post 所在位置的经纬度,按 [longitude, latitude](经度、纬度)的顺序组成的集合。示例:

**  “coordinates”:

“type”:** “Point”,

**    “coordinates”: [

-0.41068
,

54.27784

    ]

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

“type”: “Point”

派生位置

字段类型描述
derivedlocations object基于个人资料的地理信息增强得到的位置

“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": "美国",
    "bounding_box": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -74.026675,
            40.683935
          ],
          [
            -74.026675,
            40.877483
          ],
          [
            -73.910408,
            40.877483
          ],
          [
            -73.910408,
            40.683935
          ]
        ]
      ]
    },
    "attributes": {

    }
  }
}
数据字典:Enterprise

X 实体  

跳转到本页 简介 entities 对象   - hashtag 对象   - media 对象   - media 尺寸对象   - URL 对象   - 用户提及对象   - symbol 对象   - 投票对象 转发与引用 Tweet 详情 用户对象中的 entities 私信中的 entities 后续步骤

介绍

实体为发布在 X 上的内容提供 metadata 和额外的上下文信息。entities 部分包含 Posts 中常见元素的数组:hashtags、用户提及、链接、股票代码(symbols)、X 投票,以及所附媒体。由于 X 实际上已对文本正文进行了预处理(预解析),这些数组便于开发者在摄取 Posts 时使用。开发者无需在 Post 正文中显式检索这些实体,解析器可直接读取该 JSON 部分。 除了提供解析便利外,entities 部分还提供有用的“增值”metadata。比如,如果你使用了Enhanced URLs enrichment,URL metadata 会包含完整展开的 URL,以及关联的网站标题和描述。再比如,当存在用户提及时,entities metadata 会包含数值型用户 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 object

Entities 对象

entitiesextended_entities 部分均由实体对象数组组成。下面将逐一说明这些实体对象,并提供数据字典,描述对象的属性名称、类型及简要说明。我们还会指出哪些 PowerTrack Operators 可匹配这些属性,并附上一些示例 JSON 载荷。 这是一个在 Post 中常见的实体集合,包括话题标签、链接和用户提及。entities 对象确实包含 media 属性,但其在 entities 部分中的实现仅对包含单张照片的 Post 完全准确。对于包含多张照片、视频或动画 GIF 的 Post,请参阅 extended_entities 部分。

Entities 数据字典

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


“hashtags”: [

“indices”: [
32,
38
],
“text”: “nodejs”

]
mediaMedia Objects 数组表示与 Post 一起上传的媒体元素。示例:


“media”: [

“display_url”: “pic.x.com/5J1WJSRCy9”,
“expanded_url”: “https://x.com/nolan_test/status/930077847535812610/photo/1”,
“id”: 9.300778475358126e17,
“id_str”: “930077847535812610”,
“indices”: [
13,
36
],
“media_url”: “http://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg”,
“media_url_https”: “https://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg
“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

,
“type”: “photo”,
“url”: “https://t.co/5J1WJSRCy9”,

]
urlsURL Objects 数组表示 Post 文本中包含的 URL。

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


“urls”: [

“indices”: [
32,
52
],
“url”: “http://t.co/IOwBrTZR”,
“display_url”: “youtube.com/watch?v=oHg5SJ…”,
“expanded_url”: “http://www.youtube.com/watch?v=oHg5SJYRHA0

]


示例(启用增强 URL 功能):

“urls”: [

“url”: “https://t.co/D0n7a53c2l”,
“expanded_url”: “http://bit.ly/18gECvy”,
“display_url”: “bit.ly/18gECvy”,
“unwound”:
“url”: “https://www.youtube.com/watch?v=oHg5SJYRHA0”,
“status”: 200,
“title”: “RickRoll’D”,
“description”: “http://www.facebook.com/rickroll548 As long as trolls are still trolling, the Rick will never stop rolling.”
,
“indices”: [
62,
85
]

]
user_mentionsUser Mention Objects 数组表示在 Post 文本中提及的其他 X 用户。示例:


“user_mentions”: [

“name”: “X API”,
“indices”: [
4,
15
],
“screen_name”: “xapi”,
“id”: 6253282,
“id_str”: “6253282”

]
symbolsSymbol Objects 数组表示 Post 文本中包含的符号,即 $cashtags。示例:


“symbols”: [

“indices”: [
12,
17
],
“text”: “twtr”

]
pollsPoll Objects 数组表示 Post 中包含的 X 投票。示例:

“polls”: [

“options”: [

“position”: 1,
“text”: “I read documentation once.”
,

“position”: 2,
“text”: “I read documentation twice.”
},

“position”: 3,
“text”: “I read documentation over and over again.”
}
],
“end_datetime”: “Thu May 25 22:20:27 +0000 2017”,
“duration_minutes”: 60

]

Hashtag 对象  

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

“indices”:[32,38]
text字符串hashtag 的名称(不包含前导“#”字符)。示例:

“text”:“nodejs”

媒体对象  

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

“display_url”:“pic.x.com/rJC5Pxsu”
expanded_urlStringdisplay_url 的扩展版本。链接到媒体显示页面。示例:

“expanded_url”: “http://x.com/yunorno/status/114080493036773378/photo/1
idInt64以 64 位整数表示的媒体 ID。示例:

“id”:114080493040967680
id_strString以字符串表示的媒体 ID。示例:

“id_str”:“114080493040967680”
indicesArray of Int整数数组,指示 URL 在 Post 文本中的起始和结束偏移量。第一个整数表示 URL 在 Post 文本中第一个字符的位置。第二个整数表示 URL 后第一个非 URL 字符的位置(如果 URL 是 Post 文本的最后部分,则为字符串的结尾)。示例:

“indices”:[15,35]
media_urlString直接指向上传媒体文件的 http:// URL。示例:

“media_url”:“http://pbs.twimg.com/media/DOhM30VVwAEpIHq.jpg

对于私信中的媒体,media_urlmedia_url_https 是相同的 https URL,必须使用 OAuth 1.0a 通过用户的 access token 签名请求来访问。

无法通过已认证的 x.com 会话访问图像。请访问此页面了解如何应对这些最新变化。

您无法直接在网页中嵌入这些图像。

请参阅照片媒体 URL 格式了解如何根据可用的 sizes 格式化照片的 URL(如 media_url_https)。
media_url_httpsString直接指向上传媒体文件的 https:// URL,用于在 https 页面中嵌入。示例:

“media_url_https”:“https://p.twimg.com/AZVLmp-CIAAbkyy.jpg

对于私信中的媒体,必须使用 OAuth 1.0a 通过用户的 access token 签名请求来访问 media_url_https

无法通过已认证的 x.com 会话访问图像。请访问此页面了解如何应对这些最新变化。

您无法直接在网页中嵌入这些图像。

请参阅照片媒体 URL 格式了解如何根据可用的 sizes 格式化照片的 URL(如 media_url_https)。
sizesSize Object显示媒体文件可用尺寸的对象。示例:


“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
}
}
}

请参阅照片媒体 URL 格式了解如何根据可用的 sizes 格式化照片的 URL(如 media_url_https)。
source_status_idInt64可为空。对于包含原本与不同 Post 关联的媒体的 Post,此 ID 指向原始 Post。示例:

“source_status_id”: 205282515685081088
source_status_id_strInt64可为空。对于包含原本与不同 Post 关联的媒体的 Post,此基于字符串的 ID 指向原始 Post。示例:

“source_status_id_str”: “205282515685081088”
typeString上传媒体的类型。可能的类型包括 photo、video 和 animated_gif。示例:

“type”:“photo”
urlString媒体链接的包装 URL。这对应于直接嵌入到原始 Post 文本中的 URL,以及 indices 参数的值。示例:

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

媒体尺寸对象

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

Sizes 对象 

字段类型说明
thumbSize Object缩略图尺寸的媒体信息。示例:

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

缩略图尺寸的照片媒体将被限制为在 150×150 边界内填充并裁剪(fill)。
largeSize Object大尺寸的媒体信息。示例:

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

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

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

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

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

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

Size 对象 

字段类型说明
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
   }
 }
}

当加载大尺寸照片时,Name 为: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 中 query(查询)字符串的各项按字母顺序排列。若媒体加载新增任何 query 项,仍必须保持字母顺序。例如,若新增一个名为 preferred_format 的假设性 query 项,应在 query 字符串中排在 formatname 之后。

URL 对象 

entities 部分包含一个 urls 数组,其中为 Post 正文中每个链接提供一个对象;如果没有链接,则为一个空数组。 当数组中至少有一项时,has:links 运算符会匹配。url: 运算符用于匹配 expanded_url 属性。如果你使用 Expanded URL enrichment,则 url: 运算符用于匹配 unwound.url(完全展开的 URL)属性。如果你使用 Enhanced URL enrichment,则使用 url_title:url_description: 运算符分别匹配 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 增强,以下 metadata 位于 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 运算符在数组中至少存在一项时匹配。
FieldTypeDescription
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 运算符在数组中至少有一项时匹配。
字段类型描述
indicesArray of Int一个整数数组,表示该符号/cashtag 在 Post 文本中的起始与结束偏移。第一个整数表示 Post 文本字符串中 字符的位置。第二个整数表示cashtag之后第一个字符的位置。因此,两数之差等于标签名称长度再加一(用于“ 字符的位置。第二个整数表示 cashtag 之后第一个字符的位置。因此,两数之差等于标签名称长度再加一(用于“”字符)。示例:

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

“text”:“twtr”

Poll 对象

如果 Post 包含投票,则 entities 部分将包含一个 polls 数组,内含单个 poll 对象。若未包含投票,则 entities 部分中不会有 polls 数组。 请注意,这些 Poll 元数据仅可通过以下 Enterprise 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 可能与内嵌“原始”Post 中提供的 entities 不同。对于转发,新文本会添加在原始 Post 正文之前;对于引用的 Post,新文本会追加到 Post 正文之后。 一般来说,最佳实践是在存在的情况下,从 retweeted_status 中的原始 Post 获取文本、entities、原始作者和日期。例外是需要获取属于附加引用部分的 X 实体。请参阅下文了解更多详情与提示。

转发

关于转发的一个重要细节是,无法在 Post 中添加额外的 X 实体(entities)。用户在转发时不能添加话题标签、URL 或其他信息。不过,转发(顶层)的 text 属性由原始 Post 文本构成,且前面会加上“RT @username: ”前缀。   在某些情况下,尤其是用户名较长的账号,新增的这些字符与原始 Post 正文相加,可能会超过原始 Post 文本的 140 字符长度限制。为继续支持基于 140 字符的显示与存储,顶层正文会在 Post 正文末尾截断并添加省略号(“…”)。因此,一些位于原始 Post 末尾的顶层 entities 可能会不正确或缺失,例如被截断的话题标签或 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 被部分截断,它们在顶层 entities 中缺失。你还会注意到,由于 text 字段中的“RT @floodsocial: ”前缀,新增了一个顶层的 user_mentions 实体。 不过,retweeted_status 中的 Post 文本和 entities 能完整、准确地反映原始 Post,没有任何截断或错误的实体。因此,我们建议在处理转发时依赖嵌套的 retweeted_status 对象。

引用推文

引用推文于 2016 年推出,与 转发 不同之处在于,当你“引用”一条 Post 时,你是在共享的 Post 之上添加新的内容。新内容几乎可以包含原始 Post 所具备的任何元素,包括新的文本、话题标签、提及和 URL。 引用推文可以包含原生媒体(照片、视频和 GIF),并会出现在 entities 对象下。 由于可以添加 X 的实体,引用中的实体很可能与原始实体不同。 在此示例中,一个新的 URL 和话题标签被放在引用推文的末尾。 此 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 在此情况下,顶层 entities 并未体现引用的详细信息。  然而,extended_tweet 中的 Post 文本和 entities 能完整、准确地反映引用推文,没有截断或错误的实体,因此我们建议在处理引用推文时依赖嵌套的 extended_tweet 对象。

用户对象的实体

用户对象的实体用于描述出现在用户自定义的个人资料 URL 与描述 fields 中的 URL。它们不描述 hashtags 或 user_mentions。与 Post 实体不同,用户实体可应用于其父对象中的多个 fields。为便于消歧,您会看到名为 url 和 description 的父节点,用以指明是哪一个 field 包含实体化的 URL。 在此示例中,用户的 url field 包含一个 t.co 链接,该链接在响应的 entities/url/urls[0] 节点中被完全展开。该用户在其描述中没有包裹的 URL。

JSON 示例

{
  "id": 6253282,
  "id_str": "6253282",
  "name": "X API",
  "screen_name": "xapi",
  "location": "San Francisco, CA",
  "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 扩展实体 

跳转至本页 介绍 扩展实体对象 示例 Tweets 和 JSON 载荷   - 包含四张原生照片的 Tweet   - 包含原生视频的 Tweet   - 包含动画 GIF 的 Tweet 后续步骤

介绍

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

        ]
      }
    }

示例 Post 与 JSON 负载

下面是一些示例 Post 及其关联的实体 metadata。 包含四张原生照片的 Post 包含话题标签、提及用户、现金标签、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": "雨中推文,第一部分 - Gnip 博客 - 社交数据和数据科学博客",
            "description": "如果几年前有人告诉我,有一天我会比较降水量和社交媒体时间序列数据,我会以为你在开玩笑。在 OneRain 的 13 年里,我帮助开发软件和监控系统……继续阅读 →"
            },
            "indices": [
              35,
              58
            ]
          }
        ],
        "user_mentions": [
          {
            "screen_name": "MentionThis",
            "name": "就是我",
            "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"
              }
            }
          }
        ]
      }
    }
只有在下面这个“扩展”有效负载中,才能找到最多四张原生照片。请注意,数组中的第一张照片与非扩展的 X entities 部分中包含的那张单张照片相同。用于照片的 media metadata 结构在 entitiesextended_entities 两个部分中是相同的。 下面是此 Post 的 extented_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 的扩展实体 metadata:
{
      "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 官方客户端可用。在这种情况下,负载(payload)中提供的所有视频 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 从 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 的扩展实体 metadata:
{
      "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 载荷 v2 的更新内容 https://t.co/oeF3ZHeKQQ",
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X Web App</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 载荷",
				"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 Web App</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": "隐藏回复 endpoint 今天正式上线!\n\n开发者现在可以隐藏 Tweet 的回复 - 这是开发者帮助改善公共对话健康的重要方式… https://t.co/VyfXs1RTXn",
	"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": 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": "隐藏回复 endpoint 今天正式上线!\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": "今天,我们很高兴宣布隐藏回复 endpoint 在新版 X API 中正式上线。隐藏回复 endpoint 允许您构建工具来帮助用户隐藏或取消隐藏其 Tweet 的回复。用户管理回复的原因有很多,包括减少对恶意、干扰性、误导性评论的关注,或让对话更具吸引力。通过此 endpoint,您可以构建工具来帮助 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 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": 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": "终于来了!🥁 向全新的 #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": "crop"
					},
					"medium": {
						"w": 1200,
						"h": 675,
						"resize": "fit"
					},
					"small": {
						"w": 680,
						"h": 383,
						"resize": "fit"
					},
					"large": {
						"w": 1280,
						"h": 720,
						"resize": "fit"
					}
				}
			}]
		},
		"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 上查看 Tweets 和趋势!\n\n点击这里查看…",
	"source": "<a href=\"https://mobile.x.com\" rel=\"nofollow\">X Web App</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 上查看 Tweets 和趋势!\n\n点击这里查看… https://t.co/RP9NgltX7i",
		"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": 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 上查看 Tweets 和趋势!\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 endpoint 现已停用。如果您有任何问题,请在论坛中告知我们… https://t.co/ahQvTYaOcZ",
	"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": 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 隐藏回复和最近搜索功能将于下周一停用,Nove… https://t.co/EEWN2Q9aXh",
		"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": 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 中新提供的隐藏回复和最近搜索 endpoint。详情: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 endpoint 将于11月16日停用。Labs v2 最近搜索 Labs v2 隐藏回复 如果调用这些 endpoint,它们将响应 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 endpoint 现已停用。如果您对 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: 📣 如果您喜欢我去年11月写的伦敦通勤教程,请查看使用…的重构版本",
 	"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": "#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 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 全新搜索 endpoint 的重构版本 🚇 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": "英国伦敦",
 			"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,
 	"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
 	}]
 }

Enterprise Activity Streams 数据对象

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

活动对象

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

数据字典

以下是这些“根级”“activity” 属性的 data 字典,以及指向其子对象 data 字典的链接。
属性类型描述
idstringPost 的唯一 IRI。详细来说,“tag” 是方案,“search.x.com” 代表方案的域名,2005 是方案的派生年份。
存储 Post 时,应将此作为唯一标识符或主键使用。
“id”: “tag:search.x.com,2005:1050118621198921728”
objectTypestring对象类型,始终设置为 “activity”
“objectType”: “activity”
objectobject表示正在发布或分享的 Post 的对象。
对于转发,这将包含一个完整的 “activity”,其中包含此架构中描述的相关字段。
对于原创 Post,这将包含一个 “note” 对象,其中包含此处描述的字段。
“object”:
“object”:
“objectType”: “note”,
“id”: “object:search.x.com,2005:1050118621198921728”,
“summary”: “To make room for more expression, we will now count all emojis as equal—including those with gender‍‍‍ ‍‍and skin t… https://t.co/MkGjXf9aXm”,
“link”: “http://x.com/API/statuses/1050118621198921728”,
“postedTime”: “2018-10-10T20:19:24.000Z”
long_objectobject当 Post 文本超过 140 个字符时,表示完整文本正文的对象。


“long_object”:
“body”: “To make room for more expression, we will now count all emojis as equal—including those with gender‍‍‍ ‍‍and skin tone modifiers 👍🏻👍🏽👍🏿. This is now reflected in Twitter-Text, our Open Source library. \n\nUsing Twitter-Text? See the forum post for detail: https://t.co/Nx1XZmRCXA”,
“display_text_range”: [
0,
277
],
“twitter_entities”:
“hashtags”: [],
“urls”: [

“url”: “https://t.co/Nx1XZmRCXA”,
“expanded_url”: “https://devcommunity.x.com/t/new-update-to-the-twitter-text-library-emoji-character-count/114607”,
“display_url”: “devcommunity.com/t/new-update-t…”,
“indices”: [
254,
277
]

],
“user_mentions”: [],
“symbols”: []

display_text_rangearray当 Post 文本超过 140 个字符时的显示文本范围。


“display_text_range”: [
0,
142
]
verbstring用户执行的操作类型。
Post:“post”
转发:“share”
已删除的 Post:“delete”
verb 是区分 Tweet 和真正转发的正确方式。但是,这仅适用于真正的转发,不适用于修改或引用的 Tweet,它们不使用 X 转发功能。有关 AS 动词的描述
点击此处
对于删除操作,请注意只会包含有限数量的字段,如下面的示例载荷所示。
“verb”: “post”
postedTimedate (ISO 8601)操作发生的时间,例如 Post 发布的时间。


“postedTime”: “2018-10-10T20:19:24.000Z”
generatorobject表示用于发布 Post 的工具的对象。这将包含生成 Post 的源应用程序的名称(“displayName”)和链接(“link”)。
“generator”:
“displayName”: “X Web Client”,
“link”: “http://x.com
providerobject表示活动提供者的 JSON 对象。这将包含 objectType(“service”)、提供者名称(“displayName”)和提供者网站链接(“link”)。
“provider”:

“objectType”: “service”,
“displayName”: “X”,
“link”: “http://www.x.com
linkstringPost 的永久链接。
“link”: “http://x.com/API/statuses/1050118621198921728
bodystringPost 文本。

在转发中,请注意 X 会通过在开头添加 “RT @username” 并截断原始文本并在末尾添加省略号来修改根级别的 body 值。因此,对于转发,您的应用程序应该查看 object.body 以确保提取原始 Post(被转发的)的未修改文本。
“body”: “With Cardiff, Crystal Palace, and Hull City joining the EPL from the Championship it will be a great relegation battle at the end.”
display_text_rangearray描述 body 文本中指示显示 Post 的字符范围。带有前导 @mentions 的 Post 将从大于 0 开始,带有附加媒体或超过 140 个字符的 Post 将在 long_object 中指示 display_text_range。

“display_text_range”: [
14,
42
]

“long_object”:
“display_text_range”: [
0,
277
]…
actorobject表示发布 Post 的 X 用户的对象。Actor 对象指向 X 用户,并包含与该用户相关的所有 metadata。
查看
actor 对象详情
inReplyToobject引用正在回复的 Post 的 JSON 对象(如果适用)。包含指向该 Post 的链接。
“inReplyTo”:

“link”: “http://x.com/GOP/statuses/349573991561838593
locationobject表示创建 Post 的 X “Place” 的 JSON 对象。这是从 X 平台传递的对象。

查看
location 对象
twitter_entitiesobject来自 X 数据格式的实体对象,包含 URL、提及和话题标签的列表。请参考此处的 X 实体文档。请注意,在转发中,X 可能会截断在根级别提取的实体值。因此,对于转发,您的应用程序应查看 object.twitter_entities 以确保使用非截断值。

查看 twitter_entities 对象详细信息
twitter_extended_entitiesobject来自 X 原生数据格式的对象,包含”media”。对于 twitter_entities 对象在”media”字段中存在数据的任何 Post,都会出现此对象,并且会包含 Post 中存在的多张照片。请注意,这是检索多照片 Post 媒体信息的正确位置。

多张照片在”media”数组中以逗号分隔的 JSON 对象表示。

查看 twitter_extended_entities 对象详细信息
gnipobject添加到活动负载中的对象,用于指示匹配规则,并根据流或产品上活跃的增强功能添加丰富数据。

查看 gnip 对象详细信息
edit_historyObject指示 Post 所有版本的唯一标识符。对于没有编辑的 Post,将有一个 ID。对于有编辑历史的 Post,将有多个 ID,按升序排列,反映编辑顺序,最新版本位于数组的最后位置。

Post ID 可用于获取和查看 Post 的先前版本。

示例:

edit_history”:
“initial_tweet_id”: “1283764123”
“edit_tweet_ids”: [“1283764123”, “1394263866”]
edit_controlsObject当存在时,指示 Post 仍可编辑的时长和剩余编辑次数。Post 仅在创建后的前 30 分钟内可编辑,最多可编辑五次。

Post ID 可用于获取和查看 Post 的先前版本。

示例:

“edit_controls”:
“editable_until_ms”: 123
“edits_remaining”: 3
editableBoolean当存在时,指示 Post 在发布时是否符合编辑条件。此字段不是动态的,当 Post 达到其可编辑时间限制或最大编辑次数时,不会从 True 切换到 False。以下 Post 功能将导致此字段为 false:

_ Post 被推广
_ Post 有投票
_ Post 是非自我线程回复
_ Post 是转发(请注意引用 Tweet 符合编辑条件)
_ Post 是 nullcast
_ 社区 Post
_ Superfollow Post
_ 协作 Post

其他 Post 属性

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

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

“retweetCount”:153

已弃用的属性

字段type描述
geoobject创建该 Post 时的点位置信息。
twitter_filter_levelstring为避免引入破坏性变更而保留的已弃用字段

嵌套的 Post 活动对象

在多种情况下,Post 对象会包含其他嵌套的 Post。如果你正在处理嵌套对象,那么该 JSON 负载将包含多个对象,并且每个 Post 对象都可能包含其自身的对象。根级对象会包含所执行操作类型的信息,即它是转发(Retweet)还是引用推文(Quote Tweet),并且还可能包含一个用于描述被分享“原始”Post 的对象。扩展的 Post 会包含一个嵌套的扩展对象,其长度可超过 140 个字符;这是在 2017 年更新时为避免破坏性变更而采用的方案。下面将分别介绍每个嵌套对象字典。 转发 Retweets 的活动 stream 格式包含一个嵌套对象,其中 type 为 “activity”,verb 为 “note”,用于表示被转发的原始 Post。
{
	"id": "tag:search.x.com,2005:222222222222",
	"objectType": "activity",
	"verb": "share",
	"body": "RT @TheOriginalTweeter: 咖啡与艺术 ☕️",
	"actor": {
		"displayName": "TheRetweeter"
	},
	"object": {
		"id": "tag:search.x.com,2005:11111111111",
		"objectType": "activity",
		"verb": "post",
		"body": "咖啡与艺术 ☕️",
		"actor": {
			"displayName": "TheOriginalTweeter"
		},
		"object": {
			"objectType": "note",
			"id": "object:search.x.com,2005:11111111111",
			"summary": "咖啡与艺术 ☕️",
			"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: 很兴奋能够发布第一批 endpoint - 在我们完成之前还会有更多。@XDevelopers #DevRel 团队…",
    	"actor": {},
    	"object": {},
    	"favoritesCount": 0,
    	"twitter_entities": {},
    	"twitter_lang": "en",
    	"retweetCount": 13,
    	"gnip": {},
    	"twitter_filter_level": "low",
    	"twitter_quoted_status": {}
    }

Long 对象

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 客户端",
    "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": {参见 twitter_entities 对象},
  "actor": {参见 actor 对象},
  "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": {参见 twitter_entities 对象},
  "twitter_lang": "en",
  "retweetCount": 153,
  "gnip": {参见 gnip 对象},
  "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此用户用于标识自己的屏幕名、handle 或别名。具有唯一性但可能变更。尽可能使用 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 时,表示该用户选择保护其 Posts。参见 About Public and Protected Posts。示例:

“protected”: true
verifiedBoolean为 true 时,表示该用户的账号已通过验证。参见 Verified Accounts。示例:

“verified”: false
followersCountInt该账号当前的关注者数量。在某些压力情况下,此字段会暂时显示“0”。示例:

“followers_count”: 21
friendsCountInt该账号正在关注的用户数量(亦称“followings”)。在某些压力情况下,此字段会暂时显示“0”。示例:

“friends_count”: 32
listedCountInt该用户所属的公共 List 数量。示例:

“listed_count”: 9274
favoritesCountInt该用户在账号生命周期内 like 的 Posts 数量。字段名采用英式拼写,出于历史原因。示例:

“favourites_count”: 13
statusesCountInt该用户发布的 Posts 数量(包含转发)。示例:

“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": "发布关于变更和服务问题的 Tweets。关注 @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 object 中 profileLocation 的 location 对象内。由 profile geo enrichment 推导的地点地址。粒度级别可能不同。

“address”: {

**          “country”: “United States”,

          “countryCode”: “US”,

          “locality”: “Providence”,

          “region”: “Rhode Island”,

          “subRegion”: “Providence County”

        }**
geoobject位于 gnip object 中 profileLocation 的 location 对象内。由 profile geo enrichment 推导的地点质心坐标。

“geo”: {

**          “coordinates”: [

-98.5
,

39.76

          ],

          “type”: “point”

        }**
示例
	"location": {
    "objectType": "place",
    "displayName": "Kansas, USA",
    "name": "Kansas",
    "country_code": "United States",
    "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 对象包含由活动增益/丰富处理添加的 metadata,以及指示该活动匹配到的规则的信息。

数据字典

字段类型描述
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
      }
    ]
  }

活动 stream 负载示例

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 载荷 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 载荷 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 载荷",
			"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 Web App",
		"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 Dev",
		"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": "隐藏回复 endpoint 今天正式发布!\n\n开发者可以隐藏 Tweet 的回复 - 这是开发者帮助改善公共对话健康的重要方式… https://t.co/VyfXs1RTXn",
	"long_object": {
		"body": "隐藏回复 endpoint 今天正式发布!\n\n开发者可以隐藏 Tweet 的回复 - 这是开发者使用 #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": "隐藏回复 endpoint 今天正式发布!\n\n开发者可以隐藏 Tweet 的回复 - 这是开发者帮助改善公共对话健康的重要方式… 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 中隐藏回复 endpoint 正式发布。隐藏回复 endpoint 允许您构建工具,帮助用户隐藏或显示其 Tweet 的回复。用户管理回复的原因多种多样,包括减少对滥用、干扰、误导性评论的关注,或让对话更具吸引力。通过此 endpoint,您可以构建工具帮助 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 Web App",
		"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 Web App",
		"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 上查看 Tweet 和趋势!\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 Web App",
			"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 上查看 Tweet 和趋势!\n\n点击查看详情… https://t.co/RP9NgltX7i",
		"long_object": {
			"body": "我使用 APL 为 X 构建了一个 Alexa 技能,可以在 Echo Show 上查看 Tweet 和趋势!\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。欢迎与我讨论使用 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": "Seattle, WA"
			},
			"favoritesCount": 358
		},
		"object": {
			"objectType": "note",
			"id": "object:search.x.com,2005:1229843515603144704",
			"summary": "我使用 APL 为 X 构建了一个 Alexa 技能,可以在 Echo Show 上查看 Tweet 和趋势!\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 Web App",
 		"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 endpoint 现已停用。如果您有疑问,请在论坛中告知我们… https://t.co/ahQvTYaOcZ",
 	"long_object": {
 		"body": "按计划,下面引用的 Labs v2 endpoint 现已停用。如果您有疑问或需要 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 endpoint 现已停用。如果您有疑问,请在论坛中告知我们… 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 endpoint 将于 11 月 16 日停用。Labs v2 最近搜索 Labs v2 隐藏回复 如果调用,这些 endpoint 将响应 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 Web App",
 			"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 中现已可用的新隐藏回复和最近搜索 endpoint。详情: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 for 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/en/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 Web App",
			"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 新搜索 endpoint 的重构版本 🚇 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": "London, UK"
			},
			"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 Web App",
			"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 的数据开展历史研究,了解这一路演进的时间轴,对于从数据存档中筛选出感兴趣的 Post 至关重要。 X 最初作为一款简单的 SMS 移动 App 上线,随后发展为一个完善的通信平台——一个具备完整 API 体系的平台。API 始终是 X 网络的支柱。第一版 API 在 X 上线不久后就发布。2009 年首次引入 Post 的地理标记时,这一能力通过 Geo API 提供(随后,“地理标记”Post 的功能被集成到 X.com 的用户界面中)。如今,X 的 API 驱动着这个双向通信网络,使其成为突发新闻与信息共享的来源。基于这一全球、实时通信通道进行构建的机遇无穷无尽。 X 提供两种历史 API,可访问每一条公开可用的 Post:Historical PowerTrack 和 Full-Archive Search API。这两种 API 都提供一组用于查询与收集目标 Post 的“运算符”。这些运算符可匹配与每条 Post 相关的多种属性——多达数百种,例如 Post 的文本内容、作者的账号名称,以及 Post 中分享的链接。Post 及其属性以 JSON 编码,这是一种常见的基于文本的数据交换格式。因此,随着新功能的引入,会出现新的 JSON 属性,通常也会引入新的 API 运算符以匹配这些属性。如果你的用例需要“倾听”世界在 X 上说过的话,那么越了解各运算符从何时开始具备可供匹配的 JSON metadata,你的 Historical PowerTrack 过滤器就越有效。 接下来,我们将介绍一些关键概念,为理解 Post metadata 的更新如何影响你定位感兴趣的数据信号作铺垫。

关键概念**

从用户约定到 X 的一等对象(first-class objects

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

Post 的 metadata、可变性、更新与时效性

虽然 Post 的文本长度有固定上限,但一个 Post 的 JSON 描述包含 100 多个属性。这些属性包括由谁在何时发布、它是原创 Post 还是转发(Retweet),以及一组一等对象数组,例如话题标签、提及和共享链接。对于发布该 Post 的账号,会有一个 User(或 Actor)对象,包含多种属性,提供该用户的 Profile 及其他账号 metadata。Profile 包括简短的个人简介、主页位置(自由文本)、首选语言,以及可选的网站链接。 有些账号 metadata 永不变化(例如数值型用户 id 和创建日期),有些会随时间缓慢变化,而另一些属性则更频繁变化。人们会更换工作、搬家,公司也会更新其信息。当你收集历史 Posts 时,需要理解:有些 metadata 反映的是_发布时的状态_,而另一些 metadata 则反映_提交 query(查询)时的状态_。 对于所有历史 API,用户的个人资料描述、显示名称,以及个人资料的“home”属性都会更新为查询时的取值。

“原生”媒体

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

2006

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

2007

  • 1月 - @replies 成为一级对象,并在界面中提供带有 in_reply_to metadata 的“回复”按钮。
  • 4月 - 转发 成为一种惯例。
  • 8月 - #hashtags 成为搜索和组织 Post 的主要工具。

2009

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

2010

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

2011

  • 5月 - 推出“关注”按钮,让用户更容易关注与网站关联的账号。
  • 8月 - 推出原生图片功能。

2012

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

2014

  • 3 月 - 支持照片标注与最多四张照片。引入了扩展版 X Entities metadata。
  • 4 月 - X UI 原生支持表情符号。自至少 2008 年起,表情符号已在 Posts 中被广泛使用。

2015

  • 4月 - X 的“Post”用户界面设计变更导致带地理标签的 Post 减少。
  • 10月 - 推出 X Polls。最初 Polls 支持两个选项,投票期限为 24 小时。到 11 月,Polls 开始支持四个选项,投票期限从 5 分钟到 7 天。投票 metadata 自 2017 年 2 月起提供(仅限增强的原生格式)。

2016

2017

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

识别假阴性

在编写过滤器时,一个重要的要点是:所有可匹配的 metadata 运算符都有其“生效”日期。如果你使用的运算符依赖于在该 Post 发布之后才引入的 metadata,那么就会出现假阴性。比如,假设你对所有提及“snow”并分享视频的 Posts 感兴趣。如果你用 has:videos 运算符构建规则(该运算符匹配带有“原生”视频的 Posts),那么这一子句将无法匹配 2015 年之前的任何 Posts。 然而,早在 2015 年之前,在 X 上分享视频就已十分常见。在那之前,用户通常分享指向其他站点所托管视频的链接;而在 2015 年,X 将新的“分享视频”功能直接内置到平台。要查找这些更早的相关 Posts,你可以加入类似 url:"youtube.com" 的规则子句。 注意,对于 Search APIs,随着其索引的重建,存在一些将 metadata “回填”的情况。一个典型例子是 cashtags,它在2009年开始被广泛用于讨论股票代码。在2015年引入cashtags,它在 2009 年开始被广泛用于讨论股票代码。在 2015 年引入 cashtag 运算符之后,Search 索引被重建,在此过程中会从所有 Post 正文中抽取该符号实体,甚至追溯到 2006 年早期——当时“”主要用于俚语:“Ihopeit”主要用于俚语:“I hope it now oon!”。

识别并按与你用例相关的 Post 属性进行筛选

某些 metadata(例如 X 账号的数值型 id)自平台上线之初就存在(也是永不变化的账号 metadata 示例)。另一些 metadata 则直到 X 于 2006 年启动很久之后才被引入。新引入的 metadata 示例包括 转发 的 metadata、Post 的地理位置、URL 标题与描述,以及“原生”媒体。下文列出了因这些 X 平台更新而发生根本性变化的最常见 Post 属性类型。 在大多数情况下,这些属性的筛选/匹配行为取决于你使用的历史 Post API。为帮助判断哪款产品最适合你的研究与用例,下面的属性详情包含概要级的产品信息。

X 个人资料

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

原始 Post 和转发

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

Post 语言分类

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

Post 的地理参照

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