Skip to main content
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

Package: just-scrape on npm | GitHub

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:
  1. Environment variableexport SGAI_API_KEY="sgai-..."
  2. .env fileSGAI_API_KEY=sgai-... in the project root
  3. Config file~/.scrapegraphai/config.json
  4. Interactive prompt — the CLI will ask and save it automatically
The easiest approach for a new machine is to just run any command — the CLI will prompt you for the key and save it to ~/.scrapegraphai/config.json so you never need to set it again.

Environment variables

Legacy variables are still bridged transparently: JUST_SCRAPE_API_URLSGAI_API_URL, JUST_SCRAPE_TIMEOUT_S / SGAI_TIMEOUT_SSGAI_TIMEOUT, JUST_SCRAPE_DEBUGSGAI_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.