Pry API Reference ๐ข
Base URL: http://<your-host>:8080
POST /v1/scrapeโ
Fetch and extract a page.
| Field | Type | Default | Description |
|---|---|---|---|
url | string | required | Target URL (http/https) |
format | string | markdown | markdown | html | json | text |
wait_for | string | โ | CSS selector to wait for before extraction |
timeout_ms | int | 30000 | Hard timeout |
screenshot | bool | false | Attach viewport screenshot (base64) |
session_id | string | โ | Reuse a cookie/session jar |
200 โ body {url, status, format, content, elapsed_ms}
429 โ rate limited (Retry-After header)
451 โ blocked by target after full escalation chain
GET /healthzโ
Liveness probe.
GET /v1/strategies/{domain}โ
Inspect cached strategy decisions for a domain (debug aid).
Sessionsโ
# create session + scrape behind a login
curl -X POST :8080/v1/scrape -d '{"url":"https://app.example.com/login","session_id":"s1",...}'
# subsequent requests with session_id reuse cookies