CLI Commands

Complete reference for all Anakin CLI commands

Last updated Mar 2, 2026

All available commands for the Anakin CLI.


login

Save your API key for future sessions.

anakin login --api-key "ak-your-key-here"
FlagDescription
--api-keyYour AnakinScraper API key

status

Check the CLI version and whether you're authenticated.

anakin status

scrape

Scrape a single URL. Returns clean markdown by default.

anakin scrape "https://example.com"
FlagTypeDescriptionDefault
--formatstringOutput format: markdown, json, or rawmarkdown
--browserflagUse headless browser for JS-heavy sitesoff
--countrystringTwo-letter country code for geo-located scrapingus
--session-idstringBrowser session ID for authenticated scraping
--timeoutnumberPolling timeout in seconds120
-o, --outputstringSave output to a file instead of stdoutstdout

Output formats

FormatWhat you getBest for
markdownClean readable page textReading, LLM context
jsonAI-extracted structured dataData pipelines
rawFull API response (HTML, metadata, everything)Debugging

Examples

# Default markdown output
anakin scrape "https://example.com"

# Save to file
anakin scrape "https://example.com" -o page.md

# Extract structured JSON
anakin scrape "https://example.com/product" --format json -o product.json

# Full raw API response
anakin scrape "https://example.com" --format raw -o debug.json

# JavaScript-heavy site
anakin scrape "https://example.com/spa" --browser

# Scrape from the UK
anakin scrape "https://example.com" --country gb

# Longer timeout for slow sites
anakin scrape "https://example.com" --timeout 300

# Authenticated scraping with a saved browser session
anakin scrape "https://example.com/dashboard" --session-id "session_abc123"

scrape-batch

Scrape up to 10 URLs simultaneously. All URLs are processed in parallel.

anakin scrape-batch "https://a.com" "https://b.com" "https://c.com"
FlagTypeDescriptionDefault
-o, --outputstringSave output to a filestdout

Examples

# Scrape 3 URLs
anakin scrape-batch "https://a.com" "https://b.com" "https://c.com"

# Save batch results to file
anakin scrape-batch "https://a.com" "https://b.com" -o results.json

AI-powered web search. Returns results instantly (synchronous).

anakin search "your search query"
FlagTypeDescriptionDefault
-o, --outputstringSave output to a filestdout

Examples

# Search the web
anakin search "python async best practices"

# Save search results
anakin search "best web scraping tools 2025" -o results.json

# Pipe to jq
anakin search "latest AI news" | jq '.results[0]'

research

Deep agentic research. Runs a multi-stage pipeline: query refinement, web search, citation scraping, and AI synthesis. Takes 1–5 minutes.

anakin research "your research topic"
FlagTypeDescriptionDefault
-o, --outputstringSave output to a filestdout

Examples

# Run deep research
anakin research "comparison of web frameworks 2025"

# Save research report
anakin research "quantum computing industry trends" -o report.json

Error handling

The CLI provides clear error messages:

ErrorCodeFix
Authentication failed401Run anakin login --api-key "ak-xxx"
Plan upgrade required402Visit Pricing
Rate limit exceeded429Wait a few seconds and retry
Job timed outIncrease with --timeout 300
Job failedCheck if the URL is accessible

Exit codes: 0 for success, 1 for any error.