All docs
On this page

1. Get an API key

Sign in at leancrawl.com/dashboard, open API Keys, and select Create key. Keys look like sk- followed by 32 hexadecimal characters. Copy the key when it appears; it is shown only once.

2. Read a page

curl -X POST https://api.leancrawl.com/v1/markdown \
  -H "Authorization: Bearer $LEANCRAWL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

A successful call returns the content and billing details:

{
  "success": true,
  "data": { "markdown": "# Example Domain …" },
  "meta": { "status_code": 200, "url": "https://example.com/" },
  "credit_cost": 1
}

3. Crawl a site

# Submit a crawl. Each completed page costs 1 credit.
curl -X POST https://api.leancrawl.com/v1/crawl \
  -H "Authorization: Bearer $LEANCRAWL_KEY" -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "limit": 10}'

# 202 Accepted: { "data": { "job_id": "…", "status_url": "https://api.leancrawl.com/v1/crawl/…" } }

# Poll until the job reaches a terminal status, then fetch pages.
curl "https://api.leancrawl.com/v1/crawl/<job_id>?include=pages" \
  -H "Authorization: Bearer $LEANCRAWL_KEY"

Next, read Errors for the failure model, or MCP to have an agent run these calls for you.