just-scrape is the official command-line interface for ScrapeGraphAI. It gives you AI-powered web scraping, data extraction, search, and crawling directly from your terminal.
Installation
Setting up your API key
The CLI needs a ScrapeGraphAI API key. Get one from the dashboard. The CLI checks for it in this order:- Environment variable —
export SGAI_API_KEY="sgai-..." .envfile —SGAI_API_KEY=sgai-...in the project root- Config file —
~/.scrapegraphai/config.json - Interactive prompt — the CLI will ask and save it automatically
~/.scrapegraphai/config.json so you never need to set it again.
Environment variables
| Variable | Description | Default |
|---|---|---|
SGAI_API_KEY | ScrapeGraphAI API key | — |
JUST_SCRAPE_API_URL | Override the API base URL | https://api.scrapegraphai.com/v1 |
JUST_SCRAPE_TIMEOUT_S | Request/polling timeout in seconds | 120 |
JUST_SCRAPE_DEBUG | Set to 1 to enable debug logging to stderr | 0 |
Verify your setup
Run a quick health check to confirm the key is valid:Your first scrape
See the full CLI reference for all commands and options.