Introduction

With the launch of the v2 version of the X API, we have adopted a new data response format and method of requesting different objects and fields, which we are simply calling the X API v2 format. 

In the general differences section, you can learn about some changes that are relevant to standard, and enterprise users. However, we also put together a specific guide for the standard v1.1 Native format, the enterprise Native Enriched format, and the enterprise Activity Streams format which helps to map fields and explains which fields and expansions you must use to request the new v2 fields. 

You may also be interested in our visual data format migration tool to help you quickly see the differences between the X API v1.1 data format and the X API v2 format.

General differences

Requesting objects and fields

One of the biggest changes between the pre-v2 endpoints and v2 is that the newer version only returns a few fields by default, whereas standard, premium, and enterprise endpoints deliver most fields by default. The new version uses parameters called fields and expansions to specifically request additional data beyond the defaults, meaning that you can request just the data you need without having to ingest fields that don’t matter to you. 

Any fields that you request that relate to the primary data object will return in that primary data object along with the default values. However, if you request any expanded objects using the expansions parameter, the secondary objects will return in a new includes object. You can match the expanded objects in the includes object back to the primary object by using the ID field which will return in both.

For example, if you are using the v2 Post lookup endpoint and you include the expansions=author_id parameter in your request, you will receive the author_id field within the primary Post object, as well as a user object per Post in the includes object, each of which will include the default id field that can be used to match the user object back to the Post object. Here is an example of what this looks like:

{
  "data": [
    {
      "author_id": "2244994945",
      "id": "1397568983931392004",
      "text": "The Twitter Developer Platform. Ooh la la! https://t.co/iGTdPXBfOv https://t.co/Ze8z8EODdg"
    }
  ],
  "includes": {
    "users": [
      {
        "id": "2244994945",
        "name": "Twitter Dev",
        "username": "TwitterDev"
      }
    ]
  }
}

Updated JSON design

In addition to the changes in how you request certain fields, X API v2 is also introducing new JSON designs for the objects returned by the APIs, including Post and user objects.

  • At the JSON root level, the standard endpoints return Post objects in a statuses array, while X API v2 returns a data array. 
  • Instead of referring to Retweeted and Quoted “statuses”, X API v2 JSON refers to Retweeted and Quoted Tweets. Many legacy and deprecated fields, such as contributors and user.translator_type are being removed. 
  • Instead of using both favorites (in Post object) and favourites (in user object), X API v2 uses the term like. 
  • X is adopting the convention that JSON values with no value (for example, null) are not written to the payload. Post and user attributes are only included if they have a non-null values.   

New v2 fields

We also introduced a new set of fields to the Post object including the following:

  • conversation_id field
  • Two new annotations fields, including context and entities
  • Several new metrics fields 
  • A new reply_setting field, which shows you who can reply to a given Post

Migrating from standard v1.1’s data format to v2

If you haven’t already, we recommend that you read through the data formats migration introduction to start. You may also be interested in our visual data format migration tool to help you quickly see the differences between the X API v1.1 data format and the X API v2 format.

The standard v1.1 data format, also known as the native format, is the primary format that delivers with the standard v1.1 endpoints.

If you are using the premium product, please refer to the native enriched guide. Enterprise clients might be using native enriched or activity streams, depending on how you are set up within the Gnip console. 

Standard v1.1 vs v2 payload structure

The following table displays the high-level objects and format that you can expect to receive from v2 compared to the v1.1 format.

v1.1 structurev2 structure
Default{
all tweet object fields,
“entities”: {
“hashtags”: [],
“symbols”: [],
“user_mentions”: [],
“urls”: [],
“media”: []
},
“extended_entities”: ,
“user”: ,
“place”: ,
“retweeted_status/quoted_status”
}
{
“data”: [{
“id”,
“text”,

“edit_history_tweet_ids”
}]
}
With defined field and expansion parameters{
“data”: [{
tweet object fields,
“entities”: {
“hashtags”: [],
“cashtags”: [],
“mentions”: [],
“urls”: [],
},
“attachments”: {

“media_keys”: [],

“poll_ids”: []

}
}],
“includes”: [
“tweets”: [tweet objects],
“users”: [user objects],
“media”: [media objects],
“places”: [place object],

“polls”: [poll object]
],

“matching_rules”: []
}

Field mapping

The following section describes which v1.1 fields map to v2 fields, as well as which v2 parameters are required to receive the new field.  

Tweet object

Twitter 1.1 formatTwitter v2 formatRequired v2 parameters
created_atdata.created_attweet.fields=created_at
idN/A id is a string
id_strdata.iddefault
textdata.textdefault
full_textN/A text includes the complete text
truncatedN/A text includes the complete text
display_text_rangeN/A text includes the complete text
edit_historydata.edit_history_tweet_idsdefault
edit_controlsdata.edit_controlstweet.fields=edit_controls
editabledata.edit_controls.is_edit_eligibletweet.fields=edit_controls
entitiesdata.entitiestweet.fields=entities
entities.user_mentionsdata.entities.mentionstweet.fields=entities
entities.symbolsdata.entities.cashtagstweet.fields=entities
entities.hashtagsdata.entities.hashtagstweet.fields=entities
entities.urlsdata.entities.urlstweet.fields=entities
entities.mediaincludes.mediaexpansions=attachments.media_keys
extended_entitiesdata.attachmentstweet_fields=attachments
in_reply_to_status_idN/A referenced_tweets.id is a string
in_reply_to_status_id_strdata.referenced_tweets.id (if type=replied_to)expansions=referenced_tweets.id
in_reply_to_user_idN/A in_reply_to_user_id is a string
in_reply_to_user_id_strdata.in_reply_to_user_idtweet.fields=in_reply_to_user_id
in_reply_to_screen_nameincludes.users..usernametweet.fields=in_reply_to_user_id&expansions=entities.mentions.username
userincludes.usersexpansions=author_id
geodata.geo.place_idtweet.fields=geo
coordinatesdata.geo.place_idexpansions=geo.place_id
placedata.geo.place_idexpansions=geo.place_id
retweeted_statusdata.referenced_tweets.id (if type=retweeted)expansions=referenced_tweets.id
is_quoted_statusNot available
quoted_status_idN/A referenced_tweets.id is a string
quoted_status_id_strdata.referenced_tweets.id (if type=quoted)expansions=referenced_tweets.id
quoted_status_permalinkNot Available
quoted_statusdata.referenced_tweets (if type=quoted)expansions=referenced_tweets.id
retweet_countdata.public_metrics.retweet_counttweet.fields=public_metrics
favorite_countdata.public_metrics.like_counttweet.fields=public_metrics
favoritedNot available
retweetedNot available
possibly_sensitivedata.possibly_sensitivetweet.fields=possibly_sensitive
langdata.langtweet.fields=lang
scopesNot available
withhelddata.withheldtweet.fields=withheld

Example

Tweet object in 1.1

Example URI with parameters:

https://api.x.com/1.1/statuses/lookup.json?id=1359554366051504129&tweet_mode=extended
Tweet object and request with v2

Example URI with parameters:

https://api.x.com/2/tweets?ids=1359554366051504129&tweet.fields=attachments,author\_id,context\_annotations,conversation\_id,created\_at,entities,geo,id,in\_reply\_to\_user\_id,lang,possibly\_sensitive,public\_metrics,referenced\_tweets,reply\_settings,text,withheld
{
“created_at”: “Wed Feb 10 17:26:34 +0000 2021”,
“id”: 1359554366051504129,
“id_str”: “1359554366051504129”,
“text”: “Go ahead, follow another puppy account. We won’t judge. \n\nIntroducing the manage follows endpoints to the new… https:\/\/t.co\/3cBZKZUevF”,
“truncated”: true,
“entities”: {
“hashtags”: [],
“symbols”: [],
“user_mentions”: [],
“urls”: [{
“url”: “https:\/\/t.co\/3cBZKZUevF”,
“expanded_url”: “https:\/\/twitter.com\/i\/web\/status\/1359554366051504129”,
“display_url”: “twitter.com\/i\/web\/status\/1…”,
“indices”: [
111,
134
]
}]
},

“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”: {

},
“geo”: null,
“coordinates”: null,
“place”: null,
“contributors”: null,
“is_quote_status”: false,
“retweet_count”: 18,
“favorite_count”: 98,
“favorited”: false,
“retweeted”: false,
“possibly_sensitive”: false,
“possibly_sensitive_appealable”: false,
“lang”: “en”
}
{
“data”: [{
“id”: “1359554366051504129”,
“text”: “Go ahead, follow another puppy account. We won’t judge. \n\nIntroducing the manage follows endpoints to the new #TwitterAPI. You can now use the v2 API to follow and unfollow accounts. Learn more https://t.co/mtpd9VIMDa”,
“lang”: “en”,
“conversation_id”: “1359554366051504129”,
“possibly_sensitive”: false,
“reply_settings”: “everyone”,
“created_at”: “2021-02-10T17:26:34.000Z”,
“author_id”: “2244994945”,
“public_metrics”: {
“retweet_count”: 18,
“reply_count”: 11,
“like_count”: 98,
“quote_count”: 7
},
“entities”: {
“hashtags”: [{
“start”: 110,
“end”: 121,
“tag”: “TwitterAPI”
}],
“urls”: [{
“start”: 194,
“end”: 217,
“url”: “https://t.co/mtpd9VIMDa”,
“expanded_url”: “https://devcommunity.x.com/t/introducing-the-new-manage-follows-endpoints-to-the-twitter-api-v2/149465”,
“display_url”: “devcommunity.com/t/introducing-…”,
“images”: [{
“url”: “https://pbs.twimg.com/news\_img/1359554367905427457/DczC72\_\_?format=jpg&name=orig”,
“width”: 1200,
“height”: 630
},
{
“url”: “https://pbs.twimg.com/news\_img/1359554367905427457/DczC72\_\_?format=jpg&name=150x150”,
“width”: 150,
“height”: 150
}
],
“status”: 200,
“title”: “Introducing the new manage follows endpoints to the X API v2”,
“description”: “To follow, or not to follow? You’re now free to answer that question however you like using the X API v2. Today, we’re excited to announce the release of the new manage follows endpoints into the new Twitter API. As teased when we launched the follows lookup endpoints a little over a month ago, the ability to manage follow relationships is finally here. These are some of our most popular endpoints on our v1.1 APIs, so we’re excited to unlock a wide range of use cases on X API v2. W…”,
“unwound_url”: “https://devcommunity.x.com/t/introducing-the-new-manage-follows-endpoints-to-the-twitter-api-v2/149465
}]
},
“context_annotations”: [{
“domain”: {
“id”: “46”,
“name”: “Brand Category”,
“description”: “Categories within Brand Verticals that narrow down the scope of Brands”
},
“entity”: {
“id”: “781974596752842752”,
“name”: “Services”
}
},
{
“domain”: {
“id”: “47”,
“name”: “Brand”,
“description”: “Brands and Companies”
},
“entity”: {
“id”: “10045225402”,
“name”: “Twitter”
}
}
]
}]
}

