twscrape

Scrape Twitter/X data with rotating accounts and session management.

22.7k|2.4k|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/2025Emma/vibe-coding-cn --skill twscrape
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twscrape
Source: https://github.com/2025Emma/vibe-coding-cn/tree/main/i18n/en/skills/twscrape
Command: npx skills add https://github.com/2025Emma/vibe-coding-cn --skill twscrape

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

twscrape enables Python-based scraping of Twitter/X data with account rotation and session management to bypass API limits.

Core Features & Use Cases

  • Multi-account rotation for scalable scraping
  • Async/parallel operations for large-scale data collection
  • SNScrape-compatible data models for easy downstream processing
  • CLI and Python API for flexible usage

Quick Start

Install twscrape, add accounts (cookies or credentials), and start simple searches or user/tweet lookups.

Frequently Asked Questions about twscrape

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scrape Twitter/X data when the API has rate limits?

Twitter/X scraping with rate limits is solved by rotating multiple authenticated accounts. twscrape automates account rotation and session management to distribute requests across accounts, bypassing individual rate limits and enabling continuous large-scale data collection.

Can I scrape Twitter/X tweets, profiles, and followers at scale?

Yes. twscrape supports large-scale scraping of tweets, profiles, followers, trends, and media using asynchronous and parallel operations. It handles both single lookups and bulk data collection with automatic account rotation and session persistence.

How do I set up Twitter/X scraping with account rotation in Python?

twscrape provides both Python API and CLI interfaces. Install the package, add accounts using cookies or credentials, configure per-account or global proxies, then use async Python functions or CLI commands to search tweets, fetch user data, or monitor trends with automatic rotation.

Does Twitter/X scraping work with GraphQL-based data access?

Yes. twscrape uses GraphQL-based data access to extract Twitter/X information. It implements SNScrape-compatible data models, ensuring output formats work seamlessly with downstream analytics tools and processing pipelines.

What are the limitations of scraping Twitter/X with account rotation?

Account rotation bypasses rate limits but requires maintaining multiple authenticated accounts with valid sessions. Session persistence and proxy management add operational overhead, and Twitter/X may detect coordinated scraping patterns despite rotation.