COMMAND-LINE INTERFACE

Command-Line Interface for This Web Scraper API

Twitter, Google, Vinted, and web scraping straight from your terminal. Pipe-friendly, with JSON, CSV, table, and Markdown output.

pip install scrapebadger-cli uv tool install scrapebadger-cli uvx --from scrapebadger-cli scrapebadger --help
The package is scrapebadger-cli, but the installed command is scrapebadger. With uvx, always pass --from scrapebadger-cli, plain uvx scrapebadger-cli fails because no executable matches the package name.
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

# 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

Output Formats

FormatFlagBest For
JSON-o json (default)Piping to jq, programmatic use
CSV-o csvSpreadsheets, data analysis
Table-o tableHuman-readable terminal output
Markdown-o markdownDocumentation, reports

Command Groups

GroupCommands
Accountauth, credits, logout
Twitteruser, tweets, tweet, search, followers, following, mentions, trends, replies, quotes, retweeters, community, list, space + more
Google29 commands covering 16 Google products, search, maps-search, news, trends, jobs, shopping, patents, scholar, images, videos, finance, ai-mode, lens + more
Vintedsearch, item, user, user-items, brands, markets
Webscrape, detect, screenshot, extract, batch, batch-status

CLI Questions

How does authentication work?+

The CLI resolves your API key in this order: the SCRAPEBADGER_API_KEY environment variable, a .env file in the current directory, or a saved config at ~/.config/scrapebadger/config.json (set via scrapebadger auth).

Can I select specific fields in the output?+

Yes, use --fields (or -f) to include only specific columns, e.g. scrapebadger twitter trends -o csv -f name,domain_context.

Is the CLI good for pipelines?+

Yes, it's designed to be pipe-friendly. Export trending topics with scrapebadger twitter trends -o csv > trends.csv, or pipe directly into jq for JSON processing.

Can I point it at a different API URL?+

Yes, set the SCRAPEBADGER_API_URL environment variable to override the default base URL.

Start From the Terminal

1,000 free credits, no credit card required.