Voltar ao ranking

Altimis/Scweet

Pythonapify.com/altimis/scweet

Scrape tweets, profiles, followers and following from Twitter/X, no API key needed. Python library with smart multi-account pooling, proxy support and async.

scrapertwittertweetspythontwitter-scraperscrape-tweetsapifydata-collectionproxypython-librarytwitter-datatwitter-search
Crescimento de estrelas
Estrelas
1.6k
Forks
276
Crescimento semanal
Issues
1
5001k1.5k
dez. de 2020out. de 2022set. de 2024jul. de 2026
ArtefatosPyPIpip install scweet
README

Scweet

Scrape Twitter / X without the official API.
Hosted on Apify with no cookies or proxies, or run locally with Python and CLI.

Run on Apify Python Quickstart CLI Quickstart Documentation

Tests PyPI Version PyPI Downloads License Scweet Actor Status


Scrape tweets, profile timelines, followers and more from Twitter/X. Use the hosted Apify Actor when you do not want to manage cookies or proxies, or run locally with your own browser cookies and account pool.


What you can scrape:


Hosted alternative — no setup needed

Use the hosted Apify Actor when you want Scweet results without running the local Python library or managing Twitter/X cookies, proxies, local accounts, rate limits, retries, or infrastructure.

This runs on Apify instead of your machine. Use the local library below when you want full Python/CLI control.

Run Scweet on Apify

  • No code required: configure and run from the Apify Console
  • Prefer code? Use the Actor through Apify's Python API guide
  • No Twitter/X cookies or proxies to provide
  • Search tweets and profile timelines
  • Export results as JSON, CSV, or XLSX from the Apify dataset
  • Free tier included; current usage pricing is shown on the Apify Actor page

Python Quickstart

Use local Scweet when you want full control from Python or the CLI, with your own browser cookies, accounts, proxies, SQLite state, resume behavior, and output files.

1. Install

pip install -U Scweet

2. Get your auth_token

Log into x.com → DevTools F12ApplicationCookieshttps://x.com → copy the auth_token value.

Scweet auto-bootstraps the ct0 CSRF token from auth_token alone — or use the cookies.json format for multiple accounts at once.

3. Scrape

from Scweet import Scweet

# Credentials are stored in scweet_state.db automatically on first run
s = Scweet(auth_token="YOUR_AUTH_TOKEN", proxy="http://user:pass@host:port")

# Search tweets — save to CSV (save_format="json" or "both" also works)
tweets = s.search("bitcoin", since="2025-01-01", limit=500, save=True)

# Reuse provisioned accounts on subsequent runs — no credentials needed
s = Scweet(db_path="scweet_state.db")
tweets = s.search("ethereum", limit=500, save=True)

Always set limit — without it, scraping continues until your account's daily cap is hit.

All methods have async variants: asearch(), aget_profile_tweets(), aget_followers(), etc.


Common tasks

Search tweets

tweets = s.search(
    "AI agents",
    since="2026-01-01",
    from_users=["elonmusk"],
    min_likes=50,
    limit=200,
    save=True,
)

Profile timeline

tweets = s.get_profile_tweets(["elonmusk"], limit=200)

Followers / Following

followers = s.get_followers(["elonmusk"], limit=1000)
following = s.get_following(["elonmusk"], limit=1000)

User profiles

profiles = s.get_user_info(["githubstatus", "elonmusk"])

For the full list of supported search operators, see twitter-advanced-search.


CLI

# Search with proxy, save to CSV
scweet --auth-token YOUR_AUTH_TOKEN --proxy http://user:pass@host:port \
  search "bitcoin" --since 2025-01-01 --limit 500 --save

# Followers, saved as JSON
scweet --auth-token YOUR_AUTH_TOKEN \
  followers elonmusk --limit 1000 --save --save-format json

For multi-account runs, use --cookies-file cookies.json.


Multiple accounts & proxies

For higher throughput and reduced ban risk, use multiple dedicated accounts with per-account proxies.

Running Scweet locally at any real volume usually means dedicated accounts and proxies. You can use a single proxy, a rotating proxy, or assign one per account.

Need proxies for local Scweet?

Webshare is a practical option for dedicated or rotating proxies.

Get proxies on Webshare

Disclosure: this is an affiliate link.

cookies.json format:

[
  { "username": "acct1", "cookies": { "auth_token": "..." }, "proxy": "http://user1:pass1@host1:port1" },
  { "username": "acct2", "cookies": { "auth_token": "..." }, "proxy": "http://user2:pass2@host2:port2" }
]
s = Scweet(cookies_file="cookies.json")  # proxies are read from the file, one per account

Never use your personal Twitter/X account for scraping. Use dedicated accounts only.


Why Scweet?

twint snscrape twscrape Scweet
Works in 2026 ❌ unmaintained ❌ broken
Cookie / token auth
Multi-account pooling
Proxy support
Resume interrupted scrapes
Built-in CSV / JSON output
Sync + async API Async only ✅ both
Hosted, no-setup option ✅ Apify
Active maintenance ⚠️