User object

Twitter 1.1 formatTwitter v2 formatRequired v2 parameters
user_iddata.author_idtweet.fields=author_id
user.idN/A use includes.users.id
user.id_strincludes.users.idexpansions=author_id
user.nameincludes.users.nameexpansions=author_id
user.screen_nameincludes.user.usernameexpansions=author_id
user.locationincludes.users.locationexpansions=author_id&user.fields=location
user.descriptionincludes.users.descriptionexpansions=author_id&user.fields=description
user.urlincludes.users.urlexpansions=author_id&user.fields=entities
user.entitiesincludes.users.entities
user.entities.url.urls.urlincludes.users.entities.url.urls.url
user.entities.url.urls.expanded_urlincludes.users.entities.url.urls.expanded_urlexpansions=author_id&user.fields=entities
user.entities.url.urls.display_urlincludes.users.entities.url.urls.display_urlexpansions=author_id&user.fields=entities
user.entities.url.urls.display_url.indicies[0]includes.users.entities.url.urls.startexpansions=author_id&user.fields=entities
user.entities.url.urls.display_url.indicies[1]includes.users.entities.url.urls.endexpansions=author_id&user.fields=entities
user.protectedincludes.users.protectedexpansions=author_id&user.fields=protected
user.followers_countincludes.users.public_metrics.followers_countexpansions=author_id&user.fields=public_metrics
user.friends_countincludes.users.public_metrics.following_countexpansions=author_id&user.fields=public_metrics
user.listed_countincludes.users.public_metrics.listed_countexpansions=author_id&user.fields=public_metrics
user.created_atincludes.users.created_atexpansions=author_id&user.fields=created_at
user.favourites_count
user.verifiedincludes.users.verifiedexpansions=author_id&user.fields=verified
user.statuses_countincludes.users.public_metrics.tweet_countexpansions=author_id&user.fields=public_metrics
user.profile_image_url_httpsincludes.users.profile_image_urlexpansions=author_id&user.fields=profile_image_url

Example

User object in 1.1User object and request with v2
”user”: {
“id”: 2244994945,
“id_str”: “2244994945”,
“name”: “Twitter Dev”,
“screen_name”: “TwitterDev”,
“location”: “127.0.0.1”,
“description”: “The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.”,
“url”: “https:\/\/t.co\/3ZX3TNiZCY”,
“entities”: {
“url”: {
“urls”: [{
“url”: “https:\/\/t.co\/3ZX3TNiZCY”,
“expanded_url”: “https:\/\/developer.x.com\/en\/community”,
“display_url”: “developer.x.com\/en\/community”,
“indices”: [
0,
23
]
}]
},
“description”: {
“urls”: []
}
},
“protected”: false,
“followers_count”: 517232,
“friends_count”: 2032,
“listed_count”: 1722,
“created_at”: “Sat Dec 14 04:35:55 +0000 2013”,
“favourites_count”: 2134,
“utc_offset”: null,
“time_zone”: null,
“geo_enabled”: true,
“verified”: true,
“statuses_count”: 3677,
“lang”: null,
“contributors_enabled”: false,
“is_translator”: false,
“is_translation_enabled”: 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_image_url”: “http:\/\/pbs.twimg.com\/profile_images\/1354494203451961345\/d8HkZl6p_normal.jpg”,
“profile_image_url_https”: “https:\/\/pbs.twimg.com\/profile_images\/1354494203451961345\/d8HkZl6p_normal.jpg”,
“profile_banner_url”: “https:\/\/pbs.twimg.com\/profile_banners\/2244994945\/1611792896”,
“profile_link_color”: “0084B4”,
“profile_sidebar_border_color”: “FFFFFF”,
“profile_sidebar_fill_color”: “DDEEF6”,
“profile_text_color”: “333333”,
“profile_use_background_image”: false,
“has_extended_profile”: true,
“default_profile”: false,
“default_profile_image”: false,
“following”: null,
“follow_request_sent”: null,
“notifications”: null,
“translator_type”: “regular”
}
{
“data”: [{
“author_id”: “2244994945”,
“id”: “1362876655061073928”,
“text”: “From our living rooms to yours 🐱‍💻🛋️Our developer advocates have some exciting Twitch streams and virtual events planned to help you get started with the new #TwitterAPI. Check out the schedule for details, and let us know if you want to see more!\n👇\nhttps://t.co/cixDY9qkvH”
}],
“includes”: {
“users”: [{
“public_metrics”: {
“followers_count”: 517233,
“following_count”: 2034,
“tweet_count”: 3677,
“listed_count”: 1727
},
“username”: “TwitterDev”,
“entities”: {
“url”: {
“urls”: [{
“start”: 0,
“end”: 23,
“url”: “https://t.co/3ZX3TNiZCY”,
“expanded_url”: “https://developer.x.com/en/community”,
“display_url”: “developer.x.com/en/community”
}]
},
“description”: {
“hashtags”: [{
“start”: 17,
“end”: 28,
“tag”: “TwitterDev”
},
{
“start”: 105,
“end”: 116,
“tag”: “TwitterAPI”
}
]
}
},
“description”: “The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.”,
“name”: “Twitter Dev”,
“verified”: true,
“location”: “127.0.0.1”,
“id”: “2244994945”,
“protected”: false,
“url”: “https://t.co/3ZX3TNiZCY”,
“profile_image_url”: “https://pbs.twimg.com/profile\_images/1354494203451961345/d8HkZl6p\_normal.jpg”,
“created_at”: “2013-12-14T04:35:55.000Z”
}]
}
}

Entities and expanded entities objects

