Twitter (X) Academic Research API — A Practical Guide
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, folding the functionality into its Enterprise product line at enterprise pricing.
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.
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 functionality has moved to /2/tweets/search/all on the Enterprise tier, at enterprise pricing. 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 on the closest self-serve X path (Basic tier recent-search per docs.x.com/x-api/getting-started/pricing) — the same ~33× per-call ratio that shows up across other twitter (X) API workloads.
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 Enterprise full-archive
The /2/tweets/search/all endpoint retains full-archive functionality but on X Enterprise tier only. Multi-year contracts, dedicated support, enterprise pricing per docs.x.com/x-api/getting-started/pricing.
For institutions with existing X Enterprise contracts (large media organizations, government research programs, some university-consortium arrangements): marginal cost of research use rides on existing infrastructure. For new research programs without that contract: not accessible at the individual-researcher level.
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. Institutional-affiliation column captures the practical gating: how gated the access is for an individual researcher.
Two practical observations: (a) individual-researcher and small-lab projects almost always land at twitterapi.io because of the setup-friction delta; (b) X Enterprise still matters for large institutional programs where the multi-year contract also brings dedicated support + guaranteed SLA that most research projects don't need.
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, low per-corpus cost, no institutional-affiliation review.
Multi-year institutional research program at an R1 with existing enterprise commitments: X Enterprise. Contract already paid for; marginal cost lower.
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 without a pre-existing X Enterprise contract land at twitterapi.io. The friction delta is enormous.
# 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 reviewQuestions readers ask
Is the old Twitter (X) v2 Academic Research API coming back?
No public roadmap statement to that effect. Since the 2023 sunset, X has moved full-archive functionality to Enterprise-tier only. Third-party providers now cover the low-friction 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 Enterprise official: back to the platform's first tweet, most comprehensive.
Can I get free access to twitterapi.io as a student or researcher?
Signup includes initial trial credits which cover pilot studies + method development. Sustained research corpora past the trial-credit budget 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 Enterprise /2/tweets/search/all provide full-archive; X's basic-tier recent-search does not.
Continue
- twitterapi.io — pricing
- X API — pricing (docs.x.com, 2026 verified)
- X — full-archive search (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
Stop reading. Start building.
Starter credits cover real testing on real data. Google sign-in, no card, no application queue.
Get an API key