# vladkens/twscrape

Python library and CLI for X/Twitter scraping with multi-account rotation and built-in rate-limit handling.

Repository: https://github.com/vladkens/twscrape
Canonical: https://ross.abutalabs.com/products/twscrape
Homepage: https://pypi.org/project/twscrape/
Language: Python
License: MIT
License Family: permissive
Topics: twitter, scraper, twitter-api, twitter-bot, twitter-scraper, x-api, data-collection, data-mining, scraping, social-media-automation, social-network-analysis, tweets, twitter-automation, twitter-client, twitter-crawler, twitter-data, twitter-scraping, web-scraping, x-scraper, x-twitter
Last push: 2026-08-25T16:20:30+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 86
- inputs: {"age_days": 1216, "days_push": 8, "days_rel": 8, "gap_med": 24.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2708, forks 314 (observed 2026-08-28T04:07:11.680364+00:00)

## What it is
twscrape is an async Python library and CLI for scraping X/Twitter via its Search and GraphQL endpoints using a pool of your own accounts. It stores sessions in SQLite, rotates accounts when rate-limited, and returns parsed SNScrape-style models or raw API responses.

## Use cases
- scrape tweets matching a search query from X/Twitter
- fetch user profiles and followers from Twitter without the official API
- rotate multiple Twitter accounts to bypass rate limits
- collect Twitter data for social network analysis
- run concurrent async Twitter scraping jobs
- export tweets from accounts using browser cookies

## When to choose
- you need programmatic access to X/Twitter data without paying for the official API
- you have multiple accounts and want automatic rate-limit-aware rotation
- you want both a Python API and a ready-made CLI
- you need SNScrape-compatible parsed models or raw GraphQL responses

## When to avoid
- you have no X/Twitter accounts or cookies to supply, since the tool requires authorized accounts
- you need a fully compliant, ToS-safe official API integration
- you want scraping of platforms other than X/Twitter
- you cannot accept the risk of account suspension from scraping

## Facets
- artifact type: library
- maturity: active
- function: web-scraping, http-client, cli
- domain: social-media, crawlers, developer-tools
- platform: python, cli, cross-platform
- tags: twitter, x-api, account-rotation, rate-limit-handling, snscrape, async, graphql, sqlite-sessions, data-engineering

## Member repositories
- vladkens/twscrape (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:11.680364+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:15:41.430033+00:00, confidence not recorded.
  - readme: https://github.com/vladkens/twscrape (fetched 2026-08-28T04:07:11.680364+00:00, sha 2cb6a1e3fd48)
  - homepage: https://pypi.org/project/twscrape/ (fetched 2026-08-29T09:58:48.949106+00:00, sha 4b4e8fead74a)
  - registry_pypi: https://pypi.org/pypi/twscrape/json (fetched 2026-08-29T09:58:49.008793+00:00, sha 0c9d41af2004)
- Data as of 2026-08-30T08:39:29.467469+00:00.