Twitter 1.1 formatTwitter v2 formatRequired v2 parametersType in v2
entitiesdata.entitiestweet.fields=entitiesobject
entities.hashtagsdata.entities.hashtagstweet.fields=entitiesarray of objects
entities.hashtags.indices[0]data.entities.hashtags.starttweet.fields=entitiesnumber
entities.hashtags.indices[1]data.entities.hashtags.endtweet.fields=entitiesnumber
entities.hashtags.textdata.entities.hashtags.tagtweet.fields=entitiesstring
entities.urlsdata.entities.urlstweet.fields=entitiesarray of objects
entities.urls.indices[0]data.entities.urls.starttweet.fields=entitiesnumber
entities.urls.indices[1]data.entities.urls.endtweet.fields=entitiesnumber
entities.urls.urldata.entities.urls.urltweet.fields=entitiesstring
entities.user_mentionsdata.entities.mentionstweet.fields=entitiesarray of objects
entities.user_mentions.indicies[0]data.entities.mentions.starttweet.fields=entitiesnumber
entities.user_mentions.indicies[1]data.entities.mentions.endtweet.fields=entitiesnumber
entities.user_mentions.screen_namedata.entities.mentions.usernametweet.fields=entitiesstring
entities.symbolsdata.entities.cashtagstweet.fields=entitiesarray of objects
entities.symbols.indices[0]data.entities.cashtags.starttweet.fields=entitiesnumber
entities.symbols.indices[1]data.entities.cashtags.endtweet.fields=entitiesnumber
entities.symbols.textdata.entities.cashtags.tagtweet.fields=entitiesstring
entities.mediaincludes.mediaexpansions=attachments.media_keysarray of objects
entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keysstring
entities.media.typeincludes.media.media.typeexpansions=attachments.media_keysstring
entities.media.media_urlN/A use includes.media.urlstring
entities.media.media_url_httpsincludes.media.urlexpansions=attachments.media_keys&media.fields=urlstring
entities.media.url
entities.media.display_url
entities.media.expanded_url
entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_urlstring
extended_entitiesdata.attachmentstweet_fields=attachmentsobject
extended_entitiesdata.attachments.media_keystweet.fields=attachmentsarray of objects
extended_entities.mediaincludes.mediaexpansions=attachments.media_keysarray of objects
extended_entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keysstring
extended_entities.media.typeincludes.media.media.typeexpansions=attachments.media_keysstring
extended_entities.media.sizes.thumb.wNot Available
extended_entities.media.sizes.thumb.hNot Available
extended_entities.media.sizes.thumb.resizeNot Available
extended_entities.media.sizes.large.wincludes.media.heightexpansions=attachments.media_keys&media.fields=height
extended_entities.media.sizes.large.hincludes.media.widthexpansions=attachments.media_keys&media.fields=width
extended_entities.media.sizes.large.resizeNot Available
extended_entities.media.sizes.small.wNot Available
extended_entities.media.sizes.small.hNot Available
extended_entities.media.sizes.small.resizeNot Available
extended_entities.media.sizes.medium.wNot Available
extended_entities.media.sizes.medium.hNot Available
extended_entities.media.sizes.medium.resizeNot Available
extended_entities.media.media_url_httpsincludes.media.urlexpansions=attachments.media_keys&media.fields=urlstring
extended_entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_urlstring
extended_entities.media.video_info.duration_millisincludes.media.duration_msexpansions=attachments.media_keys&media.fields=duration_msnumber

Example

Entities and extended entities in v1.1 (with video)Entities, attachments and includes in v2

https://api.x.com/2/tweets?ids=1370161532013735937&expansions=attachments.media\_keys,entities.mentions.username&tweet.fields=entities&user.fields=created\_at,description,entities,location,name,profile\_image\_url,protected,public\_metrics,url,username,verified,withheld&media.fields=duration\_ms,height,media\_key,preview\_image\_url,public\_metrics,type,url,width
”entities”: {
“hashtags”: [{
“text”: “test”,
“indices”: [
8,
13
]
}],
“symbols”: [],
“user_mentions”: [{
“screen_name”: “TwitterDev”,
“name”: “Twitter Dev”,
“id”: 2244994945,
“id_str”: “2244994945”,
“indices”: [
31,
42
]
}],
“urls”: [{
“url”: “https:\/\/t.co\/XVLZ3uwikc”,
“expanded_url”: “https:\/\/developer.x.com\/en”,
“display_url”: “developer.x.com\/en”,
“indices”: [
91,
114
]
}],
“media”: [{
“id”: 1370161464028196868,
“id_str”: “1370161464028196868”,
“indices”: [
115,
138
],
“media_url”: “http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/1370161464028196868\/pu\/img\/cGLCoXBHVktkwlC5.jpg”,
“media_url_https”: “https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/1370161464028196868\/pu\/img\/cGLCoXBHVktkwlC5.jpg”,
“url”: “https:\/\/t.co\/dz4oByygWA”,
“display_url”: “pic.x.com\/dz4oByygWA”,
“expanded_url”: “https:\/\/twitter.com\/furiouscamper\/status\/1370161532013735937\/video\/1”,
“type”: “photo”,
“sizes”: {
“thumb”: {
“w”: 150,
“h”: 150,
“resize”: “crop”
},
“small”: {
“w”: 383,
“h”: 680,
“resize”: “fit”
},
“large”: {
“w”: 720,
“h”: 1280,
“resize”: “fit”
},
“medium”: {
“w”: 675,
“h”: 1200,
“resize”: “fit”
}
}
}]
},
“extended_entities”: {
“media”: [{
“id”: 1370161464028196868,
“id_str”: “1370161464028196868”,
“indices”: [
115,
138
],
“media_url”: “http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/1370161464028196868\/pu\/img\/cGLCoXBHVktkwlC5.jpg”,
“media_url_https”: “https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/1370161464028196868\/pu\/img\/cGLCoXBHVktkwlC5.jpg”,
“url”: “https:\/\/t.co\/dz4oByygWA”,
“display_url”: “pic.x.com\/dz4oByygWA”,
“expanded_url”: “https:\/\/twitter.com\/furiouscamper\/status\/1370161532013735937\/video\/1”,
“type”: “video”,
“sizes”: {
“thumb”: {
“w”: 150,
“h”: 150,
“resize”: “crop”
},
“small”: {
“w”: 383,
“h”: 680,
“resize”: “fit”
},
“large”: {
“w”: 720,
“h”: 1280,
“resize”: “fit”
},
“medium”: {
“w”: 675,
“h”: 1200,
“resize”: “fit”
}
},
“video_info”: {
“aspect_ratio”: [
9,
16
],
“duration_millis”: 5140,
“variants”: [{
“bitrate”: 950000,
“content_type”: “video\/mp4”,
“url”: “https:\/\/video.twimg.com\/ext_tw_video\/1370161464028196868\/pu\/vid\/480x852\/rAuFVMEqs0MeP4P4.mp4?tag=12”
},
{
“bitrate”: 2176000,
“content_type”: “video\/mp4”,
“url”: “https:\/\/video.twimg.com\/ext_tw_video\/1370161464028196868\/pu\/vid\/720x1280\/ZxVL5qYO-DNVuSyq.mp4?tag=12”
},
{
“content_type”: “application\/x-mpegURL”,
“url”: “https:\/\/video.twimg.com\/ext_tw_video\/1370161464028196868\/pu\/pl\/EGVpuZpo-wYxTNCq.m3u8?tag=12”
},
{
“bitrate”: 632000,
“content_type”: “video\/mp4”,
“url”: “https:\/\/video.twimg.com\/ext_tw_video\/1370161464028196868\/pu\/vid\/320x568\/M7VtocAwKPFdkqzF.mp4?tag=12”
}
]
},
“additional_media_info”: {
“monetizable”: false
}
}]
}
{
“data”: [{
“entities”: {
“hashtags”: [{
“start”: 8,
“end”: 13,
“tag”: “test”
}],
“mentions”: [{
“start”: 31,
“end”: 42,
“username”: “TwitterDev”
}],
“urls”: [{
“start”: 91,
“end”: 114,
“url”: “https://t.co/XVLZ3uwikc”,
“expanded_url”: “https://developer.x.com/en”,
“display_url”: “developer.x.com/en”,
“status”: 200,
“title”: “Use Cases, Tutorials, & Documentation”,
“description”: “Publish & analyze Tweets, optimize ads, & create unique customer experiences with the Twitter API, Twitter Ads API, & Twitter for Websites. Let’s start building.”,
“unwound_url”: “https://developer.x.com/en
},
{
“start”: 115,
“end”: 138,
“url”: “https://t.co/dz4oByygWA”,
“expanded_url”: “https://x.com/furiouscamper/status/1370161532013735937/video/1”,
“display_url”: “pic.x.com/dz4oByygWA”
}
]
},
“id”: “1370161532013735937”,
“text”: “Another #test with a video and @TwitterDev mention. Excited for new format migration docs! https://t.co/XVLZ3uwikc https://t.co/dz4oByygWA”,
“attachments”: {
“media_keys”: [
“7_1370161464028196868”
]
}
}],
“includes”: {
“media”: [{
“type”: “video”,
“height”: 1280,
“public_metrics”: {
“view_count”: 37
},
“width”: 720,
“media_key”: “7_1370161464028196868”,
“duration_ms”: 5140,
“preview_image_url”: “https://pbs.twimg.com/ext\_tw\_video_thumb/1370161464028196868/pu/img/cGLCoXBHVktkwlC5.jpg
}],
“users”: [{
“public_metrics”: {
“followers_count”: 517233,
“following_count”: 2034,
“tweet_count”: 3677,
“listed_count”: 1727
},
“created_at”: “2013-12-14T04:35:55.000Z”,
“profile_image_url”: “https://pbs.twimg.com/profile\_images/1354494203451961345/d8HkZl6p\_normal.jpg”,
“description”: “The voice of the #TwitterDev team and your official source for updates, news, and events, related to the #TwitterAPI.”,
“verified”: true,
“id”: “2244994945”,
“username”: “TwitterDev”,
“protected”: false,
“entities”: {
“url”: {
“urls”: [{
“start”: 0,
“end”: 23,
“url”: “https://t.co/3ZX3TNiZCY”,
“expanded_url”: “https://developer.x.com/en/community”,
“display_url”: “developer.x.com/en/community”
}]
},
“description”: {
“hashtags”: [{
“start”: 17,
“end”: 28,
“tag”: “TwitterDev”
},
{
“start”: 105,
“end”: 116,
“tag”: “TwitterAPI”
}
]
}
},
“url”: “https://t.co/3ZX3TNiZCY”,
“name”: “Twitter Dev”,
“location”: “127.0.0.1”
}]
}
}

