The playground

Try any of 919 endpoints — live.

Pick an endpoint, load a working example, tweak the params, and send — no signup to try. Results render the way the data deserves; raw JSON, headers & code are one tab away.

Playground demo key · api.reefapi.com
post/web-capture/v1/pdf3 credits

Print a URL to PDF (Chromium print-to-PDF): paper size, margins, landscape, backgrounds.

Working example
Parameters

Page URL to capture (http/https; bare domains get https:// prefixed). Private/internal/metadata targets are SSRF-blocked on every hop.

PDF paper size (Chromium print-to-PDF formats).

Landscape orientation.

PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). Sets all four sides; override per side below.

PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm).

PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm).

PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm).

PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm).

Render background colors/images in the PDF (default true).

CSS media type used for the PDF render.

Print scale 0.1-2.0. (0.1–2)

Pages to include, e.g. '1-3,5'. Empty = all.

Honor CSS @page size over paper_format when the page declares one.

Print header/footer bands on every PDF page.

PDF header HTML template; classes date/title/url/pageNumber/totalPages are auto-filled by Chromium. Styles are NOT inherited — inline font-size etc.

PDF footer HTML template; classes date/title/url/pageNumber/totalPages are auto-filled by Chromium. Styles are NOT inherited — inline font-size etc.

Viewport width in CSS pixels (200-3840). (200–3840)

Viewport height in CSS pixels (200-2160). (200–2160)

Device pixel ratio 1-3 (2 = retina-quality raster). (1–3)

Device emulation preset — sets viewport, scale, touch and a matching mobile User-Agent in one go. Explicit viewport/device_scale_factor/user_agent still override it.

Geolocation latitude to emulate (with longitude; grants geolocation permission to the page). (-90–90)

Geolocation longitude to emulate (with latitude). (-180–180)

Disable JavaScript entirely (capture the no-JS / SSR view).

Bypass the page's Content-Security-Policy so injected css/js always apply (some strict-CSP sites block injection otherwise).

Navigation wait condition before capture.

Additionally wait until this CSS selector is visible (15s budget) — the reliable signal for heavy SPAs.

Extra settle delay after load, 0-5000ms. (0–5000)

Emulate prefers-color-scheme: dark.

Best-effort blocking of common ad/analytics/tracker hosts (curated list, not a full adblocker).

Skip downloading images (faster, lighter captures).

Skip downloading web fonts.

Skip downloading audio/video media.

Block analytics/tracker hosts (same curated list as block_ads).

Comma-separated URL glob patterns to block (wildcards: * and ?).

Hide common cookie-consent banners via injected CSS (OneTrust, Cookiebot, Didomi, Usercentrics, …). Default off = capture the page as a first-time visitor really sees it.

Comma-separated CSS selectors to hide before capture.

Click this selector after load (e.g. dismiss a dialog), best-effort.

Hover this selector after load (reveal hover menus), best-effort.

Scroll this selector into view before capture, best-effort.

Wait until this selector disappears (e.g. a loading spinner) before capture (15s budget).

Click a common cookie-consent 'Accept' button instead of hiding the banner (so the page reflows as a consenting visitor sees it).

Freeze CSS animations/transitions + emulate reduced-motion for deterministic captures (default true).

Override the browser User-Agent.

Extra request headers (JSON object, POST body). Cookie/Authorization are stripped (no-login content policy).

Browser locale (Accept-Language + Intl), e.g. en-US, de-DE, ja-JP.

IANA timezone for the page (e.g. America/New_York).

Extra CSS injected into the document <head>.

JavaScript to run in the page after load, before capture (best-effort; script errors are reported, not fatal).

Fail with TARGET_BLOCKED if the rendered page text contains this string (catch soft block / error pages a 200 status hides).

Fail with TARGET_BLOCKED if this CSS selector is present on the page (e.g. an error banner or captcha container a 200 status hides).

Fail if the rendered output is smaller than this (sanity check against blank/near-empty captures). (0–52428800)

If true, a 4xx/5xx page fails with UPSTREAM_HTTP instead of capturing the error page. Default false: capture honestly + report http_status.

Bypass the capture cache and force a new render.

Capture-cache TTL in seconds (600-3600). (600–3600)

request preview
curl -X POST https://api.reefapi.com/web-capture/v1/pdf \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com"}'

Hit Send to run this endpoint live.