Support > Twitter API > Twitter API v2

Twitter API v2 support

Twitter API v2 is the latest version available for all developers. Here we answer frequently asked questions on Twitter API v2 setup, features and migration.

 
 

Frequently asked questions about the Twitter API v2 setup and access

What is v2?

Twitter API v2 is the latest version of the Twitter API that can be used by all Twitter developers. Twitter Developer Platform originally launched Early Access to give developers a preview of the v2 API back in June 2020, and in November 2021 we launched a production ready, stable version of v2 for all developers. 

The functionality available within Twitter API v2 serves the majority of developers on the platform. The Twitter API v2 is the latest version of the single platform that will eventually replace the current standard v1.1, premium v1.1, and enterprise APIs.

Read more about this launch on our blog post "Build what's next with the new Twitter Developer Platform"

If I'm brand new to the Twitter API, which version should I use?

It's advantageous for all new Twitter developers to start with the most recent and supported version of the API, which is v2. Any new features will be released on Twitter API v2.

Is the Twitter API v2 stable, ready for production use?

Yes, after November 15th, 2021 the Twitter API v2 is the recommended version for development.

How can I get access to the Twitter API v2?

Apps that are associated with a Project within the developer portal will have Essential access to the Twitter API v2.  In order to create a project, you must have a developer account.  Sign up for a developer account.

What are the different access levels to the Twitter API v2?

All Twitter API access requires a developers account, which can be created quickly by signing up.  Essential access will be available immediately after signup, and Elevated access can be requested with a more detailed use case application.

  • Essential: Free, instant access to the Twitter API. Includes 500k Tweets/month and a single App environment. 1 App, 1 Project.
  • Elevated: Free access up to 2M Tweets/month, and 3 App environments. 3 Apps, 1 Project. Requires an approved developer account application.

How can I apply for Elevated access?

Apply for Elevated access.

Can I get more than Elevated access?

Yes, managed access with enterprise is an option. Or you can specify your interest in higher levels by joining the waitlist.

What is the difference between Essential and Elevated access?

Essential: Quick access, sign up for a developer account with your Twitter account, 1 App/environment (1 Project) up to 500K Tweets per month on data endpoints.

Elevated: Use case review required, apply for access through your developer account, 3 Apps/environments (1 Project) up to 2M Tweets per month on data endpoints.

What are the v2 rate limits?

Twitter API v2 endpoints each have their own technical rate limits listed on their respective API Reference, or in aggregate on the Twitter API v2 rate limits review page. In general, the Twitter API v2 rate limits are similar to the standard v1.1 rate limits. There is a monthly Tweet cap on the volume of Tweets that can be returned (consumed) with the Twitter API v2.

What is the monthly Tweet cap?

In addition to the request frequency rate limits per endpoint, there are monthly Tweet consumption limits that are applied across v2 endpoints used by an App at the the Project configuration level. The monthly Tweet cap does not deduplicate Tweets returned multiple times within the time period. The usage month can be reviewed on the dashboard, and is determined by the date your developer account was approved at 00:00 UTC. 

A Project with Essential access can consume up to 500,000 Tweets per month.

A Project with Elevated access can consume up to 2,000,000 Tweets per month.

What counts towards monthly Tweet cap?

Tweet consumption by volume is set at the project level when using v2 endpoints that contribute to the consumption limit.  Tweets received from the following endpoints count towards this monthly Tweet cap:

Does the POST limit apply to Twitter API v2?

Developer Apps are by default limited to the number of POST requests they can create across all authenticated users. The POST limit is measured at the App level across both v1.1 and v2. More information on the POST limit is described in the announcement.

The App level POST limits are:

  • Tweets & Retweets (combined): 300 per 3 hours
  • Likes: 1000 per 24 hours
  • Follows: 1000 per 24 hours
  • Direct Messages: 15,000 per 24 hours

Will my v2 usage affect my v1.1, premium or enterprise usage or integrations?

Twitter API v2 requests, rate limits, and volume limits are mutually exclusive from v1.1, premium and enterprise activity.  If you are using Essential access, you are only able to access the Twitter API v2 with your Apps.

How can I track my Twitter API v2 usage?

Twitter API v2 usage is tracked at the Project level and is shown within the developer portal dashboard.  Usage is measured and reset based on the date of the month shown within the monthly Tweet cap usage measurement bar.  Only certain endpoints (like filtered stream and recent search) count towards the monthly Tweet cap per Project.

Which endpoints are available in Essential and Elevated access?

All v2 endpoints listed on the Twitter API endpoint mapping chart are available for Essential and Elevated access.

Can all Twitter API v2 endpoints be elevated?

The difference between Essential and Elevated access includes the aggregate Tweet consumption limits, and number of environments available. Individual endpoint elevations are not available at this time.

Can I use the same Twitter App for accessing v1.1 and v2?

Yes, all Twitter Apps can access v1.1 by default, the Apps that have been configured with a Project can access v2 as well.

When will all v1.1 endpoints be available in v2?

