Unofficial Twitter (X) API: Access Without a Developer Account

- Three kinds: open-source libraries that log in as you (twikit, twscrape, Scweet), guest-access scrapers that X shut out in 2023 (snscrape, Nitter), and hosted APIs with their own key (TwitterAPI.io and others).
- Our GitHub check of 6 libraries: 3 are archived or were last pushed in 2024 or earlier. Across 3,071 issues, 5.2% mention suspended, locked or banned; for twscrape it is 11.8% and for twikit 7.6%.
- Cost for 10,000 posts plus 1,000 profiles: $1.68 on TwitterAPI.io, $60 on the official X pay-per-use rate card, $0 in fees for a library (plus the X accounts it logs in with and your upkeep).
- No developer account either way: a hosted key comes from a Google sign-in; the official API answers
401 Unauthorizeduntil you have an X developer app.
People search for an unofficial Twitter API for one of two reasons: the official X API wants a developer account, an app and a payment setup before the first request, or its pay-per-use price is too high for the volume they need. Both are fair reasons. The trouble is that "unofficial" covers very different things, from a weekend Python package that logs in with your personal account to a paid REST API with its own infrastructure.
This page sorts them into the three kinds that exist in 2026, shows what each one costs and what it puts at risk, and backs the comparison with a small study: we pulled the public GitHub state of six well-known unofficial libraries (stars, last push, archive flag and how many issues talk about suspended, locked or banned accounts). We also sent a request to the official API with no credentials and one to TwitterAPI.io with a key, and show both responses.
3 of 6 (Nitter archived; snscrape last push 2023; twitter-api-client 2024)
What counts as an unofficial Twitter API?
X's official route is its developer platform: you create a developer account and an app, get OAuth credentials, and pay per request under the pay-per-use model. We sent an unauthenticated request to https://api.x.com/2/users/by/username/XDevelopers and got HTTP 401 with the body {"title": "Unauthorized", "status": 401, "detail": "Unauthorized"}. Nothing is readable until the developer setup is done.
Everything else is unofficial, and it falls into three groups:
The official API is the only one of these that X itself runs. TwitterAPI.io is an independent service, not affiliated with X; it fits the third row.
Our check: 6 unofficial libraries on GitHub
To see how these libraries hold up, we read the public GitHub data of six well-known ones through the GitHub REST API: stars, last push, whether the repository is archived, the total number of issues, and how many issues mention "suspended", "locked" or "banned" (GitHub issue search, which matches the issue text).
Three findings stand out. First, half of the list is archived or has had no push since 2024: Nitter's repository is archived, snscrape has had no push since 2023, and twitter-api-client was last pushed in 2024. Second, the actively maintained ones are the ones that log in: twikit, twscrape and Scweet each describe signing in with X accounts, and the two largest of them have the highest share of issues about suspended, locked or banned accounts (11.8% for twscrape, 7.6% for twikit). Third, across all six repositories, 159 of 3,071 issues (5.2%) mention one of those words.
Read the percentages as a signal, not a ban rate. A keyword match also catches issues that are about something else, and people who never had a problem do not open issues. What the numbers do show is that account trouble is a recurring topic for logged-in libraries, which matches how they work: every request is made as one of your X accounts.
How we collected this: GitHub REST API (/repos/{owner}/{repo}) for the repository fields and GitHub issue search (repo:{owner}/{repo} is:issue (suspended OR locked OR banned), and is:issue for the total) for the counts, run in 2026. The script and the raw output are in data/studies/unofficial-twitter-api/ in our site repository.
What does each route cost?
Take a job that reads 10,000 posts and 1,000 user profiles in a month:
The TwitterAPI.io figures use our rates of $0.15 per 1,000 posts and $0.18 per 1,000 profiles, billed per result returned, with a 15-credit ($0.00015) minimum for a request that returns nothing. The official figures use the docs.x.com pay-per-use rate card: $0.005 per post read and $0.010 per user read. At these rates the official route costs about 33 times more per post.
The library row is not free in practice. It needs X accounts that you are willing to put at risk, and when x.com changes its internal endpoints the library stops working until a maintainer ships a fix; the open issue lists above show how often that happens.
One request with a hosted key
This is the whole setup for the hosted route: sign in with Google on twitterapi.io, copy the API key from the dashboard, and send it in the X-API-Key header. New accounts that pass the automatic bot check get up to $1 of free credits (up to 100,000 credits, no card, one per person or network, expiring after 31 days).
We sent GET https://api.twitterapi.io/twitter/user/info?userName=XDevelopers with a key. The response came back with "status": "success" and a data object; these are a few of its fields as returned:
The same key works for search (/twitter/tweet/advanced_search), timelines, followers and replies. The runnable example below reads a profile and one page of search results.
Which route should you use?
Use an open-source library for a personal experiment on a throwaway X account, when you accept that the account may be locked and that the code may break without notice. Pin the version and watch the repository's issues.
Use the official X API when you need X's own platform: posting from your app's identity under X's developer terms, enterprise agreements, or a requirement that the data come from X directly. Budget for the pay-per-use rates above.
Use a hosted API key when you need X data in production without putting your own X account behind every request, and you want per-result pricing. TwitterAPI.io is one such service; compare providers on price per 1,000 results, rate limits and which endpoints they cover.
Whether a particular use is allowed depends on X's terms and your jurisdiction. Our guide to scraping X without the official API covers that question in more detail.
import os
import requests
BASE = "https://api.twitterapi.io"
H = {"X-API-Key": os.environ["TWITTERAPI_IO_API_KEY"]} # from the twitterapi.io dashboard
# 1) One profile: 18 credits ($0.00018)
r = requests.get(f"{BASE}/twitter/user/info", headers=H, params={"userName": "XDevelopers"}, timeout=30)
r.raise_for_status()
u = r.json()["data"]
print(u["userName"], u["followers"], "followers")
# 2) One page of search results: 15 credits per post returned ($0.15 per 1,000)
r = requests.get(f"{BASE}/twitter/tweet/advanced_search", headers=H, timeout=30,
params={"query": "from:XDevelopers -is:retweet", "queryType": "Latest"})
r.raise_for_status()
body = r.json()
for t in body.get("tweets", [])[:5]:
print(t["createdAt"], t["likeCount"], t["text"][:80].replace("\n", " "))
print("next page:", body.get("has_next_page"), body.get("next_cursor", "")[:20])
Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.
Questions readers ask
Is there an unofficial Twitter API?
Yes, several kinds. Open-source libraries such as twikit and twscrape read X through the x.com web app's internal endpoints while logged in with your X accounts. Hosted APIs such as TwitterAPI.io give you an API key and a REST endpoint without using your X account. Older guest-access scrapers such as snscrape and Nitter no longer work for X since it began requiring a login to view posts in 2023.
Can I use the Twitter API without a developer account?
Not the official one: an unauthenticated request to the official API returns 401 Unauthorized until you have a developer account and app. A hosted API such as TwitterAPI.io needs only a Google sign-in and an API key, and new accounts that pass the automatic bot check get up to $1 of free credits (up to 100,000 credits, no card, one per person or network, expiring after 31 days).
Can my X account get suspended for using an unofficial library?
It can. Libraries such as twikit and twscrape send every request as an X account you log in with, so any enforcement applies to that account. In our check of six libraries, 11.8% of twscrape's GitHub issues and 7.6% of twikit's mention suspended, locked or banned. A hosted API key does not involve your X account.
Is snscrape still working?
Not for X. snscrape read X without logging in, which stopped working after X began requiring a login to view posts in 2023, and the repository has had no push since 2023. Nitter, the alternative front end, is archived on GitHub.
How much does an unofficial Twitter API cost?
Open-source libraries charge nothing but need X accounts and upkeep. TwitterAPI.io charges per result: $0.15 per 1,000 posts and $0.18 per 1,000 profiles. For comparison, the official X API's pay-per-use rate card lists $0.005 per post read and $0.010 per user read, so 10,000 posts plus 1,000 profiles is $1.68 on TwitterAPI.io and $60 on the official API.
Continue
- X API pay-per-use pricing ($0.005 per post read, $0.010 per user read)
- GitHub REST API: repositories
- GitHub REST API: issue search
- Twitter (X) API overview: every guide in one place
- Scrape Twitter (X) without the official API, with code
- Third-party Twitter API alternatives compared
- X API pricing in 2026, explained
- X Developer Portal: sign-up, apps and credits
- TwitterAPI.io pricing per 1,000 results
- 01Twitter (X) Account Suspended: Why It Happened and How to Get It Back
- 02How to DM on Twitter (X): send a message on web, iPhone and Android
- 03Twitter (X) API in Pydantic AI: A Typed Search Tool for Your Agent
- 04Twitter (X) API in Java: a typed client with HttpClient and Jackson
- 05Twitter (X) Verification in 2026: What the Blue, Gold and Grey Checkmarks Mean and How to Get One
- 06Claude Code --dangerously-skip-permissions: what it skips, what it still blocks, and a safer unattended setup
- 07Upload-Post Alternative for Twitter (X): Post, Read and Search From One API
- 08A Meltwater Alternative for Teams That Mainly Need X (Twitter) Mentions
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.