PDF

Any URL to a print-ready PDF. Rendered through a real browser behind residential proxies.

POST /v1/scrape/pdf 25 / 35 credits Utilities

Point us at a URL and get back a base64-encoded PDF rendered through a real headless browser behind residential proxies. Pick the paper size, portrait or landscape, and the viewport. We handle the browser and the proxy so you never run or babysit one yourself.

The hard part

A faithful PDF in production means running a headless browser, waiting for the page to actually settle, clearing anti-bot walls, and picking the right paper geometry — then keeping that browser fleet alive. You send a URL and a paper size; we return the bytes.

What it does

  • Paper sizes: Letter, Legal, Tabloid, Ledger, and A0–A6. `landscape=true` for wide content.
  • `viewport_width`/`viewport_height` control page layout before pagination.
  • `cookies` and `headers` render authenticated or gated pages; `session_id` reuses a sticky residential exit IP for multi-step flows.
  • `wait_extra_ms` waits out late-loading SPA content before capture.
  • Base64 returned inline (no S3 round-trip, no presigned-URL dance).
  • Failures and timeouts don't bill.

Send a call

curl -X POST https://scrapenest.dev/v1/scrape/pdf \
  -H "Authorization: Bearer sn_••••" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://stripe.com/docs/api", "format": "A4" }' \
  | jq -r .pdf_base64 | base64 -d > page.pdf

Request body

{
  "url": "https://stripe.com/docs/api",
  "format": "A4"
}

Response shape

{
  "url": "https://stripe.com/docs/api",
  "final_url": "https://stripe.com/docs/api",
  "status_code": 200,
  "proxy_used": "residential",
  "elapsed_ms": 4120,
  "format": "A4",
  "landscape": false,
  "bytes": 248913,
  "pdf_base64": "JVBERi0xLjcKJ…",
  "cache_hit": false,
  "credits_charged": 25
}

What it costs

25 credits for a standard render; 35 credits for landscape or large paper (Tabloid, Ledger, A0–A2). Cache hits bill at 1 credit. Failures don't bill.

  • Large or landscape formats (Tabloid, Ledger, A0–A2) bill at 35 credits; standard portrait sizes bill at 25.
  • The response streams with keepalive and a ~110s hard timeout, so big renders don't hit an edge 502.