All available Twitter API v2 endpoints are listed in the Twitter API endpoint map including a direct mapping of v1.1 and enterprise endpoints with current and upcoming Twitter API v2 launch plans, such as Direct Messages, trends, media and geo capabilities.

Where can I review my v2 setup?

All setup for Twitter API v2 is done within the developer portal. The Twitter App you are using for v2 requests must be linked to a Project.

Will there be a v3?

It's likely that in the future, there may be a version 3 of the Twitter API if there is an opportunity to create more functionality and access for developers to build with Twitter, which would require a non reverse compatible (breaking) change in order to launch.  Any additive, non breaking changes will be handled within minor version releases within Twitter API v2 and can be reviewed within the changelog here.

 

 

 

Frequently asked questions about Twitter API v2 features and functionality

What is only available with Twitter API v2?

Twitter API v2 is a consistent API across different access levels and will follow the Twitter Developer Platform versioning strategy. Some of the major net new features include:

Ability to request specific objects and  fields Pick and choose which data you receive in your response with our new fields and expansions functionality. This functionality means that the response payload metadata will be determined by the request.
 
New Tweet Create features

When creating Tweets with Twitter API v2 you can include:

  • Poll object options and functionality 
  • Tagged users in media
  • Reply settings
  • Super follows options
New and more detailed data objects

We’ve added additional data fields and objects to our responses, and are allowing you to request the following related objects to return directly in the related Tweet or user object:

  • Mentioned accounts in Tweets
  • Quoted and replied-to Tweets
  • Places tagged to Tweet
  • Media attached to Tweets
  • Current poll results and poll options in Tweets
  • The pinned-Tweet for an account
     
Advanced metrics return in Tweets More easily understand the performance of Tweets from directly within your payload by requesting both public and private Tweet metrics including impressions, video views, user profile and URL clicks, some of which are separated into an organic and promoted context.
 
Insights on Tweet topics with annotations When using search Tweets or filtered stream, you can now filter by topic using our entity and context operators. We’ve also provided these topics within the Tweet payload to help with analysis.
 
Improved conversation tracking Make it easier to identify a Tweet as part of a conversation thread when using recent search and Tweet lookup. We've also added the ablity to determine whether conversation reply settings have been set for a Tweet with the Tweet field reply_settings.
 
Academic Research Specialized Academic Research Program for researchers grants free access to full-archive search and other v2 endpoints released to date. It also includes a significantly higher monthly Tweet cap, and enhanced features and functionality to get more precise and complete data for analyzing the public conversation.


In addition to the above features, we’ve also released the following functionality:

  • High confidence spam filtering
  • Shortened URLs are fully unwound for easier URL analysis
  • Simplified JSON response objects by removing deprecated fields and modernizing labels
  • Recovery and redundancy functionality for our streaming endpoints
  • Return of 100% of matching public and available Tweets in search queries
  • Streaming "rules" so you can make changes without dropping connections
  • More expressive query language for filtered stream and search
  • OpenAPI spec to build new libraries & more transparently track changes
  • API support for new features and endpoints more quickly as our platform evolves to meet the needs of developers, researchers, businesses, and people using Twitter.

 

What is the Twitter API v2 OpenAPI spec?

Find the spec here: https://api.twitter.com/2/openapi.json

Where are the v2 code examples?

Review the tools and libraries page and look for the v2 label. Also, look for the Twitter API v2 label on Github libraries built by Twitter or the community, and review the Twitter API v2 postman collection.

Can I change my realtime filter stream rules without dropping my connection?

Yes. When using filter stream, the rules management endpoints can be utilized independently while the stream is connected. Rule updates will generally take a few seconds to apply and matching data will be sent to the connected stream.  Note that, if a stream with filter rules is not connected for 150 days, the filter rules will be removed.

How do Twitter context annotations work?

Twitter classifies Tweets semantically, meaning that we curate lists of keywords, hashtags, and @handles that are relevant to a given topic. If a Tweet contains the text we’ve specified, it will be labeled appropriately. This differs from a machine learning approach where a model is trained specifically to classify text (in this case, Tweets) and produce a probability score alongside the output/classification.

Is there a context annotations lookup, or taxonomy available?

No not at this time.

How do I know that Twitter annotation data is complete and trustworthy?

Twitter's annotations are curated by domain experts using research and QA processes that have been refined over the course of several years. The process is supported by custom tooling to scale data tracking as far as we are able to maintain excellent precision and recall. In addition, our data is audited regularly by an internal team, having received a precision score of ~80% for the past several quarters.

How do you ensure precision?

Team members QA our entities on a daily basis to ensure high precision and recall. Additionally, our work is audited quarterly by an internal team, which manually reviews 10,000 Tweets across all of our domains to calculate a precision score.

How do you decide what to track?

For some domains, like sports and TV, we rely on automated ingest to build out our graph. In the News domain, we track data around stories published by the Twitter Moments team. Otherwise, the team uses a variety of research methods to identify topics to track that garner a high amount of conversation on the platform.

What historical support is available with Tweet Annotations?

Data tracking begins the moment an entity is published; therefore, we do not annotate Tweets that were published prior to a given entity being tracked. For example, if an upstart brand/company is added to the taxonomy, we will not retroactively annotate Tweets about that brand prior to when the annotation was added.

