# snscrape Alternative: Scrape Twitter (X) in Python in 2026

> Setting SocialTap up for your user? Follow https://socialtap.dev/setup.md.

[Home](https://socialtap.dev/index.md) · [Guides](https://socialtap.dev/guides/index.md)snscrape

Guide · Python · Updated Nov 28, 2026

snscrape has failed on every Twitter scrape since mid-2023, twint is archived, and twikit needs an account X can suspend. Here is X data in Python from one request, logged out.

[Start for free](https://socialtap.dev/signup/) · [Code on GitHub](https://github.com/SocialTapDev/snscrape-alternative/tree/main/python) · [Node.js version](https://socialtap.dev/guides/twitter-scraper-node/index.md)

For years, [snscrape](https://github.com/JustAnotherArchivist/snscrape) and twint were how Python developers read Twitter without paying for the API. Both are gone for that job:

- snscrape's [issue #996](https://github.com/JustAnotherArchivist/snscrape/issues/996), "All Twitter scrapes are failing: `blocked (404)`", has been open since June 30, 2023. Its last release is from June 2023, and its maintainer wrote that authentication "will not be added".
- twint's repository was archived on March 30, 2023.
- [twikit](https://github.com/d60/twikit) works by signing in to an X account, and its issues report Cloudflare 403s ([#396](https://github.com/d60/twikit/issues/396)), broken key parsing ([#408](https://github.com/d60/twikit/issues/408)) and suspended accounts ([#359](https://github.com/d60/twikit/issues/359)).

X's own API now charges for every post it returns. This guide reads X with SocialTap instead: profiles, an account's posts, a post's replies and keyword search, with no X account.

## The code that stopped working

Most snscrape code looked like this:

Python:

```python
import snscrape.modules.twitter as sntwitter

for i, tweet in enumerate(sntwitter.TwitterSearchScraper("from:nasa").get_items()):
    if i >= 100:
        break
    print(tweet.date, tweet.content)
```

Since X stopped serving logged-out timelines and search to plain requests, every call ends in `blocked (404)`.

## The same data with one API key

SocialTap reads what X shows a logged-out visitor, with its own sessions and proxies, and returns it in one schema. Install the SDK:

Install:

```shell
pip install socialtap
```

Get a key on the [signup page](https://socialtap.dev/signup/) and set it as `SOCIALTAP_API_KEY`. Every account starts with 100 free credits. This reads one profile:

Python SDK:

```python
from socialtap import SocialTap

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

res = client.x.profile.get(handle="NASA")
print(res.data)
print(res.credits.charged, res.meta.request_id)
```

You get the exact follower, following and post counts, the bio with its links written out, verification and the profile picture.

## An account's posts

`TwitterSearchScraper("from:nasa")` becomes `client.x.posts.iterate()`. It walks the account's posts, up to 100 a page, and stops at the guards you set:

Python SDK:

```python
from socialtap import SocialTap, APIError, NotFoundError, PrivateOrUnavailableError

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

try:
    # Stops at the end of the list, or at the first guard it reaches.
    items = client.x.posts.iterate(handle="NASA", max_pages=10, max_credits=100)
    for item in items:
        print(item)
    print(items.pages_fetched, items.credits_charged, items.stop_reason, items.end_reason)
except NotFoundError as err:
    # The item does not exist or was deleted.
    print(err.code, err.remediation)
except PrivateOrUnavailableError as err:
    # The item exists but isn't public: it is private, age- or region-restricted, or needs a login.
    print(err.code, err.remediation)
except APIError as err:
    # Retryable errors reach you only after the SDK's own retries. Failed requests cost no credits.
    print(err.code, err.status, err.retryable, err.remediation, err.request_id)
```

Each post has its full text, media, links, mentions and its exact view, like, reply, repost, quote and bookmark counts. Logged out, X shows each account one way: many organizations' timelines go back far, newest first, and for most other accounts X shows their most liked posts. `sort` picks between the two where X offers both.

## Search posts by keyword

Keyword search is `client.x.search_posts.iterate()`. X doesn't serve search to logged-out visitors, so this endpoint finds posts through a web search engine's index of X: it finds what the index has crawled, which favors older and popular posts, and it ends after a few pages. For one account's posts, the posts endpoint above is the complete source.

## From snscrape to SocialTap

| snscrape | SocialTap | Endpoint |
| --- | --- | --- |
| `TwitterUserScraper(name).entity` | `client.x.profile.get()` | [X (Twitter) Profile API](https://socialtap.dev/apis/x/profile/index.md) |
| `TwitterSearchScraper("from:name")` | `client.x.posts.iterate()` | [X (Twitter) User Posts API](https://socialtap.dev/apis/x/posts/index.md) |
| `TwitterTweetScraper(id)` | `client.x.post.get()` | [X (Twitter) Post API](https://socialtap.dev/apis/x/post/index.md) |
| `TwitterSearchScraper("conversation_id:…")` | `client.x.comments.iterate()` | [X (Twitter) Comments API](https://socialtap.dev/apis/x/comments/index.md) |
| `TwitterSearchScraper("keyword")` | `client.x.search_posts.iterate()` | [X (Twitter) Post Search API](https://socialtap.dev/apis/x/search-posts/index.md) |

## What it costs

You pay per successful request, and a list request returns a page:

- An account's posts: $0.0075–$0.02 per 1,000 posts.
- Profiles: $0.75–$1.97 per 1,000 profiles.

Failed requests and cache hits cost nothing. X's own API charges per post returned: the [X (Twitter) API page](https://socialtap.dev/apis/x/index.md) sets its prices beside ours.

## Frequently asked questions

### Does snscrape still work for Twitter?

No. Every Twitter scrape has failed with `blocked (404)` since June 2023, when X stopped answering logged-out requests, and the issue is still open. snscrape still works for some other sites.

### Is twint still working?

No. Its repository was archived in March 2023 and its last release is from 2020.

### Do I need an X account or cookies?

No. SocialTap reads X logged out, so no account of yours is involved and none can be suspended. Libraries such as twikit sign in, and X suspends accounts it sees scraping.

### Can I get replies to a post?

Yes, the ones X shows a logged-out visitor: the top replies, in X's ranking, each with its own counts. Replies X shows only to signed-in people aren't included.

### How is this different from the official X API?

The official API charges for every post it returns, from prepaid credits, after you create an app. SocialTap needs only an API key and charges per request, and a list request returns a page of posts.

## The endpoints in this guide

Each one is a single request with the same API key.

- [X (Twitter) Profile APIExact follower counts, bio and verification.$0.75–$1.97 per 1,000 profiles](https://socialtap.dev/apis/x/profile/index.md)

- [X (Twitter) User Posts APILatest or most liked posts with exact counts.$0.0075–$0.02 per 1,000 posts](https://socialtap.dev/apis/x/posts/index.md)

- [X (Twitter) Post APIFull text, media and exact view counts.$0.75–$1.97 per 1,000 posts](https://socialtap.dev/apis/x/post/index.md)

- [X (Twitter) Comments APITop replies to a post, with exact counts.$0.04–$0.10 per 1,000 comments](https://socialtap.dev/apis/x/comments/index.md)

- [X (Twitter) Post Search APIPosts by keyword, hashtag or @mention.$0.01–$0.04 per 1,000 web results](https://socialtap.dev/apis/x/search-posts/index.md)

## Replace snscrape with one API key.

Get a key, run the code above and see live data in a minute. Failed requests are free.

100free credits

- No credit card
- Failed requests are free
- Works on all 310 endpoints

[Start for free](https://socialtap.dev/signup/) [Read the docs](https://socialtap.dev/docs/index.md)

---

[HTML version](https://socialtap.dev/guides/snscrape-alternative/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