Place object

Twitter 1.1 formatTwitter v2 formatRequired v2 parameters
placedata.geo.place_idtweet.fields=geo
place.idincludes.places.idexpansions=geo.place_id
place.id.place_typeincludes.places.place_typeexpansions=geo.place_id&place.fields=place_type
place.id.nameincludes.places.nameexpansions=geo.place_id&place.fields=name
place.id.full_nameincludes.places.full_nameexpansions=geo.place_id
place.id.country_codeincludes.places.country_codeexpansions=geo.place_id&place.fields=country_code
place.id.countryincludes.places.countryexpansions=geo.place_id&place.fields=country
place.id.contained_withinincludes.places.contained_withinexpansions=geo.place_id&place.fields=contained_within
place.id.bounding_box.typeincludes.places.geo.typeexpansions=geo.place_id&place.fields=place_type
place.id.bounding_box.coordinatesincludes.places.geo.bboxexpansions=geo.place_id&place.fields=geo
place.id.attributesincludes.places.propertiesexpansions=geo.place_id&place.fields=geo

Example

Place object in v1.1Place object with v2

https://api.x.com/2/tweets?ids=1370161532013735937&expansions=geo.place\_id&tweet.fields=geo&place.fields=contained\_within,country,country\_code,full\_name,geo,id,name,place_type
”place”: {
“id”: “f7eb2fa2fea288b1”,
“url”: “https:\/\/api.x.com\/1.1\/geo\/id\/f7eb2fa2fea288b1.json”,
“place_type”: “city”,
“name”: “Lakewood”,
“full_name”: “Lakewood, CO”,
“country_code”: “US”,
“country”: “United States”,
“contained_within”: [],
“bounding_box”: {
“type”: “Polygon”,
“coordinates”: [
[
[
-105.193475,
39.60973
],
[
-105.053164,
39.60973
],
[
-105.053164,
39.761974
],
[
-105.193475,
39.761974
]
]
]
},
“attributes”:
}
{
“data”: [{
“id”: “1370161532013735937”,
“text”: “Another #test with a video and @TwitterDev mention. Excited for new format migration docs! https://t.co/XVLZ3uwikc https://t.co/dz4oByygWA”,
“geo”: {
“place_id”: “f7eb2fa2fea288b1”
}
}],
“includes”: {
“places”: [{
“name”: “Lakewood”,
“place_type”: “city”,
“full_name”: “Lakewood, CO”,
“id”: “f7eb2fa2fea288b1”,
“geo”: {
“type”: “Feature”,
“bbox”: [
-105.193475,
39.60973,
-105.053164,
39.761974
],
“properties”:
},
“country_code”: “US”,
“country”: “United States”
}]
}

Next step

Migrating from Native Enriched data format to v2

The Native Enriched data format is used by our enterprise products.

The Native Enriched data format has been updated to provide edited Tweet metadata. To learn more about Edit Tweet metadata, check out the Edit Tweets fundamentals page.

If you are using the standard v1.1 endpoints, please refer to the standard v1.1 to v2 guide. If you are using the enterprise products with Activity Streams, we have an Activity Streams to v2 guide for you as well.

X API v2 introduces new JSON designs for Tweet and user objects.

  • At the JSON root level, the Native Enriched format returns Tweet objects in a results array, while X API v2 returns a data array. 
  • Instead of using both favorites (in Tweet object) and favourites (in user object), X API v2 uses the term like. 
  • X is adopting the convention that JSON values with no value (for example, null) are not written to the payload. Tweet and user attributes are only included if they have non-null values. 
  • All id fields in v2 will be in string format  

In addition to the changes made to the new JSON format, we also introduced a new set of fields to the Tweet object including the following:

  • conversation_id
  • reply_settings
  • alt_text on media
  • Two new annotations fields, including context and entities
  • Several new metrics fields
  • Several new polls fields  

Many legacy and deprecated fields are being removed:

  • contributors
  • Certain entities.media and extended_entities.media fields
  • filter_level
  • timestamp_ms
  • truncated

Native Enriched vs v2 payload structure

The following table displays the high-level objects and format that you can expect to receive from v2 compared to the Native Enriched format.

Native Enriched structurev2 structure
Default{
tweet object fields,

“user”: ,
“place”: ,
“entities”: {
“hashtags”: [],
“urls”: [],
“user_mentions”: [],
“symbols”: [],
“annotations”: [],
“media”: []
},
“extended_entities”: ,
“matching_rules”: []
}
{
“data”: [{
“id”,
“text”,

“edit_history_tweet_ids”
}]
}
With defined field and expansion parameters{
“data”: [{
tweet object fields,
“entities”: {
“hashtags”: [],
“cashtags”: [],
“mentions”: [],
“urls”: [],
},
“attachments”: {
“media_keys”: [],
“poll_ids”: []
}
}],
“includes”: [
“tweets”: [user objects],
“users”: [user objects],
“media”: [media objects],
“places”: [place object],
“polls”: [poll object]
],
“matching_rules”: []
}

Field mapping

The following section describes which native enriched fields map to v2 fields, as well as which v2 parameters are required to receive the new field.  

Tweet object

Native Enriched formatTwitter v2 formatRequired v2 parametersType in v2
created_atdata.created_attweet.fields=created_atString
idN/A - See id
id_strdata.idDefaultString
textdata.textDefaultString
edit_historydata.edit_history_tweet_idsDefaultArray
edit_controlsdata.edit_controlstweet.fields=edit_controlsObject
editabledata.edit_controls.is_edit_eligibletweet.fields=edit_controlsBoolean
display_text_rangeN/A - text includes complete text
sourcedata.sourcetweet.fields=sourceString
truncatedN/A - text includes complete text
Not availabledata.conversation_idtweet.fields=conversation_idString
Not availabledata.reply_settingstweet.fields=reply_settingsString
in_reply_to_status_idN/A - See referenced_tweets.id
in_reply_to_status_id_strdata.referenced_tweets.id (if type=replied_to)expansions=referenced_tweets.idString
in_reply_to_user_idN/A - See in_reply_to_user_id_str
in_reply_to_user_id_strdata.in_reply_to_user_idtweet.fields=in_reply_to_user_idString
in_reply_to_screen_nameincludes.users..usernametweet.fields=in_reply_to_user_id&expansions=entities.mentions.usernameString
userincludes.usersexpansions=author_idObject
user.id_strdata.author_idtweet.fields=author_idString
geodata.geo.place_idtweet.fields=geo
coordinatesdata.geo.place_idtweet.fields=geo
placedata.geo.place_idtweet.fields=geo
is_quoted_statusdata.referenced_tweets.id (if type=quoted)tweet.fields=referenced_tweetsString
extended_tweet.full_textN/A - text is complete text
Not availabledata.public_metricstweet.fields=public_metricsObject
quote_countdata.public_metrics.quote_counttweet.fields=public_metricsInt
reply_countdata.public_metrics.reply_counttweet.fields=public_metricsInt
retweet_countdata.public_metrics.retweet_counttweet.fields=public_metricsInt
favorite_countdata.public_metrics.like_counttweet.fields=public_metricsInt
Not availabledata.non_public_metricstweet.fields=non_public_metricsObject
Not availabledata.non_public_metrics.impression_counttweet.fields=non_public_metricsInt
Not availabledata.non_public_metrics.url_link_counttweet.fields=non_public_metricsInt
Not availabledata.non_public_metrics.user_profile_counttweet.fields=non_public_metricsInt
Not availabledata.organic_metricstweet.fields=organic_metricsObject
Not availabledata.organic_metrics.like_counttweet.fields=organic_metricsInt
Not availabledata.organic_metrics.retweet_counttweet.fields=organic_metricsInt
Not availabledata.organic_metrics.reply_counttweet.fields=organic_metricsInt
Not availabledata.organic_metrics.impression_counttweet.fields=organic_metricsInt
Not availabledata.organic_metrics.url_link_counttweet.fields=organic_metricsInt
Not availabledata.organic_metrics.user_profile_counttweet.fields=organic_metricsInt
Not availabledata.promoted_metricstweet.fields=promoted_metricsObject
Not availabledata.promoted_metrics.like_counttweet.fields=promoted_metricsInt
Not availabledata.promoted_metrics.retweet_counttweet.fields=promoted_metricsInt
Not availabledata.promoted_metrics.reply_counttweet.fields=promoted_metricsInt
Not availabledata.promoted_metrics.impression_counttweet.fields=promoted_metricsInt
Not availabledata.promoted_metrics.url_link_counttweet.fields=promoted_metricsInt
Not availabledata.promoted_metrics.user_profile_counttweet.fields=promoted_metricsInt
contributorsNot availableNot available
entitiesdata.entitiestweet.fields=entitiesObject
entities.user_mentionsdata.entities.mentionstweet.fields=entitiesArray of objects
entities.symbolsdata.entities.cashtagstweet.fields=entitiesArray of objects
entities.hashtagsdata.entities.hashtagstweet.fields=entitiesArray of objects
entities.urlsdata.entities.urlstweet.fields=entitiesArray of objects
entities.mediaincludes.mediaexpansions=attachments.media_keysArray of objects
entities.annotationstweet.fields=entities,context_annotationsObject
entities.annotations.contextdata.context_annotationstweet.fields=entities,context_annotationsArray of objects
No equivalentdata.context_annotations.domaintweet.fields=context_annotationsObject
entities.annotations.context.context_domain_id_strdata.context_annotations.domain.idtweet.fields=context_annotationsString
entities.annotations.context.context_domain_idNot availableNot available - see data.context_annotations.domain.id for string format
entities.annotations.context.context_domain_namedata.context_annotations.domain.nametweet.fields=context_annotationsString
entities.annotations.context.context_domain_descriptiondata.context_annotations.domain.descriptiontweet.fields=context_annotationsString
No equivalentdata.context_annotations.entitytweet.fields=context_annotationsObject
entities.annotations.context.context_entity_id_strdata.context_annotations.entity.idtweet.fields=context_annotationsString
entities.annotations.context.context_entity_idNot availableNot available - see data.context_annotations.entity.id for string format
entities.annotations.context.context_entity_namedata.context_annotations.entity.nametweet.fields=context_annotationsString
entities.annotations.context.context_entity_descriptiondata.context_annotations.entity.descriptiontweet.fields=context_annotationsString
entities.annotations.entitydata.entities.annotationstweet.fields=entities,context_annotationsArray of objects
extended_entitiesdata.attachmentstweet_fields=attachmentsObject
favoritedNot availableNot available
retweetedNot availableNot available
retweeted_status
possibly_sensitivedata.possibly_sensitivetweet.fields=possibly_sensitiveBoolean
langdata.langtweet.fields=langString
filter_levelNot availableNot available
scopesNot availableNot available
timestamp_msNot availableNot available
withhelddata.withheldtweet.fields=withheldArray of objects
matching_rulesmatching_rulesArray of objects
matching_rules.idNot availableNot available
matching_rules.id_strmatching_rules.idDefault with filtered streamString
matching_rules.tagmatching_rules.tagDefault with filtered streamString

User object

Native Enriched formatTwitter v2 formatRequired v2 parametersType in v2
userincludes.usersexpansions=author_idArray of objects
user.idNot availableN/A - See includes.users.idString
user.id_strincludes.users.idexpansions=author_idString
user.nameincludes.users.nameexpansions=author_idString
user.screen_nameincludes.user.usernameexpansions=author_idString
user.locationincludes.users.locationexpansions=author_id&user.fields=locationObject
user.descriptionincludes.users.descriptionexpansions=author_id&user.fields=descriptionString
Not availableincludes.users.urlexpansions=author_id&user.fields=urlString
user.followers_countincludes.users.public_metrics.followers_countexpansions=author_id&user.fields=public_metricsInt
user.friends_countincludes.users.public_metrics.following_countexpansions=author_id&user.fields=public_metricsInt
user.listed_countincludes.users.public_metrics.listed_countexpansions=author_id&user.fields=public_metricsInt
user.created_atincludes.users.created_atexpansions=author_id&user.fields=created_atString
user.favourites_countNot yet available
user.verifiedincludes.users.verifiedexpansions=author_id&user.fields=verifiedBoolean
Not availableincludes.users.pinned_tweet_idexpansions=author_id&user.fields=pinned_tweet_idString
user.statuses_countincludes.users.public_metrics.tweet_countexpansions=author_id&user.fields=public_metricsInt
user.profile_image_url_httpsincludes.users.profile_image_urlexpansions=author_id&user.fields=profile_image_urlString
user.translator_typeNot availableNot available
user.utc_offsetNot availableNot available
user.time_zoneNot availableNot available
user.geo_enabledNot availableNot available
user.langNot availableNot available - infer from Tweet lang
user.contributors_enabledNot availableNot available
user.is_translatorNot availableNot available
user.profile_background_colorNot availableNot available
user.profile_background_image_urlNot availableNot available
user.profile_background_image_url_httpsNot availableNot available
user.profile_background_titleNot availableNot available
user.profile_sidebar_border_colorNot availableNot available
user.profile_sidebar_fill_colorNot availableNot available
user.profile_text_colorNot availableNot available
user.profile_user_background_imageNot availableNot available
user.profile_image_urlSee includes.user.profile_image_url
user.default_profileNot availableNot available
user.default_profile_imageNot availableNot available
user.followingNot availableNot available
user.follow_request_sentNot availableNot available
user.notificationsNot availableNot available
user.withheld_in_countriesincludes.users.withheldexpansions=author_id&user.fields=withheldObject
user.protectedincludes.users.protectedexpansions=author_id&user.fields=protectedBoolean
Not availableincludes.users.entitiesexpansions=author_id&user.fields=entitiesObject
Not availableincludes.users.entities.urlexpansions=author_id&user.fields=entitiesObject
Not availableincludes.users.entities.url.urlsexpansions=author_id&user.fields=entitiesArray of objects
Not availableincludes.users.entities.url.urls.startexpansions=author_id&user.fields=entitiesInt
Not availableincludes.users.entities.url.urls.endexpansions=author_id&user.fields=entitiesInt
Not availableincludes.users.entities.url.urls.urlexpansions=author_id&user.fields=entitiesString
user.urlincludes.users.entities.url.urls.expanded_urlexpansions=author_id&user.fields=entitiesString
Not availableincludes.users.entities.url.urls.display_urlexpansions=author_id&user.fields=entitiesString
Not availableincludes.users.entities.descriptionsexpansions=author_id&user.fields=entitiesObject
Not availableincludes.users.entities.descriptions.hashtagsexpansions=author_id&user.fields=entitiesArray of objects
Not availableincludes.users.entities.descriptions.hashtags.startexpansions=author_id&user.fields=entitiesInt
Not availableincludes.users.entities.descriptions.hashtags.endexpansions=author_id&user.fields=entitiesInt
included in user.descriptionincludes.users.entities.descriptions.hashtags.tagexpansions=author_id&user.fields=entitiesString
Not availableincludes.users.entities.descriptions.mentionsexpansions=author_id&user.fields=entitiesArray of objects
Not availableincludes.users.entities.descriptions.mentions.startexpansions=author_id&user.fields=entitiesInt
Not availableincludes.users.entities.descriptions.mentions.endexpansions=author_id&user.fields=entitiesInt
Included in user.descriptionincludes.users.entities.descriptions.mentions.usernameexpansions=author_id&user.fields=entitiesString
Not availableincludes.users.entities.descriptions.cashtagsexpansions=author_id&user.fields=entitiesArray of objects
Not availableincludes.users.entities.descriptions.cashtags.startexpansions=author_id&user.fields=entitiesInt
Not availableincludes.users.entities.descriptions.cashtags.endexpansions=author_id&user.fields=entitiesInt
Included in user.descriptionincludes.users.entities.descriptions.cashtags.tagexpansions=author_id&user.fields=entitiesString

Entities and expanded entities objects

Native Enriched formatTwitter v2 formatRequired v2 parametersType in v2
entitiesdata.entitiestweet.fields=entitiesObject
entities.hashtagsdata.entities.hashtagstweet.fields=entitiesArray of objects
entities.hashtags.indices[0]data.entities.hashtags.starttweet.fields=entitiesInteger
entities.hashtags.indices[1]data.entities.hashtags.endtweet.fields=entitiesInteger
entities.hashtags.textdata.entities.hashtags.tagtweet.fields=entitiesString
entities.urlsdata.entities.urlstweet.fields=entitiesArray of objects
entities.urls.indices[0]data.entities.urls.starttweet.fields=entitiesInteger
entities.urls.indices[1]data.entities.urls.endtweet.fields=entitiesInteger
entities.urls.urldata.entities.urls.urltweet.fields=entitiesString
entities.urls.expanded_urldata.entities.urls.expanded_urltweet.fields=entitiesString
entities.urls.display_urldata.entities.urls.display_urltweet.fields=entitiesString
entities.urls.unwound.urldata.entities.urls.unwound_urltweet.fields=entitiesString
entities.urls.unwound.statusdata.entities.urls.statustweet.fields=entitiesString
entities.urls.unwound.titledata.entities.urls.titletweet.fields=entitiesString
entities.urls.unwound.descriptiondata.entities.urls.descriptiontweet.fields=entitiesString
Not availabledata.entities.urls.imagestweet.fields=entitiesArray of objects
Not availabledata.entities.urls.images.urltweet.fields=entitiesString
Not availabledata.entities.urls.images.widthtweet.fields=entitiesInt
Not availabledata.entities.urls.images.heighttweet.fields=entitiesInt
entities.user_mentionsdata.entities.mentionstweet.fields=entitiesArray of objects
entities.user_mentions.indicies[0]data.entities.mentions.starttweet.fields=entitiesInteger
entities.user_mentions.indicies[1]data.entities.mentions.endtweet.fields=entitiesInteger
entities.user_mentions.screen_namedata.entities.mentions.usernametweet.fields=entitiesString
entities.symbolsdata.entities.cashtagstweet.fields=entitiesArray of objects
entities.symbols.indices[0]data.entities.cashtags.starttweet.fields=entitiesInteger
entities.symbols.indices[1]data.entities.cashtags.endtweet.fields=entitiesInteger
entities.symbols.textdata.entities.cashtags.tagtweet.fields=entitiesString
entities.media OR extended_entities.mediaincludes.mediaexpansions=attachments.media_keysArray of objects
entities.media.id_str OR extended_entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keysString
entities.media.id OR extended_entities.media.idNot available - id is a String
entities.media.type OR extended_entities.media.typeincludes.media.media.typeexpansions=attachments.media_keysString
entities.media.indices OR extended_entities.media.indicesNot availableNot available
Not availableincludes.media.alt_textexpansions=attachments.media_keys&media.fields=alt_textString
entities.media.additional_media_info OR extended_entities.media.additional_media_infoNot availableNot available
entities.media.additional_media_info.monetizable OR extended_entities.media.additional_media_info.monetizableNot availableNot available
entities.media.media_url OR extended_entities.media.media_urlN/A - See includes.media.urlString
entities.media.media_url_https OR extended_entities.media.media_url_httpsincludes.media.urlexpansions=attachments.media_keys&media.fields=urlString
entities.media.url OR extended_entities.media.url
entities.media.display_url OR extended_entities.media.expanded_url
entities.media.expanded_url
entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_urlString
extended_entitiesdata.attachmentstweet_fields=attachmentsObject
extended_entitiesdata.attachments.media_keystweet.fields=attachmentsArray of objects
Not availabledata.attachments.poll_idstweet.fields=attachmentsArray of objects
extended_entities.media.sizes.thumb.wNot Available
extended_entities.media.sizes.thumb.hNot Available
extended_entities.media.sizes.thumb.resizeNot Available
extended_entities.media.sizes.large.wincludes.media.heightexpansions=attachments.media_keys&media.fields=height
extended_entities.media.sizes.large.hincludes.media.widthexpansions=attachments.media_keys&media.fields=width
extended_entities.media.sizes.large.resizeNot AvailableNot Available
extended_entities.media.sizes.small.wNot AvailableNot Available
extended_entities.media.sizes.small.hNot AvailableNot Available
extended_entities.media.sizes.small.resizeNot AvailableNot Available
extended_entities.media.sizes.medium.wNot AvailableNot Available
extended_entities.media.sizes.medium.hNot AvailableNot Available
extended_entities.media.sizes.medium.resizeNot AvailableNot Available
extended_entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_urlString
extended_entities.media.video_info.aspect_ratioNot availableNot available
extended_entities.media.variantsNot availableNot available
extended_entities.media.variants.bitrateNot availableNot available
extended_entities.media.variants.content_typeNot availableNot available
extended_entities.media.variants.urlNot availableNot available
extended_entities.media.video_info.duration_millisincludes.media.duration_msexpansions=attachments.media_keys&media.fields=duration_msInt
Not availableincludes.media.public_metricsexpansions=attachments.media_keys&media.fields=public_metricsObject
Not availableincludes.media.public_metrics.view_countexpansions=attachments.media_keys&media.fields=public_metricsInt
Not availableincludes.media.non_public_metricsexpansions=attachments.media_keys&media.fields=non_public_metricsObject
Not availableincludes.media.non_public_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.organic_metricsexpansions=attachments.media_keys&media.fields=organic_metricsObject
Not availableincludes.media.organic_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.view_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.promoted_metricexpansions=attachments.media_keys&media.fields=promoted_metricsObject
Not availableincludes.media.promoted_metric.playback_0_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metric.playback_25_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metric.playback_50_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metric.playback_75_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metric.playback_100_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metrics.view_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt

Place object

Native Enriched formatTwitter v2 formatRequired v2 parametersType in v2
placeincludes.placesexpansions=geo.place_idArray of objects
place.idincludes.places.idexpansions=geo.place_idString
place.urlNot availableNot available
place.id.place_typeincludes.places.place_typeexpansions=geo.place_id&place.fields=place_typeString
place.id.nameincludes.places.nameexpansions=geo.place_id&place.fields=nameString
place.id.full_nameincludes.places.full_nameexpansions=geo.place_idString
place.id.country_codeincludes.places.country_codeexpansions=geo.place_id&place.fields=country_codeString
place.id.countryincludes.places.countryexpansions=geo.place_id&place.fields=countryString
place.id.contained_withinincludes.places.contained_withinexpansions=geo.place_id&place.fields=contained_withinArray
place.id.bounding_box.typeincludes.places.geo.typeexpansions=geo.place_id&place.fields=place_typeString
place.id.bounding_box.coordinatesincludes.places.geo.bboxexpansions=geo.place_id&place.fields=geoArray
place.id.attributesincludes.places.propertiesexpansions=geo.place_id&place.fields=geoObject

Poll object

Native Enriched formatTwitter v2 formatRequired v2 parametersType in v2
entities.pollsincludes.pollsexpansions=attachments.poll_idsArray of objects
Not availableincludes.polls.idexpansions=attachments.poll_idsString
entities.poll.optionsincludes.polls.optionsexpansions=attachments.poll_idsArray of objects
entities.polls.options.positionincludes.polls.options.positionexpansions=attachments.poll_idsInt
entities.polls.options.textincludes.polls.options.labelexpansions=attachments.poll_idsString
Not availableincludes.polls.options.votesexpansions=attachments.poll_idsInt
Not availableincludes.polls.voting_statusexpansions=attachments.poll_ids&poll.fields=voting_statusString
entities.polls.duration_minutesincludes.polls.duration_minutesexpansions=attachments.poll_ids&poll.fields=duration_minutesInt
entities.polls.end_datetimeincludes.polls.end_datetimeexpansions=attachments.poll_ids&poll.fields=end_datetimeDate (ISO 8601)

Migrating from Activity Streams data format to v2

The Activity Streams data format is available with our enterprise products.

The Activity Streams data format has been updated to provide edited Tweet metadata. To learn more about Edit Tweet metadata, check out the Edit Tweets fundamentals page.

If you are using the standard v1.1 endpoints, please refer to the standard v1.1 to v2 guide. If you are using the premium endpoints, or the Native Enriched format for enterprise, please refer to the Native Enriched to v2 guide.

X API v2 introduces new JSON designs for Post and user objects.

  • At the JSON root level, the Activity Streams format returns Tweet objects in a results array, while X API v2 returns a data array. 
  • Instead of referring to Retweeted and Quoted “activities”, X API v2 JSON refers to Retweeted and Quoted Tweets. 
  • Instead of using both favorites (in Tweet object) and favourites (in user object), X API v2 uses the term like. 
  • Twitter is adopting the convention that JSON values with no value (for example, null) are not written to the payload. Tweet and user attributes are only included if they have non-null values. 
  • All id fields in v2 will be in string format.  

In addition to the changes made to the new JSON format, we also introduced a new set of fields to the Tweet object including the following:

  • conversation_id
  • reply_settings
  • alt_text on media
  • Two new annotations fields, including context and entities
  • Several new metrics fields
  • Several new polls fields  

Many legacy and deprecated fields are being removed or replaced:

  • display_text_range
  • generator
  • gnip
  • link
  • objectType
  • provider
  • twitter_entities.symbols replaced with data.entities.cashtags
  • Certain twitter_extended_entities.media and twitter_entities.media fields
  • twitter_filter_level
  • twitterTimeZone
  • verb

Tweet object

Activity Streams formatTwitter v2 formatRequired v2 parametersType in v2
postedTimedata.created_attweet.fields=created_atDate (ISO 8601)
generatorNot AvailableNot Available
generator.linkNot AvailableNot Available
generator.displayNamedata.sourcetweet.fields=sourceString
twitter_langdata.langtweet.fields=langString
Not Availabledata.conversation_idtweet.fields=conversation_idString
Not Availabledata.reply_settingstweet.fields=reply_settingsString
Not Availabledata.possibly_sensitivetweet.fields=possibly_sensitiveBoolean
Not Availabledata.withheldtweet.fields=withheldObject
objectTypeNot AvailableNot Available
verbNot AvailableNot Available
providerNot AvailableNot Available
provider.objectTypeNot AvailableNot Available
provider.displayNameNot AvailableNot Available
provider.linkNot AvailableNot Available
linkNot AvailableNot Available
display_text_rangeNot AvailableNot Available
objectNot AvailableNot Available
object.objectTypeNot AvailableNot Available
object.idNot AvailableNot Available
object.summarydata.textdefaultString
object.edit_historydata.edit_history_tweet_idsdefaultArray
object.edit_controlsdata.edit_controlstweet.fields=edit_controlsObject
object.editabledata.edit_controls.is_edit_eligibletweet.fields=edit_controlsBoolean
object.linkNot AvailableNot Available
object.postedTimedata.created_attweet.fields=created_atDate (ISO 8601)
Derived from actor.iddata.author_idtweet.fields=created_at
twitter_filter_levelNot AvailableNot Available
Derived from username in inReplyTo.linkdata.in_reply_to_user_idtweet.fields=in_reply_to_user_idString
Not Availabledata.referenced_tweetstweet.fields=referenced_tweetsArray of objects
Not Availabledata.referenced_tweets.typetweet.fields=referenced_tweetsString
Derived from inReplyTo.linkdata.referenced_tweets.idtweet.fields=referenced_tweetsString
Not Availabledata.attachmentstweet.fields=attachmentsObject
Derived from twitter_entities.media.id_strdata.attachments.media_keystweet.fields=attachmentsArray
Not Availabledata.attachments.poll_idstweet.fields=attachmentsArray
twitter_entitiesdata.entitiestweet.fields=entitiesObject
Not Availabledata.entities.annotationstweet.fields=entitiesArray of objects
Not Availabledata.entities.annotations.starttweet.fields=entitiesInt
Not Availabledata.entities.annotations.endtweet.fields=entitiesInt
Not Availabledata.entities.annotations.probabilitytweet.fields=entitiesFloat
Not Availabledata.entities.annotations.typetweet.fields=entitiesString
Not Availabledata.entities.annotations.normalized_texttweet.fields=entitiesString
twitter_entities.urlsdata.entities.urlstweet.fields=entitiesArray of objects
twitter_entities.urls.indices[0]data.entities.urls.starttweet.fields=entitiesInt
twitter_entities.urls.indices[1]data.entities.urls.endtweet.fields=entitiesInt
twitter_entities.urls.urldata.entities.urls.urltweet.fields=entitiesString
twitter_entities.urls.expanded_urldata.entities.urls.expanded_urltweet.fields=entitiesString
twitter_entities.urls.display_urldata.entities.urls.display_urltweet.fields=entitiesString
Not Availabledata.entities.urls.imagestweet.fields=entitiesArray of objects
Not Availabledata.entities.urls.images.urltweet.fields=entitiesString
Not Availabledata.entities.urls.images.widthtweet.fields=entitiesInt
Not Availabledata.entities.urls.images.heighttweet.fields=entitiesInt
gnip.urls.expanded_statusdata.entities.urls.statustweet.fields=entitiesInt
gnip.urls.expanded_url_titledata.entities.urls.titletweet.fields=entitiesString
gnip.urls.expanded_url_descriptiondata.entities.urls.descriptiontweet.fields=entitiesString
gnip.urls.expanded_urldata.entities.urls.unwound_urltweet.fields=entitiesString
twitter_entities.symbolsdata.entities.cashtagstweet.fields=entitiesArray of objects
twitter_entities.symbols.indices[0]data.entities.cashtags.starttweet.fields=entitiesInt
twitter_entities.symbols.indices[1]data.entities.cashtags.endtweet.fields=entitiesInt
twitter_entities.symbols.textdata.entities.cashtags.tagtweet.fields=entitiesString
twitter_entities.hashtagsdata.entities.hashtagstweet.fields=entitiesArray of objects
twitter_entities.hashtags.indices[0]data.entities.hashtags.starttweet.fields=entitiesInt
twitter_entities.hashtags.indices[1]data.entities.hashtags.endtweet.fields=entitiesInt
twitter_entities.hashtags.textdata.entities.hashtags.tagtweet.fields=entitiesString
twitter_entities.user_mentionsdata.entities.mentionstweet.fields=entitiesArray of objects
twitter_entities.user_mentions.indices[0]data.entities.mentions.starttweet.fields=entitiesInt
twitter_entities.user_mentions.indices[1]data.entities.mentions.endtweet.fields=entitiesInt
twitter_entities.user_mentions.screen_namedata.entities.mentions.tagtweet.fields=entitiesString
twitter_entities.user_mentions.id_strdata.entities.mentions.idtweet.fields=entitiesString
twitter_entities.user_mentions.idNot AvailableNot Available
Not Availabledata.context_annotationstweet.fields=context_annotationsArray of objects
Not Availabledata.context_annotations.domaintweet.fields=context_annotationsObject
Not Availabledata.context_annotations.domain.idtweet.fields=context_annotationsString
Not Availabledata.context_annotations.domain.nametweet.fields=context_annotationsString
Not Availabledata.context_annotations.domain.descriptiontweet.fields=context_annotationsString
Not Availabledata.context_annotations.entitytweet.fields=context_annotationsObject
Not Availabledata.context_annotations.entity.idtweet.fields=context_annotationsString
Not Availabledata.context_annotations.entity.nametweet.fields=context_annotationsString
Not Availabledata.context_annotations.entity.descriptiontweet.fields=context_annotationsString
geodata.geotweet.fields=geoObject
Derived from location.linkdata.geo.place_idtweet.fields=geoString
Not Availabledata.public_metricstweet.fields=public_metricsObject
favoritesCountdata.public_metrics.like_counttweet.fields=public_metricsInt
retweetCountdata.public_metrics.retweet_counttweet.fields=public_metricsInt
Not Availabledata.public_metrics.quote_counttweet.fields=public_metricsInt
Not Availabledata.public_metrics.reply_counttweet.fields=public_metricsInt
Not Availabledata.non_non_public_metricstweet.fields=non_public_metricsObject
Not Availabledata.non_public_metrics.impression_counttweet.fields=non_public_metricsInt
Not Availabledata.non_public_metrics.url_link_counttweet.fields=non_public_metricsInt
Not Availabledata.non_public_metrics.user_profile_counttweet.fields=non_public_metricsInt
Not Availabledata.organic_metricstweet.fields=organic_metricsObject
Not Availabledata.organic_metrics.like_counttweet.fields=organic_metricsInt
Not Availabledata.organic_metrics.retweet_counttweet.fields=organic_metricsInt
Not Availabledata.organic_metrics.reply_counttweet.fields=organic_metricsInt
Not Availabledata.organic_metrics.impression_counttweet.fields=organic_metricsInt
Not Availabledata.organic_metrics.url_link_counttweet.fields=organic_metricsInt
Not Availabledata.organic_metrics.user_profile_counttweet.fields=organic_metricsInt
Not Availabledata.promoted_metricstweet.fields=promoted_metricsObject
Not Availabledata.promoted_metrics.like_counttweet.fields=promoted_metricsInt
Not Availabledata.promoted_metrics.retweet_counttweet.fields=promoted_metricsInt
Not Availabledata.promoted_metrics.reply_counttweet.fields=promoted_metricsInt
Not Availabledata.promoted_metrics.impression_counttweet.fields=promoted_metricsInt
Not Availabledata.promoted_metrics.url_link_counttweet.fields=promoted_metricsInt
Not Availabledata.promoted_metrics.user_profile_counttweet.fields=promoted_metricsInt
gnip.profileLocationsNot AvailableNot Available
gnip.profileLocations.addressNot AvailableNot Available
gnip.profileLocations.address.countryNot AvailableNot Available
gnip.profileLocations.address.countryCodeNot AvailableNot Available
gnip.profileLocations.displayNameNot AvailableNot Available
gnip.profileLocations.geoNot AvailableNot Available
gnip.profileLocations.geo.coordinatesNot AvailableNot Available
gnip.profileLocations.geo.typeNot AvailableNot Available
gnip.profileLocations.objectTypeNot AvailableNot Available

User object

Activity Streams formatTwitter v2 formatRequired v2 parametersType in v2
actorincludes.usersexpansions=author_idArray of objects
Derived from actor.idincludes.users.idexpansions=author_idString
actor.displayNameincludes.users.nameexpansions=author_idString
actor.preferredUsernameincludes.users.usernameexpansions=author_idString
actor.postedTimeincludes.users.created_atexpansions=author_id&user.fields=created_atDate (ISO 8601)
actor.summaryincludes.users.descriptionexpansions=author_id&user.fields=descriptionString
Not Availableincludes.users.pinned_tweet_idexpansions=author_id&user.fields=pinned_tweet_idString
Not Availableincludes.users.protectedexpansions=author_id&user.fields=protectedBoolean
actor.linkNot AvailableNot Available - construct from includes.users.username
actor.twitterTimeZoneNot AvailableNot Available - infer from Tweet created_at
actor.utcOffsetNot AvailableNot Available - infer from Tweet created_at
actor.favoritesCountNot AvailableNot Available
actor.followersCountincludes.users.public_metrics.followers_countexpansions=author_id&user.fields=public_metricsInt
actor.friendsCountincludes.users.public_metrics.following_countexpansions=author_id&user.fields=public_metricsInt
actor.listedCountincludes.users.public_metrics.listed_countexpansions=author_id&user.fields=public_metricsInt
actor.statusesCountincludes.users.public_metrics.tweet_countexpansions=author_id&user.fields=public_metricsInt
actor.languages[]Not AvailableNot Available -  infer from Tweet  lang
actor.location.displayNameincludes.users.locationexpansions=author_id&user.fields=locationString
actor.imageincludes.users.profile_image_urlexpansions=author_id&user.fields=profile_image_urlString
actor.linksincludes.users.urlexpansions=author_id&user.fields=urlString
actor.verifiedincludes.users.verifiedexpansions=author_id&user.fields=verifiedBoolean
Not Availableincludes.users.withheldexpansions=author_id&user.fields=withheldObject
Not Availableincludes.users.entitiesexpansions=author_id&user.fields=entitiesObject
Not Availableincludes.users.entities.urlexpansions=author_id&user.fields=entitiesObject
actor.linksincludes.users.entities.url.urlsexpansions=author_id&user.fields=entitiesArray of objects
Not Availableincludes.users.entities.url.urls.startexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.url.urls.endexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.url.urls.urlexpansions=author_id&user.fields=entitiesString
actor.links.hrefincludes.users.entities.url.urls.expanded_urlexpansions=author_id&user.fields=entitiesString
Not Availableincludes.users.entities.url.urls.display_urlexpansions=author_id&user.fields=entitiesString
Not Availableincludes.users.entities.descriptionexpansions=author_id&user.fields=entitiesObject
Not Availableincludes.users.entities.description.hashtagsexpansions=author_id&user.fields=entitiesArray of objects
Not Availableincludes.users.entities.description.hashtags.startexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.description.hashtags.endexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.description.hashtags.tagexpansions=author_id&user.fields=entitiesString
Not Availableincludes.users.entities.description.mentionsexpansions=author_id&user.fields=entitiesArray of objects
Not Availableincludes.users.entities.description.mentions.startexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.description.mentions.endexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.description.mentions.usernameexpansions=author_id&user.fields=entitiesString
Not Availableincludes.users.entities.description.cashtagsexpansions=author_id&user.fields=entitiesArray of objects
Not Availableincludes.users.entities.description.cashtags.startexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.description.cashtags.endexpansions=author_id&user.fields=entitiesInt
Not Availableincludes.users.entities.description.cashtags.tagexpansions=author_id&user.fields=entitiesString

Poll object

Activity Streams formatTwitter v2 formatRequired v2 parametersType in v2
Not Availableincludes.pollsexpansions=attachments.poll_idsArray of objects
Not Availableincludes.polls.idexpansions=attachments.poll_idsString
Not Availableincludes.polls.optionsexpansions=attachments.poll_idsArray of objects
Not Availableincludes.polls.options.positionexpansions=attachments.poll_idsInt
Not Availableincludes.polls.options.labelexpansions=attachments.poll_idsString
Not Availableincludes.polls.options.votesexpansions=attachments.poll_idsInt
Not Availableincludes.polls.voting_statusexpansions=attachments.poll_ids&poll.fields=voting_statusString
Not Availableincludes.polls.duration_minutesexpansions=attachments.poll_ids&poll.fields=duration_minutesInt
Not Availableincludes.polls.end_datetimeexpansions=attachments.poll_ids&poll.fields=end_datetimeDate (ISO 8601)

Place object

Activity Streams formatTwitter v2 formatRequired v2 parametersType in v2
locationincludes.placesexpansions=geo.place_idarray of objects
location.displayNameincludes.places.full_nameexpansions=geo.place_idstring
Parsed from location.linkincludes.places.idexpansions=geo.place_idstring
location.nameincludes.places.nameexpansions=geo.place_id&place.fields=namestring
location.country_codeincludes.places.countryexpansions=geo.place_id&place.fields=countrystring
location.twitter_place_typeincludes.places.place_typeexpansions=geo.place_id&place.fields=place_typestring
location.twitter_country_codeincludes.places.country_codeexpansions=geo.place_id&place.fields=country_codestring
location.geoincludes.places.geoexpansions=geo.place_id&place.fields=geoobject
location.geo.typeincludes.places.geo.typeexpansions=geo.place_id&place.fields=geostring
location.geo.coordinatesincludes.places.geo.bboxexpansions=geo.place_id&place.fields=geoarray
Not Availableincludes.places.geo.propertiesexpansions=geo.place_id&place.fields=geoobject

Media object

Activity Streams formatTwitter v2 formatRequired v2 parametersType in v2
twitter_entities.media OR twitter_extended_entities.mediaincludes.mediaexpansions=attachments.media_keysArray of objects
twitter_entities.media.id_str OR twitter_extended_entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keysString
twitter_entities.media.id OR twitter_extended_entities.media.idNot availableNot available
twitter_entities.media.indices OR twitter_extended_entities.media.indicesNot availableNot available
twitter_entities.media.additional_media_info OR twitter_extended_entities.media.additional_media_infoNot availableNot available
twitter_entities.media.additional_media_info.monetizable OR twitter_extended_entities.media.additional_media_info.monetizableNot availableNot available
twitter_entities.media.media_url OR twitter_extended_entities.media.media_urlNot availableNot available
twitter_entities.media.media_url_https OR twitter_extended_entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_urlString
twitter_entities.media.url OR twitter_extended_entities.media.urlNot availableNot available
twitter_entities.media.display_url OR twitter_extended_entities.media.display_urlNot availableNot available
twitter_entities.media.expanded_url OR twitter_extended_entities.media.expanded_urlNot availableNot available
twitter_entities.media.type OR twitter_extended_entities.media.typeincludes.media.typeexpansions=attachments.media_keysString
twitter_entities.media.sizes OR twitter_extended_entities.media.sizesNot availableNot available
twitter_entities.media.sizes.thumb OR twitter_extended_entities.media.sizes.thumbNot availableNot available
twitter_entities.media.sizes.thumb.h OR twitter_extended_entities.media.sizes.thumb.hNot availableNot available
twitter_entities.media.sizes.thumb.w OR twitter_extended_entities.media.sizes.thumb.wNot availableNot available
twitter_entities.media.sizes.thumb.resize OR twitter_extended_entities.media.sizes.thumb.resizeNot availableNot available
twitter_entities.media.sizes.small OR twitter_extended_entities.media.sizes.smallNot availableNot available
twitter_entities.media.sizes.small.h OR twitter_extended_entities.media.sizes.small.hNot availableNot available
twitter_entities.media.sizes.small.w OR twitter_extended_entities.media.sizes.small.wNot availableNot available
twitter_entities.media.sizes.small.resize OR twitter_extended_entities.media.sizes.small.resizeNot availableNot available
twitter_entities.media.sizes.medium OR twitter_extended_entities.media.sizes.mediumNot availableNot available
twitter_entities.media.sizes.medium.h OR twitter_extended_entities.media.sizes.medium.hNot availableNot available
twitter_entities.media.sizes.medium.w OR twitter_extended_entities.media.sizes.medium.wNot availableNot available
twitter_entities.media.sizes.medium.resize OR twitter_extended_entities.media.sizes.medium.resizeNot availableNot available
twitter_entities.media.sizes.large OR twitter_extended_entities.media.sizes.largeNot availableNot available
twitter_entities.media.sizes.large.h OR twitter_extended_entities.media.sizes.large.hincludes.media.heightexpansions=attachments.media_keys&media.fields=heightInt
twitter_entities.media.sizes.large.w OR twitter_extended_entities.media.sizes.large.wincludes.media.widthexpansions=attachments.media_keys&media.fields=widthInt
twitter_entities.media.sizes.large.resize OR twitter_extended_entities.media.sizes.large.resizeNot availableNot available
twitter_extended_entities.media.video_infoNot availableNot available
twitter_extended_entities.media.video_info.aspect_ratioNot availableNot available
twitter_extended_entities.media.video_info.duration_millisincludes.media.duration_msexpansions=attachments.media_keys&media.fields=duration_msInt
twitter_extended_entities.media.video_info.variantsNot availableNot available
twitter_extended_entities.media.video_info.variants.bitrateNot availableNot available
twitter_extended_entities.media.video_info.variants.content_typeNot availableNot available
twitter_extended_entities.media.video_info.variants.urlNot availableNot available
Not availableincludes.media.alt_textexpansions=attachments.media_keys&media.fields=alt_textString
Not availableincludes.media.public_metricsexpansions=attachments.media_keys&media.fields=public_metricsObject
Not availableincludes.media.public_metrics.view_countexpansions=attachments.media_keys&media.fields=public_metricsInt
Not availableincludes.media.non_public_metricsexpansions=attachments.media_keys&media.fields=non_public_metricsObject
Not availableincludes.media.non_public_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.non_public_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
Not availableincludes.media.organic_metricsexpansions=attachments.media_keys&media.fields=organic_metricsObject
Not availableincludes.media.organic_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.organic_metrics.view_countexpansions=attachments.media_keys&media.fields=organic_metricsInt
Not availableincludes.media.promoted_metricsexpansions=attachments.media_keys&media.fields=promoted_metricsObject
Not availableincludes.media.promoted_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
Not availableincludes.media.promoted_metrics.view_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt

Matching rules object

Activity Streams formatTwitter v2 formatRequired v2 parametersType in v2
gnip.matching_rulesmatching_rulesDefault in filtered streamArray of objects
gnip.matching_rules.tagmatching_rules.tagDefault in filtered streamString
gnip.matching_rules.tag.idNot AvailableNot Available
gnip.matching_rules.tag.id_strmatching_rules.idDefault in filtered streamString

Visual data format migration tool

The visual data format migration tool is a web application that displays the fields that map from the X API v1.1. data format to the X API v2 format for a given Tweet or user object. Either a Tweet ID or user ID can be provided to the application to see this mapping.

Please note that you will need to log in with your Twitter account in order to use the app.