What historical support is available with Tweet Annotations?

Data tracking begins the moment an entity is published; therefore, we do not annotate Tweets that were published prior to a given entity being tracked. For example, if an upstart brand/company is added to the taxonomy, we will not retroactively annotate Tweets about that brand prior to when the annotation was added.

 

Frequently asked questions about migration to Twitter API v2

When should I start migrating to v2?

Twitter API v2 is ready for production use and will only get better.  The v1.1, premium and enterprise APIs will still be supported in their current functionality, but any new features or improvements will be applied to Twitter API v2.  To start your migration, review the migration hub and guides available here.  

What are the differences between the Twitter API v1.1 and v2?

Review the resoruces in the migration hub including the comparison summary for each endpoint.

Where are the migration guides?

See the format comparisons:

As well as each specific endpoint:

v2 Endpoint Comparison guide Other specific migration guides
Tweets lookup  Tweets lookup comparison   Standard v1.1 to v2
Manage Tweets  Manage Tweets comparison  Standard v1.1 to v2
Timelines  Timelines comparison   Standard v1.1 to v2
Search Tweets  Search Tweets comparison
Tweet counts  Tweet counts comparison
Filtered stream  Filtered stream comparison
Volume streams  Volume stream comparison

Standard v1.1 to v2

Retweets  Retweets comparison
Likes  Likes comparison
Users lookup  Users lookup comparison

Standard v1.1 to v2

Follows  Follows comparison
Blocks  Blocks comparison
Mutes  Mutes comparison
Lists  Lists comparison

Standard GET lists v1.1 to v2

Standard POST lists v1.1 to v2

Will my search queries work in v2?

If you're using v1.1, you will need to update your query syntax.  Most v1.1 operators have a similar v2 operator counterpart.  To convert your v1.1 queries to v2, check out the conversion tool.

If you're using premium Search Tweets, you can use the same queries from premium with v2.

If you're using enterprise Search, you can use the same queries from enterprise with v2.

Will my stream filters work in v2?

If you're using statuses/filter v1.1, you will need to update your filter/parameter syntax to create filter rules for v2.  Most v1.1 operators and functionality have a similar v2 operator counterpart.  To convert your v1.1 queries to v2, check out the conversion tool.  To review filter rule migration and a list of all filter operators and functions, please see our guide here: 

If you're using enterprise PowerTrack, you can use the same filter rules from enterprise with v2.

How can I get the same v1.1 response data per Tweet in v2?

You can get the same v1.1 Tweet fields using the Twitter API v2 if you specify the fields and expansions. For example, when making your request to the GET /tweets endpoint, use the following URI, making sure to replace the Tweet ID with your preferred Tweet:

https://api.twitter.com/2/tweets?ids=1412865600439738368&expansions=author_id,referenced_tweets.id,referenced_tweets.id.author_id,entities.mentions.username,attachments.media_keys,in_reply_to_user_id,geo.place_id&tweet.fields=attachments,author_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,public_metrics,referenced_tweets,source,text,withheld&user.fields=created_at,description,entities,id,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&place.fields=contained_within,country,country_code,full_name,geo,id,name,place_type

Or to get all available fields in Twitter API v2, you can request:

https://api.twitter.com/2/tweets?ids=1412865600439738368&expansions=author_id,referenced_tweets.id,referenced_tweets.id.author_id,entities.mentions.username,attachments.poll_ids,attachments.media_keys,in_reply_to_user_id,geo.place_id&tweet.fields=attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld&media.fields=alt_text,duration_ms,height,media_key,non_public_metrics,organic_metrics,preview_image_url,promoted_metrics,public_metrics,type,url,width&place.fields=contained_within,country,country_code,full_name,geo,id,name,place_type&poll.fields=duration_minutes,end_datetime,id,options,voting_status

Will my authentication settings and authenticated users with v1.1 work with v2?

Yes. The authentication flow and authorization settings are the same for v1.1 and v2.  Both versions use OAuth1.0a and OAuth2 bearer token. You should not need to re-authenticate for new access tokens. 

 

 

Get support

The Twitter community forum is available for you to ask technical questions about the Twitter developer platform. This is a discussions forum where you will find questions by other developers and technical information on a variety of topics related to using the Twitter API.

We encourage you to join the conversation by responding to questions and engaging in conversations on our forum. Twitter employees are also there to provide support.

Before you post a question

When you post a question, make sure to include the following information

  • A description of the problem
  • The API call being made (include headers, if possible)
  • The Twitter response returned (include any error messages)
  • What you expected to receive instead
  • List of steps taken to troubleshoot the issue
  • List of steps required to reproduce the issue
  • If relevant, the time frame during which an issue occurred 
  • If relevant, the App ID, Tweet ID, etc.
  • Any relevant code sample or screenshots

Please only include one topic/question per post. 

For feature requests or missing functionality, please use our feedback platform instead.

For Policy-related issues, such as App suspension, please contact Policy support.

For Twitter-related issues, such as login and account support, please use the Twitter Help Desk.