Web Capture API
Web Capture API
/web-capture/v1/screenshot2 creditsScreenshot a URL (viewport or full-page) as png/jpeg/webp with SPA-grade wait controls.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| url | required | — | Page URL to capture (http/https; bare domains get https:// prefixed). Private/internal/metadata targets are SSRF-blocked on every hop. |
| full_page = false | optional | — | Capture the entire scrollable page (auto-scrolls first so lazy-loaded content renders). Height is capped by max_height_px. |
| format = png | optional | png · jpeg · webp · jpg · jfif | Output image format (jpg/jfif are accepted aliases for jpeg). |
| quality = 80 | optional | 1–100 | JPEG/WebP quality 1-100 (ignored for png). |
| max_height_px = 16384 | optional | 1000–16384 | Full-page height cap in pixels (1000-16384). Infinite-scroll pages are clipped here; meta.stop_reason reports 'cap_reached'. |
| transparent = false | optional | — | Omit the default white background (png only) → transparent where the page defines no background. |
| clip_x = 0 | optional | 0–16384 | Clip region X (page coordinates). |
| clip_y = 0 | optional | 0–16384 | Clip region Y (page coordinates). |
| clip_width | optional | 1–16384 | Clip region width — set together with clip_height to capture a fixed rectangle (overrides full_page). |
| clip_height | optional | 1–16384 | Clip region height (with clip_width). |
| thumbnail_width | optional | 50–2000 | Downscale the final image to this width (aspect preserved) — thumbnails without a second render. |
| viewport_width = 1280 | optional | 200–3840 | Viewport width in CSS pixels (200-3840). |
| viewport_height = 800 | optional | 200–2160 | Viewport height in CSS pixels (200-2160). |
| device_scale_factor = 1 | optional | 1–3 | Device pixel ratio 1-3 (2 = retina-quality raster). |
| device | optional | iphone_15 · iphone_se · pixel_8 · galaxy_s23 · ipad · desktop · desktop_hd | 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. |
| latitude | optional | -90–90 | Geolocation latitude to emulate (with longitude; grants geolocation permission to the page). |
| longitude | optional | -180–180 | Geolocation longitude to emulate (with latitude). |
| disable_js = false | optional | — | Disable JavaScript entirely, capturing only the server-delivered HTML (useful to test the no-JS fallback experience or to speed up captures). |
| bypass_csp = false | optional | — | Bypass the page's Content-Security-Policy so injected css/js always apply (some strict-CSP sites block injection otherwise). |
| wait_until = load | optional | load · domcontentloaded · networkidle · commit | Navigation wait condition before capture. |
| wait_selector | optional | — | Additionally wait until this CSS selector is visible (15s budget) — the reliable signal for heavy SPAs. |
| delay_ms = 0 | optional | 0–5000 | Extra settle delay after load, 0-5000ms. |
| dark_mode = false | optional | — | Emulate prefers-color-scheme: dark. |
| block_ads = false | optional | — | Best-effort blocking of common ad/analytics/tracker hosts (curated list, not a full adblocker). |
| block_images = false | optional | — | Skip downloading images (faster, lighter captures). |
| block_fonts = false | optional | — | Skip downloading web fonts. |
| block_media = false | optional | — | Skip downloading audio/video media. |
| block_trackers = false | optional | — | Block analytics/tracker hosts (same curated list as block_ads). |
| block_urls | optional | — | Comma-separated URL glob patterns to block (wildcards: * and ?). |
| hide_cookie_banners = false | optional | — | 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. |
| hide_selectors | optional | — | Comma-separated CSS selectors to hide before capture. |
| click_selector | optional | — | Click this selector after load (e.g. dismiss a dialog), best-effort. |
| hover_selector | optional | — | Hover this selector after load (reveal hover menus), best-effort. |
| scroll_to_selector | optional | — | Scroll this selector into view before capture, best-effort. |
| wait_for_selector_hidden | optional | — | Wait until this selector disappears (e.g. a loading spinner) before capture (15s budget). |
| click_accept_cookies = false | optional | — | Click a common cookie-consent 'Accept' button instead of hiding the banner (so the page reflows as a consenting visitor sees it). |
| disable_animations = true | optional | — | Freeze CSS animations/transitions + emulate reduced-motion for deterministic captures (default true). |
| user_agent | optional | — | Override the browser User-Agent. |
| headers | optional | — | Extra request headers (JSON object, POST body). Cookie/Authorization are stripped (no-login content policy). |
| locale | optional | — | Browser locale (Accept-Language + Intl), e.g. en-US, de-DE, ja-JP. |
| timezone | optional | — | IANA timezone for the page (e.g. America/New_York). |
| css | optional | — | Extra CSS injected into the document <head>. |
| js | optional | — | JavaScript to run in the page after load, before capture (best-effort; script errors are reported, not fatal). |
| fail_if_contains | optional | — | Treat the capture as failed if the rendered page text contains this string — useful for catching soft-block or error pages that still return HTTP 200 (e.g. 'Access Denied', 'Rate limit exceeded'). |
| fail_if_selector | optional | — | Treat the capture as failed if this CSS selector is found on the page — catches error banners or challenge pages that still return HTTP 200 (e.g. '.error-page, #captcha'). |
| min_size_bytes | optional | 0–52428800 | Fail if the rendered output is smaller than this (sanity check against blank/near-empty captures). |
| fail_on_error_status = false | optional | — | If true, a 4xx/5xx page fails with UPSTREAM_HTTP instead of capturing the error page. Default false: capture honestly + report http_status. |
| fresh = false | optional | — | Bypass the capture cache and force a new render. |
| cache_ttl = 900 | optional | 600–3600 | Capture-cache TTL in seconds (600-3600). |
/web-capture/v1/pdf3 creditsPrint a URL to PDF (Chromium print-to-PDF): paper size, margins, landscape, backgrounds.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| url | required | — | Page URL to capture (http/https; bare domains get https:// prefixed). Private/internal/metadata targets are SSRF-blocked on every hop. |
| paper_format = A4 | optional | A4 · Letter · Legal · Tabloid · Ledger · A0 · A1 · A2 · A3 · A5 · A6 | PDF paper size (Chromium print-to-PDF formats). |
| landscape = false | optional | — | Landscape orientation. |
| margin = 10mm | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). Sets all four sides; override per side below. |
| margin_top | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| margin_bottom | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| margin_left | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| margin_right | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| print_background = true | optional | — | Render background colors/images in the PDF (default true). |
| media = print | optional | print · screen | CSS media type used for the PDF render. |
| scale = 1 | optional | 0.1–2 | Print scale 0.1-2.0. |
| page_ranges | optional | — | Pages to include, e.g. '1-3,5'. Empty = all. |
| prefer_css_page_size = false | optional | — | Honor CSS @page size over paper_format when the page declares one. |
| display_header_footer = false | optional | — | Print header/footer bands on every PDF page. |
| header_template | optional | — | PDF header HTML template; classes date/title/url/pageNumber/totalPages are auto-filled by Chromium. Styles are NOT inherited — inline font-size etc. |
| footer_template | optional | — | 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 = 1280 | optional | 200–3840 | Viewport width in CSS pixels (200-3840). |
| viewport_height = 800 | optional | 200–2160 | Viewport height in CSS pixels (200-2160). |
| device_scale_factor = 1 | optional | 1–3 | Device pixel ratio 1-3 (2 = retina-quality raster). |
| device | optional | iphone_15 · iphone_se · pixel_8 · galaxy_s23 · ipad · desktop · desktop_hd | 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. |
| latitude | optional | -90–90 | Geolocation latitude to emulate (with longitude; grants geolocation permission to the page). |
| longitude | optional | -180–180 | Geolocation longitude to emulate (with latitude). |
| disable_js = false | optional | — | Disable JavaScript entirely, capturing only the server-delivered HTML (useful to test the no-JS fallback experience or to speed up captures). |
| bypass_csp = false | optional | — | Bypass the page's Content-Security-Policy so injected css/js always apply (some strict-CSP sites block injection otherwise). |
| wait_until = load | optional | load · domcontentloaded · networkidle · commit | Navigation wait condition before capture. |
| wait_selector | optional | — | Additionally wait until this CSS selector is visible (15s budget) — the reliable signal for heavy SPAs. |
| delay_ms = 0 | optional | 0–5000 | Extra settle delay after load, 0-5000ms. |
| dark_mode = false | optional | — | Emulate prefers-color-scheme: dark. |
| block_ads = false | optional | — | Best-effort blocking of common ad/analytics/tracker hosts (curated list, not a full adblocker). |
| block_images = false | optional | — | Skip downloading images (faster, lighter captures). |
| block_fonts = false | optional | — | Skip downloading web fonts. |
| block_media = false | optional | — | Skip downloading audio/video media. |
| block_trackers = false | optional | — | Block analytics/tracker hosts (same curated list as block_ads). |
| block_urls | optional | — | Comma-separated URL glob patterns to block (wildcards: * and ?). |
| hide_cookie_banners = false | optional | — | 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. |
| hide_selectors | optional | — | Comma-separated CSS selectors to hide before capture. |
| click_selector | optional | — | Click this selector after load (e.g. dismiss a dialog), best-effort. |
| hover_selector | optional | — | Hover this selector after load (reveal hover menus), best-effort. |
| scroll_to_selector | optional | — | Scroll this selector into view before capture, best-effort. |
| wait_for_selector_hidden | optional | — | Wait until this selector disappears (e.g. a loading spinner) before capture (15s budget). |
| click_accept_cookies = false | optional | — | Click a common cookie-consent 'Accept' button instead of hiding the banner (so the page reflows as a consenting visitor sees it). |
| disable_animations = true | optional | — | Freeze CSS animations/transitions + emulate reduced-motion for deterministic captures (default true). |
| user_agent | optional | — | Override the browser User-Agent. |
| headers | optional | — | Extra request headers (JSON object, POST body). Cookie/Authorization are stripped (no-login content policy). |
| locale | optional | — | Browser locale (Accept-Language + Intl), e.g. en-US, de-DE, ja-JP. |
| timezone | optional | — | IANA timezone for the page (e.g. America/New_York). |
| css | optional | — | Extra CSS injected into the document <head>. |
| js | optional | — | JavaScript to run in the page after load, before capture (best-effort; script errors are reported, not fatal). |
| fail_if_contains | optional | — | Treat the capture as failed if the rendered page text contains this string — useful for catching soft-block or error pages that still return HTTP 200 (e.g. 'Access Denied', 'Rate limit exceeded'). |
| fail_if_selector | optional | — | Treat the capture as failed if this CSS selector is found on the page — catches error banners or challenge pages that still return HTTP 200 (e.g. '.error-page, #captcha'). |
| min_size_bytes | optional | 0–52428800 | Fail if the rendered output is smaller than this (sanity check against blank/near-empty captures). |
| fail_on_error_status = false | optional | — | If true, a 4xx/5xx page fails with UPSTREAM_HTTP instead of capturing the error page. Default false: capture honestly + report http_status. |
| fresh = false | optional | — | Bypass the capture cache and force a new render. |
| cache_ttl = 900 | optional | 600–3600 | Capture-cache TTL in seconds (600-3600). |
/web-capture/v1/html_to_pdf3 creditsRender raw HTML (+optional CSS) to PDF — invoices, reports, receipts. Same Chromium engine as the big converters; remote assets SSRF-guarded or fully blocked.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| html | required | — | Raw HTML to render (≤2MB). Remote subresources are SSRF-guarded; set allow_remote_resources=false for fully offline rendering. |
| css | optional | — | Extra CSS injected into the document <head>. |
| base_url | optional | — | Base URL for relative asset paths in the supplied HTML (injected as <base href>); SSRF-validated. |
| allow_remote_resources = true | optional | — | Allow the supplied HTML to load remote images/fonts/css (SSRF-guarded). false = network fully blocked (pure offline render). |
| paper_format = A4 | optional | A4 · Letter · Legal · Tabloid · Ledger · A0 · A1 · A2 · A3 · A5 · A6 | PDF paper size (Chromium print-to-PDF formats). |
| landscape = false | optional | — | Landscape orientation. |
| margin = 10mm | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). Sets all four sides; override per side below. |
| margin_top | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| margin_bottom | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| margin_left | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| margin_right | optional | — | PDF margin — '10mm' / '0.5in' / '12px' or bare number (mm). |
| print_background = true | optional | — | Render background colors/images in the PDF (default true). |
| media = print | optional | print · screen | CSS media type used for the PDF render. |
| scale = 1 | optional | 0.1–2 | Print scale 0.1-2.0. |
| page_ranges | optional | — | Pages to include, e.g. '1-3,5'. Empty = all. |
| prefer_css_page_size = false | optional | — | Honor CSS @page size over paper_format when the page declares one. |
| display_header_footer = false | optional | — | Print header/footer bands on every PDF page. |
| header_template | optional | — | PDF header HTML template; classes date/title/url/pageNumber/totalPages are auto-filled by Chromium. Styles are NOT inherited — inline font-size etc. |
| footer_template | optional | — | 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 = 1280 | optional | 200–3840 | Viewport width in CSS pixels (200-3840). |
| delay_ms = 0 | optional | 0–5000 | Extra settle delay after load, 0-5000ms. |
/web-capture/v1/html2 creditsRendered post-JS DOM of a URL — the full document HTML after the SPA executes (extraction-free: returns the DOM, you parse).
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| url | required | — | Page URL to capture (http/https; bare domains get https:// prefixed). Private/internal/metadata targets are SSRF-blocked on every hop. |
| viewport_width = 1280 | optional | 200–3840 | Viewport width in CSS pixels (200-3840). |
| viewport_height = 800 | optional | 200–2160 | Viewport height in CSS pixels (200-2160). |
| device_scale_factor = 1 | optional | 1–3 | Device pixel ratio 1-3 (2 = retina-quality raster). |
| device | optional | iphone_15 · iphone_se · pixel_8 · galaxy_s23 · ipad · desktop · desktop_hd | 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. |
| latitude | optional | -90–90 | Geolocation latitude to emulate (with longitude; grants geolocation permission to the page). |
| longitude | optional | -180–180 | Geolocation longitude to emulate (with latitude). |
| disable_js = false | optional | — | Disable JavaScript entirely, capturing only the server-delivered HTML (useful to test the no-JS fallback experience or to speed up captures). |
| bypass_csp = false | optional | — | Bypass the page's Content-Security-Policy so injected css/js always apply (some strict-CSP sites block injection otherwise). |
| wait_until = load | optional | load · domcontentloaded · networkidle · commit | Navigation wait condition before capture. |
| wait_selector | optional | — | Additionally wait until this CSS selector is visible (15s budget) — the reliable signal for heavy SPAs. |
| delay_ms = 0 | optional | 0–5000 | Extra settle delay after load, 0-5000ms. |
| dark_mode = false | optional | — | Emulate prefers-color-scheme: dark. |
| block_ads = false | optional | — | Best-effort blocking of common ad/analytics/tracker hosts (curated list, not a full adblocker). |
| block_images = false | optional | — | Skip downloading images (faster, lighter captures). |
| block_fonts = false | optional | — | Skip downloading web fonts. |
| block_media = false | optional | — | Skip downloading audio/video media. |
| block_trackers = false | optional | — | Block analytics/tracker hosts (same curated list as block_ads). |
| block_urls | optional | — | Comma-separated URL glob patterns to block (wildcards: * and ?). |
| hide_cookie_banners = false | optional | — | 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. |
| hide_selectors | optional | — | Comma-separated CSS selectors to hide before capture. |
| click_selector | optional | — | Click this selector after load (e.g. dismiss a dialog), best-effort. |
| hover_selector | optional | — | Hover this selector after load (reveal hover menus), best-effort. |
| scroll_to_selector | optional | — | Scroll this selector into view before capture, best-effort. |
| wait_for_selector_hidden | optional | — | Wait until this selector disappears (e.g. a loading spinner) before capture (15s budget). |
| click_accept_cookies = false | optional | — | Click a common cookie-consent 'Accept' button instead of hiding the banner (so the page reflows as a consenting visitor sees it). |
| disable_animations = true | optional | — | Freeze CSS animations/transitions + emulate reduced-motion for deterministic captures (default true). |
| user_agent | optional | — | Override the browser User-Agent. |
| headers | optional | — | Extra request headers (JSON object, POST body). Cookie/Authorization are stripped (no-login content policy). |
| locale | optional | — | Browser locale (Accept-Language + Intl), e.g. en-US, de-DE, ja-JP. |
| timezone | optional | — | IANA timezone for the page (e.g. America/New_York). |
| css | optional | — | Extra CSS injected into the document <head>. |
| js | optional | — | JavaScript to run in the page after load, before capture (best-effort; script errors are reported, not fatal). |
| fail_if_contains | optional | — | Treat the capture as failed if the rendered page text contains this string — useful for catching soft-block or error pages that still return HTTP 200 (e.g. 'Access Denied', 'Rate limit exceeded'). |
| fail_if_selector | optional | — | Treat the capture as failed if this CSS selector is found on the page — catches error banners or challenge pages that still return HTTP 200 (e.g. '.error-page, #captcha'). |
| min_size_bytes | optional | 0–52428800 | Fail if the rendered output is smaller than this (sanity check against blank/near-empty captures). |
| fail_on_error_status = false | optional | — | If true, a 4xx/5xx page fails with UPSTREAM_HTTP instead of capturing the error page. Default false: capture honestly + report http_status. |
| fresh = false | optional | — | Bypass the capture cache and force a new render. |
| cache_ttl = 900 | optional | 600–3600 | Capture-cache TTL in seconds (600-3600). |
/web-capture/v1/element2 creditsScreenshot a single element by CSS selector (cropped to its bounding box).
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| url | required | — | Page URL to capture (http/https; bare domains get https:// prefixed). Private/internal/metadata targets are SSRF-blocked on every hop. |
| selector | required | — | CSS selector of the element to capture (first visible match). |
| format = png | optional | png · jpeg · webp · jpg · jfif | Output image format (jpg/jfif are accepted aliases for jpeg). |
| quality = 80 | optional | 1–100 | JPEG/WebP quality 1-100 (ignored for png). |
| viewport_width = 1280 | optional | 200–3840 | Viewport width in CSS pixels (200-3840). |
| viewport_height = 800 | optional | 200–2160 | Viewport height in CSS pixels (200-2160). |
| device_scale_factor = 1 | optional | 1–3 | Device pixel ratio 1-3 (2 = retina-quality raster). |
| device | optional | iphone_15 · iphone_se · pixel_8 · galaxy_s23 · ipad · desktop · desktop_hd | 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. |
| latitude | optional | -90–90 | Geolocation latitude to emulate (with longitude; grants geolocation permission to the page). |
| longitude | optional | -180–180 | Geolocation longitude to emulate (with latitude). |
| disable_js = false | optional | — | Disable JavaScript entirely, capturing only the server-delivered HTML (useful to test the no-JS fallback experience or to speed up captures). |
| bypass_csp = false | optional | — | Bypass the page's Content-Security-Policy so injected css/js always apply (some strict-CSP sites block injection otherwise). |
| wait_until = load | optional | load · domcontentloaded · networkidle · commit | Navigation wait condition before capture. |
| wait_selector | optional | — | Additionally wait until this CSS selector is visible (15s budget) — the reliable signal for heavy SPAs. |
| delay_ms = 0 | optional | 0–5000 | Extra settle delay after load, 0-5000ms. |
| dark_mode = false | optional | — | Emulate prefers-color-scheme: dark. |
| block_ads = false | optional | — | Best-effort blocking of common ad/analytics/tracker hosts (curated list, not a full adblocker). |
| block_images = false | optional | — | Skip downloading images (faster, lighter captures). |
| block_fonts = false | optional | — | Skip downloading web fonts. |
| block_media = false | optional | — | Skip downloading audio/video media. |
| block_trackers = false | optional | — | Block analytics/tracker hosts (same curated list as block_ads). |
| block_urls | optional | — | Comma-separated URL glob patterns to block (wildcards: * and ?). |
| hide_cookie_banners = false | optional | — | 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. |
| hide_selectors | optional | — | Comma-separated CSS selectors to hide before capture. |
| click_selector | optional | — | Click this selector after load (e.g. dismiss a dialog), best-effort. |
| hover_selector | optional | — | Hover this selector after load (reveal hover menus), best-effort. |
| scroll_to_selector | optional | — | Scroll this selector into view before capture, best-effort. |
| wait_for_selector_hidden | optional | — | Wait until this selector disappears (e.g. a loading spinner) before capture (15s budget). |
| click_accept_cookies = false | optional | — | Click a common cookie-consent 'Accept' button instead of hiding the banner (so the page reflows as a consenting visitor sees it). |
| disable_animations = true | optional | — | Freeze CSS animations/transitions + emulate reduced-motion for deterministic captures (default true). |
| user_agent | optional | — | Override the browser User-Agent. |
| headers | optional | — | Extra request headers (JSON object, POST body). Cookie/Authorization are stripped (no-login content policy). |
| locale | optional | — | Browser locale (Accept-Language + Intl), e.g. en-US, de-DE, ja-JP. |
| timezone | optional | — | IANA timezone for the page (e.g. America/New_York). |
| css | optional | — | Extra CSS injected into the document <head>. |
| js | optional | — | JavaScript to run in the page after load, before capture (best-effort; script errors are reported, not fatal). |
| fail_if_contains | optional | — | Treat the capture as failed if the rendered page text contains this string — useful for catching soft-block or error pages that still return HTTP 200 (e.g. 'Access Denied', 'Rate limit exceeded'). |
| fail_if_selector | optional | — | Treat the capture as failed if this CSS selector is found on the page — catches error banners or challenge pages that still return HTTP 200 (e.g. '.error-page, #captcha'). |
| min_size_bytes | optional | 0–52428800 | Fail if the rendered output is smaller than this (sanity check against blank/near-empty captures). |
| fail_on_error_status = false | optional | — | If true, a 4xx/5xx page fails with UPSTREAM_HTTP instead of capturing the error page. Default false: capture honestly + report http_status. |
| fresh = false | optional | — | Bypass the capture cache and force a new render. |
| cache_ttl = 900 | optional | 600–3600 | Capture-cache TTL in seconds (600-3600). |
/web-capture/v1/batch5 creditsScreenshot up to 5 URLs in one call (queued through the render slots); per-URL ok/error so one bad URL never sinks the batch.
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| urls | required | — | Up to 5 URLs (JSON array or comma-separated). Rendered through the queue; per-URL ok/error in results[]. |
| full_page = false | optional | — | Capture the entire scrollable page (auto-scrolls first so lazy-loaded content renders). Height is capped by max_height_px. |
| format = png | optional | png · jpeg · webp · jpg · jfif | Output image format (jpg/jfif are accepted aliases for jpeg). |
| quality = 80 | optional | 1–100 | JPEG/WebP quality 1-100 (ignored for png). |
| max_height_px = 16384 | optional | 1000–16384 | Full-page height cap in pixels (1000-16384). Infinite-scroll pages are clipped here; meta.stop_reason reports 'cap_reached'. |
| viewport_width = 1280 | optional | 200–3840 | Viewport width in CSS pixels (200-3840). |
| viewport_height = 800 | optional | 200–2160 | Viewport height in CSS pixels (200-2160). |
| device_scale_factor = 1 | optional | 1–3 | Device pixel ratio 1-3 (2 = retina-quality raster). |
| device | optional | iphone_15 · iphone_se · pixel_8 · galaxy_s23 · ipad · desktop · desktop_hd | 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. |
| latitude | optional | -90–90 | Geolocation latitude to emulate (with longitude; grants geolocation permission to the page). |
| longitude | optional | -180–180 | Geolocation longitude to emulate (with latitude). |
| disable_js = false | optional | — | Disable JavaScript entirely, capturing only the server-delivered HTML (useful to test the no-JS fallback experience or to speed up captures). |
| bypass_csp = false | optional | — | Bypass the page's Content-Security-Policy so injected css/js always apply (some strict-CSP sites block injection otherwise). |
| wait_until = load | optional | load · domcontentloaded · networkidle · commit | Navigation wait condition before capture. |
| wait_selector | optional | — | Additionally wait until this CSS selector is visible (15s budget) — the reliable signal for heavy SPAs. |
| delay_ms = 0 | optional | 0–5000 | Extra settle delay after load, 0-5000ms. |
| dark_mode = false | optional | — | Emulate prefers-color-scheme: dark. |
| block_ads = false | optional | — | Best-effort blocking of common ad/analytics/tracker hosts (curated list, not a full adblocker). |
| block_images = false | optional | — | Skip downloading images (faster, lighter captures). |
| block_fonts = false | optional | — | Skip downloading web fonts. |
| block_media = false | optional | — | Skip downloading audio/video media. |
| block_trackers = false | optional | — | Block analytics/tracker hosts (same curated list as block_ads). |
| block_urls | optional | — | Comma-separated URL glob patterns to block (wildcards: * and ?). |
| hide_cookie_banners = false | optional | — | 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. |
| hide_selectors | optional | — | Comma-separated CSS selectors to hide before capture. |
| click_selector | optional | — | Click this selector after load (e.g. dismiss a dialog), best-effort. |
| hover_selector | optional | — | Hover this selector after load (reveal hover menus), best-effort. |
| scroll_to_selector | optional | — | Scroll this selector into view before capture, best-effort. |
| wait_for_selector_hidden | optional | — | Wait until this selector disappears (e.g. a loading spinner) before capture (15s budget). |
| click_accept_cookies = false | optional | — | Click a common cookie-consent 'Accept' button instead of hiding the banner (so the page reflows as a consenting visitor sees it). |
| disable_animations = true | optional | — | Freeze CSS animations/transitions + emulate reduced-motion for deterministic captures (default true). |
| user_agent | optional | — | Override the browser User-Agent. |
| headers | optional | — | Extra request headers (JSON object, POST body). Cookie/Authorization are stripped (no-login content policy). |
| locale | optional | — | Browser locale (Accept-Language + Intl), e.g. en-US, de-DE, ja-JP. |
| timezone | optional | — | IANA timezone for the page (e.g. America/New_York). |
| css | optional | — | Extra CSS injected into the document <head>. |
| js | optional | — | JavaScript to run in the page after load, before capture (best-effort; script errors are reported, not fatal). |
| fail_if_contains | optional | — | Treat the capture as failed if the rendered page text contains this string — useful for catching soft-block or error pages that still return HTTP 200 (e.g. 'Access Denied', 'Rate limit exceeded'). |
| fail_if_selector | optional | — | Treat the capture as failed if this CSS selector is found on the page — catches error banners or challenge pages that still return HTTP 200 (e.g. '.error-page, #captcha'). |
| min_size_bytes | optional | 0–52428800 | Fail if the rendered output is smaller than this (sanity check against blank/near-empty captures). |
| fail_on_error_status = false | optional | — | If true, a 4xx/5xx page fails with UPSTREAM_HTTP instead of capturing the error page. Default false: capture honestly + report http_status. |
| fresh = false | optional | — | Bypass the capture cache and force a new render. |
| cache_ttl = 900 | optional | 600–3600 | Capture-cache TTL in seconds (600-3600). |
/web-capture/v1/downloadfreeFetch a 10-50MB capture artifact by its one-time token (30 min TTL; consumed on read).
| Parameter | Allowed / range | Description | |
|---|---|---|---|
| token | required | — | One-time download token from a previous capture (10-50MB outputs). Expires 30 min after the capture; consumed on first read. |
curl -X POST https://api.reefapi.com/web-capture/v1/screenshot \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"url":"https://example.com"}'{
"ok": true,
"data": { /* the result */ },
"meta": {
"latency_ms": 240,
"record_count": 12,
"completeness_pct": 100
},
"error": null
}