PYTHON SDK
Async-first, fully type-hinted client with automatic pagination, smart rate-limit handling, and built-in retries. Handwritten on top of the generated core, not just an auto-generated wrapper.
import asyncio from scrapebadger import ScrapeBadger async def main(): async with ScrapeBadger(api_key="your-api-key") as client: user = await client.twitter.users.get_by_username("elonmusk") print(f"{user.name} has {user.followers_count:,} followers") async for tweet in client.twitter.tweets.search_all( "python programming", max_items=100 ): print(f"@{tweet.username}: {tweet.text[:80]}...") asyncio.run(main())
Built on httpx & asyncio for high-performance concurrent scraping.
Pydantic models for every response, IDE autocomplete on the full API surface.
Async iterators like search_all() handle large datasets without manual cursor management.
Automatic exponential backoff on transient errors, with console warnings on each retry.
Twitter, Google, Amazon, eBay, Vinted, Reddit, TikTok, YouTube, web scraping, and more.
Real-time streaming with auto-reconnect, plus webhook signature verification.
Pass your API key directly, ScrapeBadger(api_key="sb_live_..."), or set the SCRAPEBADGER_API_KEY environment variable and omit the argument.
The SDK is async-first, built on asyncio and httpx. For synchronous use, wrap calls with asyncio.run() as shown in the quick start.
Methods like search_all() return async iterators that page automatically, pass max_items to cap how many results you pull without manually tracking cursors.
Open source under the ScrapeBadger GitHub organization, generated from the same OpenAPI spec as every other language SDK, with Python and Node.js additionally shipping as handwritten, backward-compatible clients.
1,000 free credits, no credit card required. Same key works across every SDK, MCP, and the CLI.