twscrape

Extract tweets, user profiles, followers, and trends from Twitter/X via Python.

1|Updated Dec 20, 2025
One-click install
npx skills add https://github.com/anliang0306/VIBE-CODING-CN --skill twscrape-anliang0306
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twscrape
Source: https://github.com/anliang0306/VIBE-CODING-CN/tree/main/i18n/en/skills/twscrape
Command: npx skills add https://github.com/anliang0306/VIBE-CODING-CN --skill twscrape-anliang0306

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Twscrape provides a Python library to scrape Twitter/X data using GraphQL with account rotation and session management, enabling scalable data collection beyond official API limits.

Core Features & Use Cases

  • Async, rotation-enabled scraping of tweets, user profiles, followers, and trends
  • GraphQL-based data access with robust session management and rate-limit handling
  • Use cases: build social analytics dashboards, research datasets, or monitoring pipelines from Twitter/X without relying solely on official APIs.

Quick Start

Install the library via pip, configure multiple accounts, and begin querying with API methods such as search, user_tweets, and followers.

Frequently Asked Questions about twscrape

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

FAQPage Schema
How do I scrape Twitter data without hitting official API limits?

To scrape Twitter data without API limits, use a Python library that applies account rotation and GraphQL-based access. This approach manages sessions across multiple accounts to enable scalable data collection.

What is account rotation for Twitter scraping and how does it work?

Account rotation for Twitter scraping distributes data extraction requests across multiple user accounts. It works by managing sessions and handling rate limits automatically, allowing continuous access to tweets and profiles.

Can I use Python to extract tweets and followers asynchronously?

Yes, you can use Python to extract tweets and followers asynchronously. The twscrape library provides async methods to query user profiles, followers, and trends efficiently while managing multiple sessions.

Do I need multiple Twitter accounts to collect tweets with Python?

Yes, you need multiple Twitter accounts to collect tweets with Python effectively. Configuring multiple accounts enables the account rotation mechanism, which handles rate limiting and ensures scalable data extraction.

What's the best way to build a Twitter data analytics pipeline in Python?

The best way to build a Twitter analytics pipeline in Python is using an async scraping library with account rotation. It extracts tweets and trends via GraphQL, providing raw datasets for research dashboards without API reliance.

What are the limitations of using account rotation for Twitter scraping?

Limitations of account rotation for Twitter scraping include the need to manage multiple account credentials and potential session blocks. It requires Python 3.7+ and does not eliminate all rate-limit constraints inherent to the platform.