How to Access Historical Twitter Data: Search Old Tweets via API
Accessing historical Twitter data - tweets, replies, quotes, and engagement metrics going back years - is essential for market research, academic studies, OSINT investigations, competitive analysis, and trend tracking. Whether you need to analyze public discourse around a 2020 event, audit a brand’s entire posting history, or study how sentiment shifted over time on a topic, you need reliable access to Twitter’s full archive of public posts. This guide explains how to retrieve historical tweets programmatically using Sorsa API, which provides full-archive search access to every public post on X (formerly Twitter) dating back to 2006. No OAuth, no developer portal approval, no academic track application - just an API key and a POST request. You will learn how to search old tweets by keyword with date ranges, scrape a user’s complete timeline, filter historical content by engagement, and export the results for analysis.Current Landscape: How to Get Old Tweets in 2026
Before diving into implementation, it helps to understand the available options and their tradeoffs:| Method | Cost | Archive Depth | Setup | Data Completeness | Best For |
|---|---|---|---|---|---|
| X Advanced Search (web) | Free | Back to 2006 | None | Low (no export, manual scrolling) | Quick spot checks |
| X API Full-Archive Search | $5,000+/mo | Back to 2006 | High (OAuth, approvals) | High (with field config) | Funded research teams |
| Snscrape / scrapers | Free | Varies | Medium (coding, proxies) | Unreliable (anti-bot) | Budget experiments |
| Academic archives (TweetSets) | Free | Event-specific | Medium (hydration needed) | Partial (dehydrated IDs) | Specific event datasets |
| Sorsa API | Pay-per-use | Back to 2006 | Low (API key only) | High (full data by default) | Production pipelines, research |
/2/tweets/search/all) is powerful but requires the Pro tier ($5,000+/month) or Enterprise access. The Academic Research track that once provided free full-archive access has been discontinued for new applicants. Even with access, the v2 API returns minimal data by default (just id and text) - you must explicitly request tweet.fields, user.fields, and expansions to get engagement metrics and author profiles.
Sorsa API eliminates these barriers: full-archive access with a single API key, flat JSON responses that include all tweet fields and author data by default, and simple POST-based endpoints that work the same way whether you are searching tweets from yesterday or from 2012.
Two Endpoints for Historical Retrieval
Sorsa offers two paths depending on whether you are searching by keyword or scraping a specific account’s timeline.Keyword-Based Archive Search: /search-tweets
The /v3/search-tweets endpoint supports all X search operators, including since: and until: date filters. Pass your date-bounded query in the JSON body:
Account Timeline Scraping: /user-tweets
The /v3/user-tweets endpoint returns a user’s complete posting history in reverse chronological order (newest first). Paginate until next_cursor returns null to capture the full archive.
What You Can Retrieve
Every historical tweet comes with the same rich data as a recent one: full text (no truncation), all engagement metrics at their current values (likes, retweets, replies, quotes, views, bookmarks), the complete author profile embedded in each tweet, media entities with links to images/videos/GIFs, conversation metadata (conversation_id_str, in_reply_to_tweet_id, is_reply, is_quote_status), and language tags.
What Is Not Accessible
These are platform-level limitations, not Sorsa-specific:- Deleted tweets. Removed from X’s search index entirely. No API can retrieve them.
- Protected accounts. Tweets from accounts with “Protect your posts” enabled are excluded from all search and timeline results.
- Historical profile snapshots. Profile data reflects the current state (current bio, username, follower count), not past versions.
- Historical engagement snapshots. Metrics show current totals, not what they were at a specific point in time. A tweet from 2018 shows its 2026 like count.
Code Example: Time-Range Keyword Search (Python)
Search for tweets about a specific topic within a defined historical window. This is the most common pattern for event analysis, campaign retrospectives, and academic research.Code Example: Full Account Timeline Scraping (Python)
Walk through an account’s entire posting history from newest to oldest. Useful for competitor audits, influencer analysis, or archiving a public figure’s complete output.Code Example: Historical Search with Engagement Filter (JavaScript)
Find high-engagement historical content on any topic. Ideal for content research - discovering what resonated with audiences in past years.Exporting Historical Data to CSV
A complete pipeline for collecting historical tweets and writing them to a CSV file ready for Excel, Google Sheets, Pandas, or any BI tool.Strategies for Large-Scale Historical Collection
Chunk Large Date Ranges into Monthly Windows
Collecting data across a full year in a single query gives you no control over volume per batch and no clean resume point if something fails. Break the range into monthly chunks instead:Filter Retweet Noise with -filter:nativeretweets
Historical searches often return a flood of retweets that bury original content. Adding -filter:nativeretweets ensures you only see original posts - the actual opinions, analysis, and commentary from real users. This is critical for sentiment analysis and content research.
Combine Engagement Filters with Date Ranges
Pair time filters with engagement thresholds to surface only the tweets that gained real traction during the window you care about:Use Language Filters for Global Event Research
When researching events with worldwide coverage, always specifylang:xx in your query. Run separate queries per language for cleaner analysis:
Paginate Until the Cursor Is Empty
The cursor-based pagination loop should stop only whennext_cursor is null, empty, or absent from the response. Do not stop based on the number of tweets in a single page - some pages may return fewer results without indicating the end. Always check the cursor explicitly. For the full pagination pattern, see Pagination.
Next Steps
- How to Search Tweets via API - complete guide to
/search-tweetsincluding all parameters and real-time use cases. - Search Operators Reference - full dictionary of date, engagement, media, and Boolean operators you can use in historical queries.
- Pagination - deep dive into cursor-based pagination for large-scale collection.
- Real-Time Monitoring - combine historical backfill with live monitoring for complete coverage.
- Search Mentions Guide - track how often an account has been mentioned over any historical period.
- API Reference - full specification for
/user-tweets,/search-tweets, and all 38 endpoints.