Documentation Index
Fetch the complete documentation index at: https://docs.scrapebadger.com/llms.txt
Use this file to discover all available pages before exploring further.
ScrapeBadger CLI
A command-line tool for accessing ScrapeBadger APIs directly from your terminal. Supports multiple output formats, pipe-friendly design, and field selection.
Install
pip install scrapebadger-cli
Quick Start
# Set up your API key
scrapebadger auth --api-key sb_live_...
# Get a Twitter user profile
scrapebadger twitter user elonmusk
# Search tweets as a table
scrapebadger twitter search "AI agents" --output table
# Google web search
scrapebadger google search "python 3.13" --gl us --num 20
# Google shopping + per-product merchant URL enrichment
scrapebadger google shopping "laptop" --max-price 2000
scrapebadger google shopping-click "Lenovo IdeaPad 5" --source "Walmart"
# Search Vinted in Germany
scrapebadger vinted search "nike shoes" --market de
# Scrape a URL with JS rendering
scrapebadger web scrape https://example.com --js
# Check your credits
scrapebadger credits
Authentication
The CLI resolves your API key in this order:
SCRAPEBADGER_API_KEY environment variable
.env file in the current directory
~/.config/scrapebadger/config.json (saved via scrapebadger auth)
Every command supports --output (-o) to choose the format:
| Format | Flag | Best For |
|---|
| JSON | -o json (default) | Piping to jq, programmatic use |
| CSV | -o csv | Spreadsheets, data analysis |
| Table | -o table | Human-readable terminal output |
| Markdown | -o markdown | Documentation, reports |
Field Selection
Use --fields (-f) to include only specific columns:
scrapebadger twitter trends -o csv -f name,domain_context
Commands
| Group | Commands |
|---|
| Account | auth, credits, logout |
| Twitter | user, tweets, tweet, search, followers, following, mentions, trends, replies, quotes, retweeters, community, list, space + more |
| Google | search, maps-search, maps-place, maps-reviews, maps-photos, maps-posts, news, news-topics, news-trending, hotels, hotels-details, trends, trends-regions, trends-related, trends-trending, jobs, shopping, shopping-product, shopping-click, patents, patent, scholar, autocomplete, images, videos, finance, ai-mode, lens, product-detail (29 commands covering 16 Google products) |
| Vinted | search, item, user, user-items, brands, markets |
| Web | scrape, detect, screenshot, extract, batch, batch-status |
Pipeline Examples
# Export trending topics to CSV
scrapebadger twitter trends -o csv > trends.csv
# Get followers and pipe to jq
scrapebadger twitter followers elonmusk | jq '.[].username'
# Scrape a page and extract text
scrapebadger web scrape https://example.com --format markdown
Environment Variables
| Variable | Description |
|---|
SCRAPEBADGER_API_KEY | Your API key |
SCRAPEBADGER_API_URL | Override the API base URL (default: https://scrapebadger.com) |