jq, redirect it to a file, or call it from any language via subprocess. Source: github.com/HasData/hasdata-cli.
Install
Authentication
Get your API key from the dashboard, then save it once:~/.hasdata/config.yaml.
Resolution order, highest precedence first:
--api-key <key>flagHASDATA_API_KEYenvironment variable~/.hasdata/config.yaml
Usage
outputFormat → --output-format, priceMin → --price-min. Object/array params take a --<flag>-json variant that accepts a JSON string, file path, or stdin.
Examples
Google SERP
Web Scraping with AI extraction
Zillow listing search
Output and exit codes
Output auto-formats as pretty JSON when stdout is a TTY and as raw JSON when piped. Force either with--pretty / --raw. Exit codes: 0 success, 1 user error, 2 network, 3 API 4xx, 4 API 5xx.
Common flags
| Flag | Purpose |
|---|---|
--api-key | Override the configured API key |
--pretty / --raw | Force output formatting |
--output FILE | Write the response to a file |
--verbose | Print request URL and rate-limit headers to stderr |
--timeout, --retries | Per-request controls |
--help | Per-command schema and examples |
Supported commands
The CLI ships a subcommand for every API documented under Web Scraping API, Google SERP API, Google AI Mode API, Google Maps API, and Scraper APIs. Runhasdata --help for the full list, or hasdata <command> --help for parameter schemas.