Skip to main content

Pry API Reference ๐ŸŸข

Base URL: http://<your-host>:8080

POST /v1/scrapeโ€‹

Fetch and extract a page.

FieldTypeDefaultDescription
urlstringrequiredTarget URL (http/https)
formatstringmarkdownmarkdown | html | json | text
wait_forstringโ€”CSS selector to wait for before extraction
timeout_msint30000Hard timeout
screenshotboolfalseAttach viewport screenshot (base64)
session_idstringโ€”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