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
Legacy variables are still bridged transparently:
JUST_SCRAPE_API_URL → SGAI_API_URL, JUST_SCRAPE_TIMEOUT_S / SGAI_TIMEOUT_S → SGAI_TIMEOUT, JUST_SCRAPE_DEBUG → SGAI_DEBUG.
Verify your setup
Check your credit balance to confirm the key is valid:Your first scrape
See the full CLI reference for all commands and options.