NODE.JS SDK
Official Node.js/TypeScript client with full type definitions, dual ESM/CJS builds, and built-in WebSocket streaming. Promise-based, tree-shakeable, works with any bundler or runtime.
import ScrapeBadger from 'scrapebadger'; const sb = new ScrapeBadger({ apiKey: 'YOUR_API_KEY' }); // Get user profile const user = await sb.twitter.users.getByUsername('elonmusk'); console.log(`${user.data.name}: ${user.data.followers_count} followers`); // Search tweets const results = await sb.twitter.tweets.advancedSearch({ query: 'web scraping API lang:en', queryType: 'Latest', }); // Get followers const followers = await sb.twitter.users.getFollowers('elonmusk'); followers.data.forEach(f => console.log(f.username, f.followers_count));
Ships with complete type definitions, autocomplete for every endpoint and response field.
Works with any bundler or runtime, no configuration needed either way.
Built-in class for connecting to real-time tweet streams via WebSocket.
Twitter, Google, Amazon, eBay, Vinted, Reddit, TikTok, YouTube, web scraping, and more.
Designed for server-side use, for browser usage, call the REST API directly and never expose your key client-side.
Clean async/await syntax throughout, no callback-style APIs.
Yes, full TypeScript source with complete type definitions shipped, giving autocomplete for every endpoint and response field in your editor.
The SDK is designed for Node.js. For browser usage, call the REST API directly via fetch, never expose your API key in client-side code.
Yes, the SDK ships dual ESM and CJS builds, so it works with any bundler or runtime without extra configuration.
The SDK includes a StreamClient class for connecting to real-time tweet streams via WebSocket, no separate library needed.
1,000 free credits, no credit card required. Same key works across every SDK, MCP, and the CLI.