Skip to main content
just-scrape is the official CLI for ScrapeGraph AI — AI-powered web scraping, data extraction, search, and crawling, straight from your terminal.
Get your API key from the dashboard

Installation

npm install -g just-scrape
Package: just-scrape on npm | GitHub

Configuration

The CLI needs a ScrapeGraph API key. Four ways to provide it (checked in order):
  1. Environment variable: export SGAI_API_KEY="sgai-..."
  2. .env file: SGAI_API_KEY=sgai-... in project root
  3. Config file: ~/.scrapegraphai/config.json
  4. Interactive prompt: the CLI asks and saves to config

Environment Variables

VariableDescriptionDefault
SGAI_API_KEYScrapeGraph API key
JUST_SCRAPE_API_URLOverride API base URLhttps://api.scrapegraphai.com/v1
JUST_SCRAPE_TIMEOUT_SRequest/polling timeout in seconds120
JUST_SCRAPE_DEBUGSet to 1 to enable debug logging0

Verify your setup

just-scrape validate   # check your API key
just-scrape credits    # check your credit balance

Quick start

just-scrape smart-scraper https://news.ycombinator.com \
  -p "Extract the top 5 story titles and their URLs"