Twitter (X) Academic Research API — A Practical Guide
- The old Twitter (X) v2 Academic tier is sunset — no direct replacement product exists
- twitterapi.io covers the same full-archive search at $0.00015/tweet with no institutional gating
- X official offers full-archive search on pay-per-use at $0.005 per post read (and on Enterprise), about 33x our per-tweet price
- Grant-eligible institutional projects sometimes get X's academic access reinstated case-by-case — worth applying if you have institutional affiliation
For years, X (formerly Twitter) offered a dedicated Academic Research product tier — free / discounted access to the full historical archive of public tweets, gated by institutional affiliation and research-purpose review. Academic institutions worldwide built research programs on top of it. In 2023 X sunset the tier. Full-archive search still exists on the official API, but as a paid product billed per post read.
This guide covers the practical replacements for academic and research workloads in 2026 — what's still available, what costs, and how to run the same full-archive search patterns programmatically. Pricing references URL-cited to each provider.
~$15 via twitterapi.io vs $500 on X pay-per-use full-archive search (100,000 × $0.005)
What sunset — and what replaced it
Sunset (2023): the v2 Academic Research tier. This was the free-with-institutional-affiliation product that gave verified academic users full-archive search back to Twitter's first tweet in 2006.
Current state (2026): no dedicated Academic tier exists in X's product line. Full-archive search lives at /2/tweets/search/all, which docs.x.com lists as available to pay-per-use and Enterprise customers; pay-per-use bills $0.005 per post read. Case-by-case reinstatements for specific institutional research programs have been reported but are not a documented consistent product.
Third-party alternatives: providers like twitterapi.io that maintain a full-archive index at commercial pricing per tweet returned. No institutional-affiliation gating, no Developer Console onboarding — API key from an email signup.
Path 1 — twitterapi.io /twitter/tweet/advanced_search
Auth via X-API-Key. Full-archive search depth included (back through the platform's history for indexed tweets). Same advanced-search operator syntax as X — from:user, since:YYYY-MM-DD, until:YYYY-MM-DD, min_faves:N, lang:xx, filter:verified, #hashtag, "exact phrase", boolean combinations.
Pricing per twitterapi.io/pricing: $0.00015 per returned tweet. A 100,000-tweet corpus for a research project (moderate size) costs ~$15. A 1M-tweet corpus for a discourse-analysis or longitudinal study costs ~$150. No monthly minimum, no Developer Console onboarding. Relative cost framing: $0.00015 per tweet at twitterapi.io vs $0.005 per post read on X's pay-per-use full-archive search (docs.x.com/x-api/getting-started/pricing), so about 33x cheaper per read ($0.005 / $0.00015 = 33.3).
import os, requests, json
from pathlib import Path
HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
BASE = "https://api.twitterapi.io"
def research_pull(query: str, out_path: str, max_pages: int = 100):
"""Pull a research corpus to JSONL. Paginate cursor until exhausted."""
Path(out_path).parent.mkdir(exist_ok=True)
tweets, cursor = 0, None
with open(out_path, "w") as f:
for _ in range(max_pages):
params = {"query": query}
if cursor: params["cursor"] = cursor
r = requests.get(
f"{BASE}/twitter/tweet/advanced_search",
headers=HEADERS, params=params, timeout=15,
)
r.raise_for_status()
resp = r.json()
for t in resp.get("tweets", []):
f.write(json.dumps(t) + "\n")
tweets += 1
cursor = resp.get("next_cursor")
if not cursor: break
return tweets
# Example: climate-change discourse in 2020
n = research_pull(
'"climate change" since:2020-01-01 until:2021-01-01 lang:en',
"climate_2020_corpus.jsonl",
)
print(f"pulled {n} tweets")
# Cost: ~$15 for a 100K-tweet corpus at $0.00015/tweetPath 2 — X official full-archive search
The /2/tweets/search/all endpoint keeps the full-archive functionality, and docs.x.com lists it as available to pay-per-use and Enterprise customers. On pay-per-use it bills $0.005 per post read (docs.x.com/x-api/getting-started/pricing): a 100,000-tweet corpus costs 100,000 × $0.005 = $500, and a 1M-tweet corpus costs $5,000.
Two limits matter for research budgets. First, the per-read price: the same 100,000-tweet corpus is about $15 on path 1 against $500 here. Second, the ceiling: pay-per-use is capped at 3 million Post reads per monthly billing cycle (per X's pricing page, as of 2026), so a larger corpus has to be spread over several billing cycles or moved to Enterprise, which has no public price. For institutions that already hold an X Enterprise contract, research use can ride on that agreement.
Common academic workloads — running them cheaply
Discourse analysis on a topic over years: pull all tweets matching your topic + date range, feed to your qualitative-analysis tool (NVivo, Atlas.ti, custom Python). Storage cost typically dwarfs API cost.
Longitudinal study of a user's posting patterns: from:username since:YEAR1 until:YEAR2 — pull one user's full archive in a date range for behavioral analysis. Sub-$1 per user for typical multi-year pulls.
Sentiment / classification training corpora: pull matched tweets, apply your classifier, iterate. Iteration cost is the classifier (LLM API + compute), not the tweet pull.
Cross-language comparative research: same query with different lang: filters, compare corpora across languages. Full archive supports going back years across all major-language subsets.
Network / graph analysis: pull tweets + author metadata to reconstruct interaction graphs. Combine advanced_search with /twitter/user/info for network-node enrichment.
Side-by-side — 2 paths for academic research
Costs derived from each provider's published pricing. Both paths are open to an individual researcher; the rows that differ are price and the monthly ceiling.
Two practical observations: (a) individual-researcher and small-lab projects usually land at twitterapi.io on price, since the per-read gap is about 33x ($0.005 / $0.00015 = 33.3); (b) corpus size decides the rest, because anything above 3 million posts in one billing cycle does not fit X pay-per-use and needs Enterprise.
Reproducibility + citation notes
Cite the API + version: research using twitterapi.io should cite the provider name, endpoint, and access date in the data section of any resulting paper. Same for X official.
Store the raw JSONL, not just processed outputs: reviewers may request the raw data. Store per-query JSONL corpora in institutional archival storage per your research-data policy.
Rate limits + reproducibility: your query may return different result counts if re-run months apart (deletion, account suspension, index changes). Store the count + captured-at metadata alongside the corpus.
Ethics review: your IRB / ethics board may have specific requirements for social-media data collection. The twitterapi.io path doesn't automatically satisfy those; the compliance layer is on the researcher regardless of provider.
Picking the path
Individual researcher, small lab, thesis / paper project: twitterapi.io. Immediate access, about $15 per 100,000 tweets against $500 on X pay-per-use, no monthly read cap.
Project that must cite the official endpoint, or an institution with an existing X Enterprise contract: X official /2/tweets/search/all. Budget $0.005 per post read on pay-per-use and plan around the 3-million-read monthly cap.
Case-by-case X academic access reinstatement: worth applying if you have institutional affiliation + a well-defined research question aligned with X's stated academic-support priorities. Not a reliable path but occasionally granted.
Most researchers arriving here on a grant or personal budget land at twitterapi.io. Access is open on both sides; the price gap is what decides it.
# Practical example: build a longitudinal research corpus for a topic across years.
import os, requests, json
from datetime import date, timedelta
from pathlib import Path
HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
BASE = "https://api.twitterapi.io"
TOPIC = '"machine learning" min_faves:10'
YEARS = range(2018, 2025) # 7-year longitudinal window
OUT_DIR = Path("ml_corpus")
OUT_DIR.mkdir(exist_ok=True)
def pull_year(topic: str, year: int) -> int:
query = f"{topic} since:{year}-01-01 until:{year+1}-01-01"
tweets, cursor = 0, None
out_path = OUT_DIR / f"{year}.jsonl"
with open(out_path, "w") as f:
for _ in range(200): # cap pages for budget safety
params = {"query": query}
if cursor: params["cursor"] = cursor
r = requests.get(f"{BASE}/twitter/tweet/advanced_search", headers=HEADERS, params=params, timeout=15)
r.raise_for_status()
resp = r.json()
for t in resp.get("tweets", []):
f.write(json.dumps(t) + "\n")
tweets += 1
cursor = resp.get("next_cursor")
if not cursor: break
return tweets
total = 0
for y in YEARS:
n = pull_year(TOPIC, y)
total += n
print(f" {y}: {n} tweets ({total} cumulative)")
print(f"\nTotal corpus: {total} tweets")
# Cost framing per twitterapi.io/pricing:
# ~500K tweets × $0.00015 = ~$75 for a 7-year longitudinal corpus
# Includes JSONL per-year files ready for analysis / archival / IRB reviewResearching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.
Questions readers ask
Is the old Twitter (X) v2 Academic Research API coming back?
No public roadmap statement to that effect. Since the 2023 sunset, full-archive search on the official API is a paid product: open to pay-per-use customers at $0.005 per post read, and to Enterprise. Third-party providers now cover the low-cost full-archive niche that Academic filled.
Can I use twitterapi.io data in a peer-reviewed publication?
Yes — cite the provider, endpoint, and access date in your data section. Reviewers generally accept commercial-API data sources when the provider is documented and the query is reproducible. Check journal-specific data policies before submission.
What about ethics / IRB review for social-media research?
IRB / ethics-review requirements apply to your research design regardless of data provider. Common requirements: individual identifiability handling, informed-consent considerations for high-profile users, storage security. The API access layer doesn't affect ethics posture.
How far back does the archive actually go?
For twitterapi.io: back through the platform's history for indexed tweets. Very old tweets (pre-2010) may have gaps due to indexing methodology of that era. For X official full-archive search: back to the platform's first tweet, most comprehensive.
Can I get free access to twitterapi.io as a student or researcher?
Signup includes free starter credits (up to $1 for new accounts that pass the automatic bot check, one per person and network, no card required, expiring after 31 days; see /pricing) — enough for method development and a first smoke test. Pilot studies and sustained research corpora move to pay-per-tweet at $0.00015. Reach out to their support if you have specific grant-funded research needs; they may have researcher accommodations.
What's the difference between full-archive search and just polling recent tweets?
Recent-search (last 7 days) is what most consumer-tier APIs offer; full-archive spans years. Academic research typically needs full-archive to construct longitudinal or historical corpora. Both twitterapi.io advanced_search and X's /2/tweets/search/all (pay-per-use or Enterprise) provide full-archive; X's recent search does not.
Continue
- twitterapi.io — pricing
- X API — pricing (docs.x.com, 2026 verified)
- X — full-archive search (pay-per-use and Enterprise)
- Twitter (X) API — cluster hub
- Twitter (X) history API — export timeline
- Twitter (X) advanced search — complete guide
- Twitter (X) archive — tweet finder via API
- twitterapi.io pricing
- 01Most Mentioned Stocks and Crypto on Twitter (X): 81.3 Million Cashtag Mentions, 2024-2026
- 02Twitter (X) Images Not Loading: A Five-Hop Fix Checklist
- 03X Premium in 2026: The X Subscription Tiers, What They Unlock, and How to Cancel
- 04Twitter (X) Ads Library: What the X Ads Repository Shows, and What It Misses
- 05TweetScout explained: the crypto Twitter (X) score, its API, and a smart-follower score you can build yourself
- 06Tavily API: Key, Credits, Pricing and What It Finds on Twitter (X)
- 07Twitter (X) Advanced Search API — Operators, Code, Cost
- 08Grok Bot Marketplace: the templates, which ones read Twitter (X), and how to build on them
Writing about something you built with TwitterAPI.io? Our community rewards program pays API credits for honest tutorials, build logs and videos.
Stop reading. Start building.
Starter credits cover real testing on real data. Google sign-in, no card, no application queue.
Get an API keyAlready building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.