How to search your tweets

Please note

These endpoints provide similar functionality to the standard v1.1 seven-day search endpoint and the premium and enterprise full-archive search products.

You can see an overview of the Search Tweets offerings via our search overview , and can see what’s new with v2 in our migration guides .

Learn more about the new Twitter API v2.

Introduction

Searching for Tweets is an important feature used to surface Twitter conversations about a specific topic or event. While this functionality is present in Twitter, these endpoints provide greater flexibility and power when filtering for and ingesting Tweets so you can find relevant data for your research more easily; build out near-real-time ‘listening’ applications; or generally explore, analyze, and/or act upon Tweets related to a topic of interest.

We offer two endpoints that allow you to search for Tweets: Recent search and full-archive search. Both of these REST endpoints share a common design and features, including their use of a single search query to filter for Tweets around a specific topic. These search queries are created with a set of operators that match on Tweet and user attributes, such as message keywords, hashtags, and URLs. Operators can be combined into queries with boolean logic and parentheses to help refine the queries matching behavior.

Once you’ve set up your query and start receiving Tweets, these endpoints support navigating the results both by time and Tweet ID ranges. This is designed to support two common use cases:

  • Get historical: Requests are for a period of interest, with no focus on the real-time nature of the data. A single request is made, and all matching data is delivered using pagination as needed. This is the default mode for Search Tweets.
  • Polling or listening: Requests are made in a "any new Tweets since my last request?" mode. Requests are made on a continual basis, and typically there is a use case focused on near real-time ‘listening’ for Tweets of interest.

Many operators and query limits are exclusive to Academic Research access, meaning that you must use keys and tokens from an App within a Project with Academic Research access to utilize the additional functionality. You can learn more about this in the endpoint sections below.

Both the recent search and the full-archive search endpoints returned Tweets contribute to the monthly Tweet cap.

Recent search

The recent search endpoint allows you to programmatically access filtered public Tweets posted over the last week, and is available to all developers who have a developer account and are using keys and tokens from an App within a Project.

You can authenticate your requests with OAuth 2.0 Bearer Token, but if you would like to receive private metrics, or a breakdown of organic and promoted metrics within your Tweets, you will have to use OAuth 1.0a User Context and pass user Access Tokens that are associated with the user that posted the Tweet.

This endpoint can deliver up to 100 Tweets per request in reverse-chronological order, and pagination tokens are provided for paging through large sets of matching Tweets.

When using a Project with Essential or Elevated access, you can use the basic set of operators and can make queries up to 512 characters long. When using a Project with Academic Research access, you have access to additional operators and can make queries up to 1024 characters long.

Full-archive search

Academic Research access only

The v2 full-archive search endpoint is only available to Projects with Academic Research access. The endpoint allows you to programmatically access public Tweets from the complete archive dating back to the first Tweet in March 2006, based on your search query.

You can authenticate your requests to this endpoint using OAuth 2.0 Bearer Token, and the Bearer Token must come from an App that is within a Project that has Academic Research access. Since you cannot make a request on behalf of other users (OAuth 1.0a User Context) with this endpoint, you will not be able to pull private metrics.

This endpoint can deliver up to 500 Tweets per request in reverse-chronological order, and pagination tokens are provided for paging through large sets of matching Tweets.

Since this endpoint is only available to those that have been approved for Academic Research access, you have access to the full set of search operators and can make queries up to 1024 characters long.

Learn more about getting access to the Twitter API v2 endpoints in our getting started section.

There are many ways to use search on Twitter. You can find Tweets from yourself, friends, local businesses, and everyone from well-known entertainers to global political leaders. By searching for topic keywords or hashtags, you can follow ongoing conversations about breaking news or personal interests.

We give you control over what you see in your search results through safe search mode. These filters exclude potentially sensitive content, along with accounts you have muted or blocked, from your search results. You have the option to turn it off, or back on, at any time (instructions outlined below).

When you’re signed in to your account on the web, using search is slightly different than using it via the Twitter for iOS or Android apps. You can find instructions for both below.

Tap the Explore tab

At the top of the page, enter your search into the search box and tap Search.

Your results will show a combination of Tweets, photos, accounts, and more.

Filter your results by tapping Top, Latest, People, Photos, Videos, News, or Broadcasts (located at the top of your search results).

Tap the filter icon

in the search bar to refine your results according to All people or People you follow, and Everywhere or Near you.