twint has been unmaintained since 2023. snscrape broke after X's backend changes. twscrape is the closest active alternative — worth knowing, but async-only, no built-in file output, and no resume support.


Limitations

  • Only publicly visible content is accessible — private/protected accounts are not supported
  • Relies on undocumented X web endpoints; breakage is always possible after platform changes. Scweet can self-heal by scraping fresh query IDs and feature flags from X's main.js bundle at startup — pass manifest_scrape_on_init=True to enable:
    s = Scweet(auth_token="...", manifest_scrape_on_init=True)
    
  • Cookies can expire and may need periodic refreshing
  • A single account typically handles hundreds to a few thousand tweets per day before hitting rate limits; multi-account pooling scales proportionally
  • Proxies and dedicated accounts are strongly recommended for anything beyond light testing
  • Username/password login is not supported. X's anti-automation defenses make programmatic login unreliable and likely to trigger account locks. Scweet authenticates with browser cookies (auth_token) extracted from an active session instead

Documentation

Full API reference, config options, structured search filters, async patterns, resume, proxies, and troubleshooting:

For advanced Twitter search operators, see twitter-advanced-search.


FAQ

Does it work without an official Twitter API key? Yes. Scweet calls X's internal GraphQL API — the same one the web app uses. No developer account or API key required.

Is it a replacement for twint or snscrape? Yes. Both are broken as of 2024–2025. Scweet uses a different, currently-working approach: cookies + GraphQL instead of legacy unauthenticated endpoints.

How many tweets can I scrape? A single account typically handles hundreds to a few thousand tweets per day before hitting rate limits. Multi-account pooling scales this proportionally. The hosted Apify actor manages accounts and rate limits automatically.

Will my account get banned? Never use your personal account — use dedicated accounts only. To reduce risk further: use multiple accounts (distributes load) and pair each with a proxy (prevents all requests from one IP).

Does it work for private accounts? No. Only publicly visible content is accessible.

Does it still work in 2025 / 2026? Yes — last verified working in March 2026 against X's current GraphQL API.


Community

Have a question or want to share what you built with Scweet? Open a thread in GitHub Discussions.

Found it useful? Star the repo


Contributing

Bug reports, feature suggestions, and PRs are welcome. See CONTRIBUTING.md.


MIT License

Repositórios relacionados
firecrawl/firecrawl

The API to search, scrape, and interact with the web at scale. 🔥

TypeScriptnpmGNU Affero General Public License v3.0aicrawler
firecrawl.dev
154.1k8.8k
huginn/huginn

Create agents that monitor and act on your behalf. Your agents are standing by!

RubyRubyGemsMIT Licenseautomationnotifications
49.7k4.3k
NaiboWang/EasySpider

A visual no-code/code-free web crawler/spider易采集:一个可视化浏览器自动化测试/数据采集/网页爬虫软件,可以无代码图形化的设计和执行爬虫任务。别名:ServiceWrapper面向Web应用的智能化服务封装系统。

JavaScriptnpmGNU Affero General Public License v3.0code-freecrawler
easyspider.net
44.3k5.4k
iawia002/lux

👾 Fast and simple video download library and CLI tool written in Go

GoGo ModulesMIT Licensedownloadergo
31.6k3.3k
cheeriojs/cheerio

The fast, flexible, and elegant library for parsing and manipulating HTML and XML.

TypeScriptnpmMIT Licensecheeriojquery
cheerio.js.org
30.4k1.7k
feder-cr/Jobs_Applier_AI_Agent_AIHawk

AIHawk aims to easy job hunt process by automating the job application process. Utilizing artificial intelligence, it enables users to apply for multiple jobs in a tailored way.

PythonPyPIGNU Affero General Public License v3.0automationbot
30k4.6k
mendableai/firecrawl

🔥 Turn entire websites into LLM-ready markdown or structured data. Scrape, crawl and extract with a single API.

TypeScriptnpmGNU Affero General Public License v3.0aicrawler
firecrawl.dev
29.5k2.5k
gocolly/colly

Elegant Scraper and Crawler Framework for Golang

GoGo ModulesApache License 2.0golangscraper
go-colly.org
25.4k1.9k
apify/crawlee

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

TypeScriptnpmApache License 2.0web-scrapingweb-crawling
crawlee.dev
24.8k1.6k
feder-cr/Jobs_Applier_AI_Agent

Auto_Jobs_Applier_AI_Agent aims to easy job hunt process by automating the job application process. Utilizing artificial intelligence, it enables users to apply for multiple jobs in an automated and personalized way.

PythonPyPIautomationbot
24.5k3.6k
Evil0ctal/Douyin_TikTok_Download_API

🚀「Douyin_TikTok_Download_API」是一个开箱即用的高性能异步抖音、快手、TikTok、Bilibili数据爬取工具,支持API调用,在线批量解析及下载。

PythonPyPIApache License 2.0pythonpywebio
douyin.wtf
18.9k2.7k
getmaxun/maxun

🔥 The open-source no-code platform for web scraping, crawling, search and AI data extraction • Turn websites into structured APIs in minutes 🔥

TypeScriptnpmGNU Affero General Public License v3.0automationno-code
maxun.dev
16.7k1.4k