About the Twitter API
The Twitter API can be used to programmatically retrieve and analyze Twitter data, as well as build for the conversation on Twitter.
Over the years, the Twitter API has grown by adding additional levels of access for developers and academic researchers to be able to scale their access to enhance and research the public conversation.
Recently, we released the Twitter API v2. The Twitter API v2 includes a modern foundation, new and advanced features, and quick onboarding to Essential access.
The following three tabs explain the different versions and access levels of the Twitter API, what’s new with v2, and which Twitter resources you can retrieve, create, destroy, and adjust using the API.
Twitter API access levels and versions
While the Twitter API v2 is the primary Twitter API, the platform currently supports previous versions (v1.1, Gnip 2.0) as well. We recommend that all users start with v2 as this is where all future innovation will happen.
The Twitter API v2 includes a few access levels to help you scale your usage on the platform. In general, new accounts can quickly sign up for free, Essential access. Should you want additional access, you may choose to apply for free Elevated access and beyond.
|Getting access||Sign up||Apply for additional access within the developer portal||Need more?
Sign up for our waitlist
|Apply for additional access|
|Access to Twitter API v2||✔️||✔️||✔️|
|Access to standard v1.1||✔️ (Limited access - only media endpoints)||✔️||✔️|
|Access to premium v1.1||❌||✔️||✔️|
|Access to enterprise||❌||✔️||✔️|
|Project limits||1 Project||1 Project||1 Project|
|App limits||1 App per Project||3 Apps per Project||1 App per Project|
|Tweet caps||Retrieve up to 500k Tweets per month||Retrieve up to 2 million Tweets per month||Retrieve up to 10 million Tweets per month|
|Filtered stream rule limit||5 rules||25 rules||1000 rules|
|Filtered stream rule length||512 characters||512 characters||1024 characters|
|Filtered stream POST rules rate limit||25 requests per 15 minutes||50 requests per 15 minutes||100 requests per 15 minutes|
|Search Tweets query length||512 characters||512 characters||1024 characters|
|Access to full-archive search Tweets||❌||❌||✔️|
|Access to full-archive Tweet counts||❌||❌||✔️|
|Access to advanced filter operators||❌||❌||✔️|
|Option to manage a team in the developer portal||❌||✔️ (Requires an organization type account)||❌|
|Access to the Ads API||✔️ (Requires additional application)||✔️ (Requires additional application)||❌|
|Authentication methods||OAuth 2.0 with PKCE
|OAuth 2.0 with PKCE
|OAuth 2.0 with PKCE
If you were approved for a developer account before November 15th, 2021, you were automatically converted to Elevated access. This means that your existing Apps can continue to be used to make requests to standard v1.1, premium v1.1, and enterprise endpoints, and that all of your user Access Tokens are still valid.
If you would like to start using v2 endpoints, you will need to attach an App to a Project and use the credentials from that App when making requests to v2 endpoints.
The standard v1.1 endpoints were launched in 2012 and enable you to post, interact, and retrieve data for resources such as Tweets, Users, Direct Messages, Lists, Trends, Media, and Places.
Migrate to Twitter API v2
Interested in migrating your current integration to Twitter API v2? Check out our migration hub for resources that will help you understand what is different between v2 and previous versions, including the data formats. You can also access migration guides for each endpoint listed in the new v2 endpoint sections.
What's new with v2
The Twitter API v2 represents the largest upgrade of the Twitter API since 2012. With it comes a host of new and advanced features, as well as fast and free access to the API.
Some of the features that are available with v2 include the following:
We have released a set of net-new endpoints to Twitter API v2. You can see a full list of v2 endpoints, including those that are new, on our Twitter API endpoint map guide.
New and more detailed data objects
We've modernized our data objects with a variety off new improvements that will enable you to more easily navigate and parse data.
New parameters to help you retrieve just those objects and fields that you want
We’ve added fields and expansions parameters to our data endpoints that allow you to request related objects and fields beyond those fields that return by default.
More easily understand the performance of Tweets, users, media, and polls from directly within your payload by requesting both public and private metrics including impressions, video views, user profile, and URL clicks, some of which are separated into an organic and promoted context.
Filter on and identify which Tweets contain different topics
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.
FIlter on and identify which Tweets belong to a reply thread
Make it easier to identify a Tweet as part of a conversation thread when using search Tweets, filtered stream, and Tweet lookup. We've also added the ability to determine whether conversation reply settings have been set for a Tweet with the Tweet field reply_settings.
A specific access level for Academic Researchers
This specialized access level for researchers grants free access to full-archive search, full-archive Tweet counts, 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.
And so much more...
- 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
Twitter API platform resources
In the API design space, a resource is an entity with associated data, relationships to other resources, and a set of methods that operate on it. For example, a Tweet is a resource that you can create, delete, or retrieve using a variety of different tools, such as historically searching for them, or retrieving them in real-time.
The Twitter API provides access to create, delete, receive, or adjust a variety of different resources on the platform including the following:
Tap into millions of Tweets to understand the public conversation, or create your own to engage with the conversation.
Manage or look up Twitter users to analyze networks, understand your audience, or foster positive online relationships.
Look up and search Twitter Spaces and their attendees to help people find interesting and relevant audio conversations.
Send and receive Direct Messages to triage customer issues, send welcome messages, or create positive human interaction.
Curate and manage lists of accounts to keep a pulse on industry experts, powerful voices, or organize who you follow.
Identify geographic trends first to pinpoint industry movement, discover hot topics, or stay ahead of the latest fad.
Upload media objects to share your creative energy, create interactive experiences, or build accessibility tools.
Search for places to understand what’s happening in your neighborhood and around the world.
We’ve also put together a guide describing how to make your first request to the Twitter API.
If you have any feedback on these getting started resources, we’d love to hear from you!
Please fill out the brief survey at the bottom of each page to help us improve.