Command-line client for the ScrapingBee API: scrape pages (single or batch), crawl sites, check usage/credits, and use Google Search, Fast Search, Amazon, Walmart, YouTube, and ChatGPT from the terminal.
Project description
ScrapingBee CLI
Command-line client for the ScrapingBee API: scrape URLs (single or batch), crawl sites, check usage and credits, and use Google, Fast Search, Amazon, Walmart, YouTube, and ChatGPT from the terminal.
Requirements
- Python 3.10+
Installation
pip install scrapingbee-cli
# or (isolated): pipx install scrapingbee-cli
From source: clone the repo and run pip install -e . in the project root.
Configuration
You need a ScrapingBee API key:
scrapingbee auth– Save the key to config (use--api-key KEYfor non-interactive;--showto print config path).- Environment –
export SCRAPINGBEE_API_KEY=your_key .envfile – In the current directory or~/.config/scrapingbee-cli/.env
Remove the stored key with scrapingbee logout. Get your API key from the ScrapingBee dashboard.
Usage
scrapingbee [command] [arguments] [options]
scrapingbee --help– List all commands.scrapingbee [command] --help– Options and parameters for that command.
Global flags (must appear before the subcommand): --output-file, --verbose, --output-dir, --input-file, --concurrency, --retries, --backoff. For details, run scrapingbee --help or see the documentation.
Commands
| Command | Description |
|---|---|
usage |
Check credits and max concurrency |
auth / logout |
Save or remove API key |
docs |
Print docs URL; --open to open in browser |
scrape [url] |
Scrape a URL (HTML, JS, screenshot, extract) |
crawl |
Crawl with Scrapy or from URL(s) |
google / fast-search |
Search SERP APIs |
amazon-product / amazon-search |
Amazon product and search |
walmart-search / walmart-product |
Walmart search and product |
youtube-search / youtube-metadata |
YouTube search and video metadata |
chatgpt |
ChatGPT API |
Batch mode: Commands that take a single input support --input-file (one line per input) and --output-dir. Run scrapingbee usage before large batches.
Parameters and options: Use space-separated values (e.g. --render-js false), not --option=value. For full parameter lists, response formats, and credit costs, see scrapingbee [command] --help and the ScrapingBee API documentation.
Examples
scrapingbee usage
scrapingbee docs --open
scrapingbee --output-file page.html scrape "https://example.com"
scrapingbee --output-dir out --input-file urls.txt scrape
scrapingbee --output-file serp.json google "pizza new york"
More information
- ScrapingBee API documentation – Parameters, response formats, credit costs, and best practices.
- Claude / AI agents: This repo includes a Claude Skill and Claude Plugin for agent use with file-based output and security rules.
Testing
Pytest is configured in pyproject.toml ([tool.pytest.ini_options]). From the project root:
1. Install the package with dev dependencies
pip install -e ".[dev]"
2. Run tests
| Command | What runs |
|---|---|
pytest |
Full suite (integration tests require SCRAPINGBEE_API_KEY) |
pytest tests/unit |
Unit tests only (no API key needed) |
pytest -m "not integration" |
All except integration (no API key needed) |
pytest -v |
Same as above with verbose output (default in config) |
Integration tests call the live ScrapingBee API and are marked with @pytest.mark.integration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrapingbee_cli-1.0.1.tar.gz.
File metadata
- Download URL: scrapingbee_cli-1.0.1.tar.gz
- Upload date:
- Size: 34.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a721dd31d20fc3567d802252123daf2e524f164ebdf4ac03699ab0cbe33d163
|
|
| MD5 |
03951cd40971733ff7abd653d4e55a18
|
|
| BLAKE2b-256 |
aa7e7e62abe28727a0d813ca1d54699e6c0eab620ef1282a6713d521cfbdef4b
|
Provenance
The following attestation bundles were made for scrapingbee_cli-1.0.1.tar.gz:
Publisher:
publish.yml on ScrapingBee/scrapingbee-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scrapingbee_cli-1.0.1.tar.gz -
Subject digest:
3a721dd31d20fc3567d802252123daf2e524f164ebdf4ac03699ab0cbe33d163 - Sigstore transparency entry: 987459913
- Sigstore integration time:
-
Permalink:
ScrapingBee/scrapingbee-cli@3ad6a66798fd884e46b524accd8cee230b03f4e3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ScrapingBee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ad6a66798fd884e46b524accd8cee230b03f4e3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file scrapingbee_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: scrapingbee_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 45.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c401bc970d36c1dc5e85619dcce3fc7416124d32d1b894ab99ef55847b6df4d
|
|
| MD5 |
136eccb71ca4885425abdf746245adea
|
|
| BLAKE2b-256 |
2ce6a725b8b868ae4da99f5e05038572196f3757ddace88bc391ace1b46d610b
|
Provenance
The following attestation bundles were made for scrapingbee_cli-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on ScrapingBee/scrapingbee-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scrapingbee_cli-1.0.1-py3-none-any.whl -
Subject digest:
4c401bc970d36c1dc5e85619dcce3fc7416124d32d1b894ab99ef55847b6df4d - Sigstore transparency entry: 987459955
- Sigstore integration time:
-
Permalink:
ScrapingBee/scrapingbee-cli@3ad6a66798fd884e46b524accd8cee230b03f4e3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ScrapingBee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ad6a66798fd884e46b524accd8cee230b03f4e3 -
Trigger Event:
release
-
Statement type: