1. Get an API key
Sign in at leancrawl.com/app → API Keys → Create key. Keys look like
ac- + 32 hex chars and are shown once — copy it now.
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"}'Response:
{
"success": true,
"data": { "markdown": "# Example Domain …" },
"meta": { "status_code": 200, "url": "https://example.com/" },
"credit_cost": 1
}3. Crawl a site (async)
# submit — 202 Accepted, reserves `limit` credits up-front
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}'
# → { "data": { "job_id": "…", "status_url": "https://api.leancrawl.com/v1/crawl/…" } }
# poll every ~10 s until status is terminal; fetch pages once done
curl "https://api.leancrawl.com/v1/crawl/<job_id>?include=pages" \
-H "Authorization: Bearer $LEANCRAWL_KEY"Next: Errors for the failure model, or MCP if you want an agent to do all of this for you.