How to search your tweets

Twitter Ads allow you to schedule both organic and Promoted-only Tweets to go live at a specific date and time. You can schedule Tweets within your ads account, up to a year in advance, and add them to new and existing campaigns. This feature is great for Tweets that need to be published on weekends, evenings, or other busy times when you don’t have time to Tweet manually.

  • Create Tweets
  • Manage Tweets
  • FAQs
Watch this video for an overview on how to schedule organic and Promoted-only Tweets:

How to create scheduled Tweets

2. Navigate to the "Creatives" > "Tweets" tab.

3. Click on "New Tweet" in the top right corner.

  • You’ll be redirected to the Tweet Composer, where you can create your Tweet. Add your copy, photos, videos, and cards here.

4. Choose "Promoted-only" or not. Selecting "Promoted-only" will deliver your Tweet only to users targeted in a Promoted Ads campaign, not organically to your followers. Unselecting this will schedule an organic Tweet.

  • You can only unselect "Promoted-only" when logged into your ads account.

5. Once you’re finished, select the down arrow button next to "Tweet".

6. Choose "Schedule" from the drop-down menu.

7. Select the date and time you want your scheduled Tweet to go live.

Your Tweet won’t be discoverable on Twitter or by any data partners until the date and time you scheduled.

Search for Twitter influencers to hire for your next influencer marketing campaign.

Search for Twitter influencers to hire for your next influencer marketing campaign.

How to search your tweets

Twitter influencer discovery tool with keyword search, filters and much more!

How to search your tweets

Search through Twitter influencers visual content.

How to search your tweets

Create unlimited lists of your top Twitter influencers

How to search your tweets

Twitter influencer discovery tool with keyword search, filters and much more!

How to search your tweets

Search through Twitter influencers visual content.

How to search your tweets

Create unlimited lists of your top Twitter influencers

USED BY TOP BRANDS AND AGENCIES

Start searching for Twitter influencers.

How to search your tweets

Flyout Profiles with Detailed Information

Explore each creator’s content, social connections, personal information, and audience data to see if the creator is the right fit.

How to search your tweets

If you’re a Twitter power user, you might have thousands of tweets and likes on your account. That can be a lot to sift through just using the website or app.

You can request a full record and archive of all your Twitter activity — all your tweets, photos, followers, and more — by heading to your Account options page on the website or in the app. It might take a while to download depending on how active your account is, but you’ll be able to download it on any device.

How to request your Twitter archive

These steps are pretty much the same both on the website and in the mobile app.

1. Head to the Twitter website or open the app and log into your account, if you haven’t already.

2. If you’re on the website, click the More option in the left sidebar. In the mobile app, tap your profile picture in the top-left corner.

3. Select Settings and privacy.

4. Select Your account, and then Download an archive of your data.

5. You’ll have to re-enter your password and a two-factor authentication code. If you don’t have two-factor set up, you’ll be taken to a different page to enable it first.

6. Select Request archive.

Now you’ll have to wait for Twitter to make your archive. When it’s done, you’ll get a notification on Twitter and an email with a link to it.

How to download and see your Twitter archive

Once you get the email or notification from Twitter:

1. Open it up and click download, or head back to the data menu using the steps we described above. You’ll have to enter your password and a two-factor authentication code again.

2. Click Download archive, and then click it again on the next page. You’ll be given a ZIP file to download — it might take a while, depending on your internet connection and how big it is.

3. Once you download the ZIP file, unzip it and open it.

4. There are a lot of different files and folders inside. The most important are:

  • The file called Your archive.html is a personalized webpage containing the data that Twitter thinks will be most useful to you. This includes all your original tweets (no retweets or replies), your direct messages, the last year-or-so of Likes, your “Moments” and Lists, and a massive amount of information that advertisers have collected about you. You can open this file in nearly any web browser.
  • Inside of the data folder, you’ll find README.txt, a document explaining what every single file in the folder is and what it contains.
  • You’ll also see a folder called tweet_media, which has every photo and video you’ve uploaded to Twitter or retweeted.

Quick tip: You can download and open these folders on your phone, but we recommend looking at them on a computer. It makes browsing through the files and HTML page much easier.

Most files inside of the archive are JSON files (.js), which you can open in nearly any web browser or word processor. But the easiest way to read your archive is using the HTML file.

Be sure to download your archive within a few days of getting it — after about a week, it’ll expire and you’ll need to request it again.