# screenshotbase > screenshotbase captures screenshots, PDFs and markdown of any web page or of HTML you send, and returns the result directly, or a hosted URL as JSON when using upload mode. Authenticate every request with your API key via the `apikey` query parameter or request header. Base URL: https://api.screenshotbase.com ## Get an API key - AI coding agents: run curl -s https://screenshotbase.com/agents.md and follow it (key, first call, plans). 1. Sign up free at https://app.screenshotbase.com/register (300 free screenshots a month). 2. Send the key in the `apikey` header (or `?apikey=`). 3. Store it as SCREENSHOTBASE_KEY. `curl -H "apikey: $SCREENSHOTBASE_KEY" "https://api.screenshotbase.com/v1/take?url=https://example.com" -o screenshot.png` MCP: https://api.screenshotbase.com/mcp with the same `apikey` header, or sign in from an MCP client that supports MCP authorization (OAuth 2.1): https://api.screenshotbase.com/.well-known/oauth-protected-resource/mcp names the authorization server. ## Documentation - [Introduction](https://screenshotbase.com/docs/): Learn everything there is to know about the screenshotbase.com API and integrate screenshotbase.com into your product. - [Async jobs & webhooks](https://screenshotbase.com/docs/async/): Async screenshot, PDF and markdown jobs: async=true answers 202 with a job, renders of up to 300 seconds, polling, signed webhooks and idempotency keys. - [Authentication](https://screenshotbase.com/docs/authentication/): Authenticate screenshotbase API requests with your API key, sent as the apikey query parameter or, recommended, as an apikey HTTP header. - [Devices endpoint](https://screenshotbase.com/docs/devices/): The devices endpoint lists every device viewport_device emulates, with its viewport, device scale factor, mobile and touch flags and user agent. - [Render HTML](https://screenshotbase.com/docs/html/): Render your own HTML or markdown as a PDF, screenshot or markdown with POST /v1/take: request body, size limits, images and fonts, time limit and privacy. - [URL to markdown](https://screenshotbase.com/docs/markdown/): Convert any web page to markdown with the screenshotbase API: main content or whole page, text or JSON response, what the markdown contains, limits and billing. - [MCP server](https://screenshotbase.com/docs/mcp/): Connect Claude, Cursor and other AI agents to the screenshotbase API through the hosted MCP (Model Context Protocol) server, with your API key. - [PDF output](https://screenshotbase.com/docs/pdf/): Print any web page as a PDF with the screenshotbase API: paper size, margins, page ranges, headers and footers, one long page, outlines, time limit and billing. - [Quickstart](https://screenshotbase.com/docs/quickstart/): Get started with the screenshotbase API: grab your API key, install an SDK or use cURL, and take your first website screenshot in a few minutes. - [Rate limit & quotas](https://screenshotbase.com/docs/rate-limit/): Monthly request quotas, renders at the same time per plan, the free plan\ - [SDKs](https://screenshotbase.com/docs/sdks/): screenshotbase SDKs for PHP, Ruby, Go and R, and how to call the screenshot API over plain HTTPS from any language. - [Status endpoint](https://screenshotbase.com/docs/status/): The status endpoint of the screenshotbase API returns your monthly and grace request quota as JSON. Requests to it are free. - [Request status codes](https://screenshotbase.com/docs/status-codes/): HTTP status codes and error messages of the screenshotbase API, such as 200, 400, 401, 422, 429 and 504, and what each one means for your request. - [Take endpoint](https://screenshotbase.com/docs/take/): Render a website, or HTML you send, as a PNG, JPG, WebP or AVIF screenshot, a PDF or markdown with /v1/take: full-page capture, viewport, delays, ad blocking. ## API Reference - [OpenAPI 3.1 specification](https://screenshotbase.com/docs/openapi.yaml): Machine-readable spec for every API endpoint, parameters and responses. - [Full documentation as markdown](https://screenshotbase.com/docs/llms-full.txt): All documentation pages concatenated as plain markdown. ## Plans and limits - Free: 300 requests a month, 10 requests a minute, 1 API key; no charge. - Basic: 3,000 requests a month, no per-minute limit, 1 API key; $15 a month or $144 a year. - Premium: 20,000 requests a month, no per-minute limit, 3 API keys; $59 a month or $566.40 a year. - Enterprise: 75,000 requests a month, no per-minute limit, 5 API keys; $210 a month or $2,016 a year. - Time limit: every render through the API must be done within 110 s of the start of the request (a tool call of the MCP server within 12 s); slower renders answer 408 and are not billed. `timeout` 5-105 s, `delay` 0-30 s. - Size: viewport up to 7,680 x 16,384 CSS px and 74,649,600 device pixels; WebP at most 16,383 px a side, JPEG 65,500, GIF 65,535 and 25,000,000 pixels; HTML input at most 10,485,760 bytes; PDFs at most 200 pages. - `ip_country_code`: 117 countries. - Machine-readable: [product.json](https://screenshotbase.com/docs/product.json) (plans, limits, features, SDKs and errors; schema: [product.schema.json](https://screenshotbase.com/docs/product.schema.json)). ## Features - [Screenshots of any URL](https://screenshotbase.com/docs/take/): PNG, JPG, WebP or GIF of a public web page, returned as the file. - [Full-page screenshots](https://screenshotbase.com/docs/take/#full_page): The whole scrollable page instead of the viewport. - [Viewport size](https://screenshotbase.com/docs/take/#viewport_width): Any viewport from 1 x 1 to 7,680 x 16,384 CSS pixels, within the device pixel limit. - [High-DPI (retina) screenshots](https://screenshotbase.com/docs/take/#device_scale_factor): A device scale factor from 0.5 to 3. - [PDF output](https://screenshotbase.com/docs/pdf/): A web page or HTML printed as a PDF, with paper size, margins, page ranges and one-page output. - [URL to markdown](https://screenshotbase.com/docs/markdown/): The content of a page as markdown, the main content or the whole body, as text or JSON. - [HTML input](https://screenshotbase.com/docs/html/): HTML sent in a POST body rendered as a screenshot, a PDF or markdown. - [IP location](https://screenshotbase.com/docs/take/#ip_country_code): The page loaded from an exit IP in one of 117 countries; included in every paid plan, free accounts get 5 such renders in any 5 days. Plans: Basic, Premium, Enterprise. - [Cookie banner blocking](https://screenshotbase.com/docs/take/#block_cookie_banners): Cookie-consent banners hidden before the capture. - [Ad blocking](https://screenshotbase.com/docs/take/#block_ads): Ads and trackers blocked before the capture. - [Chat widget blocking](https://screenshotbase.com/docs/take/#block_chats): Chat widgets hidden before the capture. - [Hide elements](https://screenshotbase.com/docs/take/#hide_selectors): Up to 50 CSS selectors of elements to hide. - [Custom CSS](https://screenshotbase.com/docs/take/#styles): CSS injected into the page before the capture. - [Delay and load events](https://screenshotbase.com/docs/take/#wait_until): A delay after load and the load event to wait for. - [Hosted file URL](https://screenshotbase.com/docs/take/#upload): With upload=true the result is stored and the response is JSON with its public URL. - [MCP server](https://screenshotbase.com/docs/mcp/): The take, takePost, getStatus and listDevices tools, and listJobs, getJob, getJobResult and deleteJob for async jobs, for AI agents at api.screenshotbase.com/mcp. - [Quota status endpoint](https://screenshotbase.com/docs/status/): GET /v1/status returns the month's usage; it is free. - [Error codes on every error](https://screenshotbase.com/docs/status-codes/#error-body): error.code and actions on every error, request_id on every error the API answers (the gateway's 401 and per-minute and used-up-quota 429s carry only the X-Request-Id header), and Retry-After where waiting helps (the first quota_exceeded, concurrency, a busy renderer, a failed upload). - [Renders of up to 110 seconds](https://screenshotbase.com/docs/take/#timeout): Every sync render through the API may take up to 110 s; timeout up to 105 s and delay up to 30 s on every path. MCP tool calls keep 12 s. - [Renders at the same time per plan](https://screenshotbase.com/docs/rate-limit/#concurrency): A published number of renders at the same time per plan (paid plans have no per-minute limit; the free plan keeps 10 per minute); over it 429 concurrency_limit_exceeded, not billed. - [IP location by plan](https://screenshotbase.com/docs/take/#ip_country_code): ip_country_code included on every paid plan; free accounts get 5 such renders in any 5 days. - [Files as MCP tool results](https://screenshotbase.com/docs/mcp/#screenshots-pdfs-and-markdown): MCP tool calls return the image or the PDF itself, up to 3 MB and 8,000 px a side; a larger file needs upload=true. - [Async jobs and webhooks](https://screenshotbase.com/docs/async/): async=true on /v1/take answers 202 with a job; its render may take up to 300 s (timeout up to 295 s), on the free plan up to 120 s (timeout up to 115 s) with 1 job rendering and 5 queued at once. The result is kept 7 days, a signed webhook goes out when the job is done or failed (marked sandbox for a sandbox key's job), an Idempotency-Key answers with the same job for 24 hours, and failed jobs are refunded. - [Own render pipeline](https://screenshotbase.com/docs/take/#styles): Renders through screenshotbase's own browser pipeline; pages that navigate by script after loading keep the custom CSS and hidden elements. - [A page for each error](https://screenshotbase.com/docs/status-codes/#error-body): The info link of an error body points to a page for its error code, or for the browser's network error when a page could not be loaded. - [Uploaded screenshots counted like any render](https://screenshotbase.com/docs/rate-limit/#cost-per-request): Every successful render counts against the quota, upload=true included: a screenshot of a URL with upload=true costs one request (X-Cost: 1) and counts towards the free plan's per-minute limit, as without upload; an async job of it is charged 1 and refunded when it fails. - [Request headers, cookies and browser settings](https://screenshotbase.com/docs/take/#headers): Up to 50 custom headers (8 KB) for the target or every request, up to 50 cookies (4 KB each) for the target's domain, a Basic or Bearer Authorization header sent to the target only, and the user agent, Accept-Language, locale, time zone, geolocation and CSP bypass of the browser. - [Your own proxy](https://screenshotbase.com/docs/take/#proxy): proxy= renders through your own http, https, socks5 or socks5h proxy (user and password in the URL, sent to the proxy only and never logged); up to 50 proxy_bypass_hosts go around it, directly. Not with ip_country_code. A failure of the proxy answers 424 proxy_error, not billed. - [Element capture, waits and failure conditions](https://screenshotbase.com/docs/take/#selector): selector captures one element (shadow DOM through >>> and pierce/) or clip_* a region, omit_background keeps PNG and WebP transparent, wait_for_selector waits for up to 1,000 elements, wait_until takes a list, navigation_timeout bounds the navigation alone; fail_if_content_contains/_missing, fail_if_request_failed and error_on_selector_not_found fail a render instead of returning it, free for the first 25 such failures a day per account and billed 1 after that. - [Page actions and scripts](https://screenshotbase.com/docs/take/#actions): actions runs up to 20 typed steps on the page before the capture (click, hover, type, press, select, scroll, wait_for_selector, wait, wait_for_navigation, evaluate, click_accept, press_escape), each optional or not and with its own timeout_ms (5 s by default), settling the page after a step that navigates; scripts runs up to 50 KB of JavaScript after them and scripts_wait_until waits for load events after that. Actions cost nothing extra; X-Actions-Completed says how many steps completed. A step that fails answers 422 action_failed, free for the first 25 failures a day per account (shared with the failure conditions) and billed 1 after that. Once an evaluate step or the scripts ran, any failure that is not ours is billed 1 (that code could read the page). click_accept clicks only inside a cookie consent dialog. Async jobs report the steps as result.actions and X-Actions-Completed. - [Device emulation and request blocking](https://screenshotbase.com/docs/take/#viewport_device): viewport_device with the devices of GET /v1/devices (free): their viewport, device scale factor (at most 3), mobile and touch emulation and user agent; dark_mode, reduce_motion (animations end, videos pause, GIFs on their first frame) and media_type; block_trackers (EasyPrivacy's host rules), block_requests (up to 100 URL patterns) and block_resources (by kind of request). Free: a render costs what its format costs. - [Full-page engine](https://screenshotbase.com/docs/take/#full_page_scroll): full_page scrolls the page first (full_page_scroll, by full_page_scroll_by every full_page_scroll_delay ms, 100 by default) so lazy images load, expands pages that scroll inside an element of their own, draws bars fixed to the bottom at the end of the page (fix_sticky) and captures long pages in tiles: up to 20,000 CSS px (full_page_max_height; 100,000 with async=true). An image larger than its format holds is scaled to fit by default (full_page_overflow: scale, png or error); X-Full-Page-Scaled and X-Full-Page-Truncated say so. - [Desktop platform profile](https://screenshotbase.com/docs/take/#platform_profile): platform_profile=desktop (the default) renders as Chrome on Windows 11, linux as Chrome on Linux, in the page, its iframes and its workers; desktop draws the Windows font names (Segoe UI, Calibri, Cambria, Consolas, ...) with installed fonts of the same metrics or the closest look. X-Render-Engine names the browser version on every response. - [Output formats and image controls](https://screenshotbase.com/docs/take/#image-output-attributes): format avif, svg (the screenshot as a PNG inside an SVG) and html (the rendered DOM, as a sandboxed download); gif made by sharp; image_width and image_height up to 16,384 px; max_file_size from 1 KB to 50 MB; png_compression, png_palette and png_colors; preset og, x_card, linkedin and thumbnail; show_url and show_timestamp; response_type=json for every format. - [Markdown input](https://screenshotbase.com/docs/html/#markdown-input): Markdown (GitHub flavor, up to 1 MB) in the body of POST /v1/take rendered like HTML input, as an image, a PDF or markdown, in a readable default style. HTML input up to 10 MB, and up to 50 MB with async=true. - [PDF documents](https://screenshotbase.com/docs/pdf/#headers-and-footers): PDFs of up to 200 pages; A0 to A6, Letter, Legal, Tabloid and Ledger or any page up to 200 x 200 inches; header and footer templates (up to 16 KB each) with {page}, {total}, {date}, {title} and {url}; a document outline from the headings; tagged PDFs by default; page-break helper classes; X-Pdf-Truncated when a PDF was cut. - [Render diagnostics and best_attempt](https://screenshotbase.com/docs/take/#diagnostics): Every render answers X-Render-Status, X-Target-Status, X-Target-Final-Url, Server-Timing, X-Requests, X-Cookie-Banner, X-Images-Pending and X-Console-Errors; diagnostics=true answers them as JSON with a signed 24-hour link to a HAR of the page's requests (no bodies, cookies or credentials), billed like the render; best_attempt=true captures a page that is not ready in time as it is (X-Render-Status: partial, billed), keeping the last 5 seconds for the capture. - [Challenge and error pages](https://screenshotbase.com/docs/take/#ignore_host_errors): Every render of a URL answers X-Target-Status, the HTTP status of the page's document, and X-Blocked-By for a bot challenge or block page (cloudflare, akamai, perimeterx, datadome, imperva, aws_waf, kasada, sucuri, vercel, captcha), told by what only that page carries and decided on the page as it is captured, after the waits and the delay. ignore_host_errors=false answers such a page, or an HTTP status of 400 or more, with 424 target_blocked (blocked_by in the body) or target_http_error (target_status), not billed, instead of capturing it. - Built, not switched on yet (not available): Compatibility endpoints for other screenshot APIs. ## SDKs Any HTTP client works: send the API key in the `apikey` header. - [Ruby: screenshotapi](https://rubygems.org/gems/screenshotapi) (RubyGems 0.1.1): not verified. - [PHP: everapi/screenshotbase-php](https://packagist.org/packages/everapi/screenshotbase-php) (Packagist 0.1.0): works. take() takes an array of parameters: take(['url' => 'https://example.com']). - [Go: github.com/everapihq/screenshotbase-go](https://pkg.go.dev/github.com/everapihq/screenshotbase-go) (Go modules 0.1.1): not verified. - [R: screenshotbase](https://cran.r-project.org/package=screenshotbase) (CRAN 0.1.0): works, with a known issue. Error responses are returned as data instead of raising an error. ## Parameters of GET /v1/take - `url` (string, required; at most 8,192 characters): The URL of the page to capture. - `format` (string; jpg, png, gif, webp, pdf, markdown, avif, svg, html; default png): Output format. - `quality` (integer; 0-100; default 80): Image quality, 0-100 (jpg, webp and avif; png, gif and svg ignore it). - `full_page` (boolean; default false): Capture the full scrollable page instead of just the viewport (images only; a PDF follows its paper size). - `viewport_width` (integer; 1-7680; default 1280): Viewport width in pixels (1-7680). - `viewport_height` (integer; 1-16384; default 800): Viewport height in pixels (1-16384), within the device pixel limit of `viewport_width`. - `device_scale_factor` (number; 0.5-3; default 1): Device scale factor (device pixel ratio) used when rendering the page. - `full_page_scroll` (boolean; default true): With `full_page`: scroll the page down before the capture so that lazy-loaded images and content load, then back to the top. - `full_page_scroll_delay` (integer; 0-5000; default 100): Milliseconds to wait after each scroll step (0-5000). - `full_page_scroll_by` (integer; 100-16384): CSS pixels per scroll step (100-16384); by default the viewport's height. - `full_page_max_height` (integer; 1-20000): The most of the page captured, in CSS pixels: 1-20000, 1-100000 with `async=true` (the default is the maximum). - `full_page_scroll_container` (string; at most 255 characters): A CSS selector of the element the page scrolls in, for pages laid out as an app shell (`html` and `body` as tall as the window). - `fix_sticky` (boolean; default true): With `full_page`: bars fixed to the bottom of the window are drawn at the end of the page instead of in the middle of the image, and sticky elements where the page puts them. - `freeze_viewport_units` (boolean; default false): Keeps elements sized in viewport units (`vh`, `svh`, `dvh`, ...) at the window's size during the capture. - `full_page_overflow` (string; scale, png, error; default scale): What happens to a full page larger than its format holds (WebP 16,383 px a side, AVIF and SVG 16,384, JPEG 65,500, GIF 65,535 and 25 megapixels, in device pixels): `scale` captures it smaller to fit (`X-Full-Page-Scaled` gives the scale), `png` returns it as a PNG instead, `error` answers `422` `output_too_large_for_format`, also for a page taller than `full_page_max_height`. - `ip_country_code` (string; one of 117 values): Capture from an exit IP in the given country (ISO 3166-1 alpha-2). - `viewport_device` (string; at most 100 characters): A device to emulate, by the id `GET /v1/devices` lists (or its name, e.g. - `viewport_mobile` (boolean): Emulate a mobile browser (the page's meta viewport is applied). - `viewport_has_touch` (boolean): Emulate a touch screen (`pointer: coarse`, touch events). - `viewport_landscape` (boolean; default false): Landscape: a device's viewport is turned (width and height swapped) and the screen orientation is landscape. - `dark_mode` (boolean): `true` renders the page with `prefers-color-scheme: dark`, `false` with `prefers-color-scheme: light`. - `reduce_motion` (boolean; default false): Renders the page with `prefers-reduced-motion: reduce` and holds it still for the capture: animations and transitions end (endless ones pause), videos pause and GIFs show their first frame. - `media_type` (string; screen, print): The CSS media type of a screenshot or markdown: `print` applies the page's print styles. - `block_trackers` (boolean; default false): Block the requests of known trackers (the host rules of EasyPrivacy) before they are sent. - `block_requests` (array; at most 100 items): URL patterns of requests to block, at most 100 of at most 2048 characters. - `block_resources` (array; at most 14 items): Kinds of requests to block, as a list or comma separated (`block_resources=image,font`). - `proxy` (string; at most 2,048 characters): Render through your own proxy: `scheme://[user[:password]@]host[:port]` with the scheme `http`, `https` (TLS to the proxy, its certificate verified), `socks5` (host names resolve on our side, the proxy gets the address) or `socks5h` (host names resolve at the proxy). - `proxy_bypass_hosts` (array; at most 50 items): Hosts that do not go through `proxy` but are loaded directly, with the same checks as without a proxy: a host name or IP address (that host only), or `*.` and a domain (every host below it, not the domain itself). - `delay` (integer; 0-30; default 0): Seconds to wait after load before capturing (0-30), for every format and for HTML input. - `timeout` (integer; 5-105; default 60): Navigation timeout in seconds (5-105). - `wait_until` (string; load, domcontentloaded, networkidle0, networkidle2; default load): The navigation lifecycle event to wait for before capturing (case-insensitive), or a list of 1 to 4 of them, comma separated (`load,networkidle0`) or as `wait_until[]=`: the render waits for all of them, also after a navigation of the page's own. - `platform_profile` (string; desktop, linux; default desktop): The platform the page sees (case-insensitive). - `selector` (string; at most 1,000 characters): Capture the first element this selector matches instead of the viewport (images only). - `selector_scroll_into_view` (boolean; default true): Scroll the element of `selector` into view before capturing it. - `error_on_selector_not_found` (boolean; default false): Answer 422 `selector_not_found` (the first 25 a day free, then billed 1) when no element matches `selector`, instead of capturing the viewport. - `clip_x` (integer; 0-100000; default 0): Left edge of the region to capture, in CSS pixels of the page (images only). - `clip_y` (integer; 0-100000; default 0): Top edge of the region to capture, in CSS pixels of the page. - `clip_width` (integer; 1-7680): Width of the region to capture; with `clip_height` (and optionally `clip_x`, `clip_y`) the image is that region of the page. - `clip_height` (integer; 1-16384): Height of the region to capture. - `omit_background` (boolean; default false): Capture without the browser's white background, so a page without a background of its own comes out transparent. - `wait_for_selector` (string; at most 1,000 characters): Wait until this selector matches (CSS, `>>>`, `pierce/`) before capturing, within `timeout`. - `wait_for_selector_count` (integer; 1-1000; default 1): Wait until at least this many elements match `wait_for_selector`. - `navigation_timeout` (integer; 1-105): Timeout in seconds of the navigation alone (until `wait_until`); `timeout` stays the timeout of the other waits. - `fail_if_content_contains` (array; at most 20 items): Answer 422 `content_condition_failed` (the first 25 a day free, then billed 1) when the text the page shows contains any of these (case and white space do not count). - `fail_if_content_missing` (array; at most 20 items): Answer 422 `content_condition_failed` (the first 25 a day free, then billed 1) when the text the page shows lacks any of these. - `fail_if_request_failed` (array; at most 20 items): Answer 424 `request_failed` (the first 25 a day free, then billed 1) when a request of the page whose URL matches one of these patterns failed: a network error, or an HTTP status of 400 or more. - `actions` (string): Steps to run on the page before it is captured, in order: a JSON array of at most 20 step objects (or `actions[0][type]=click&actions[0][selector]=%23accept`). - `scripts` (string): JavaScript to run in the page after the actions, as the body of an async function (it may `await`; what it returns is dropped). - `scripts_wait_until` (array; at most 4 items): Only with `scripts`: the events to wait for after them, one or a list (`load,networkidle0`): in the page they navigated to, else in the one they ran in. - `block_cookie_banners` (boolean): Attempt to hide cookie-consent banners before capturing. - `block_ads` (boolean): Attempt to block ads before capturing. - `block_chats` (boolean): Attempt to hide chat widgets before capturing. - `hide_selectors` (array; at most 50 items): CSS selectors of elements to hide before capturing (at most 50). - `styles` (string; at most 10,000 characters): Custom CSS to inject before capturing (max 10000 chars). - `pdf_paper_format` (string; A4, Letter, Legal, A3, A0, A1, A2, A5, A6, Tabloid, Ledger; default A4): Paper size of a PDF (case-insensitive): A0 to A6, Letter, Legal, Tabloid (11 x 17 in) or Ledger (17 x 11 in); `pdf_width` and `pdf_height` set any other size. - `pdf_landscape` (boolean; default false): Print a PDF in landscape orientation. - `pdf_margin` (string; at most 100 characters; default 0): PDF page margin as a CSS length in mm, cm, in or px (a bare number is px), at most 4in per side, or 2 to 4 lengths as in the CSS `margin` shorthand (`10mm 20mm` = top and bottom 10mm, left and right 20mm). - `pdf_margin_top` (string; at most 20 characters): Top margin of a PDF page (a CSS length, see `pdf_margin`). - `pdf_margin_right` (string; at most 20 characters): Right margin of a PDF page (a CSS length, see `pdf_margin`). - `pdf_margin_bottom` (string; at most 20 characters): Bottom margin of a PDF page (a CSS length, see `pdf_margin`). - `pdf_margin_left` (string; at most 20 characters): Left margin of a PDF page (a CSS length, see `pdf_margin`). - `pdf_print_background` (boolean; default true): Print background colors and images in a PDF. - `pdf_media_type` (string; print, screen; default print): CSS media type a PDF is printed with: `print` uses the page's print stylesheet (like "Save as PDF" in a browser), `screen` prints the page as it looks on screen. - `pdf_scale` (number; 0.1-2; default 1): Scale of the page rendering in a PDF. - `pdf_page_ranges` (string; at most 255 characters): Pages of a PDF to include, such as `1-3,5,8-` (pages count from 1; `8-` = page 8 to the end). - `pdf_fit_one_page` (boolean; default false): Print the whole page on a single PDF page as wide as the paper (`pdf_paper_format`, turned by `pdf_landscape`) and as tall as the content, at most 200 inches; anything below is cut (`X-Pdf-Truncated: height`). - `pdf_width` (string; at most 20 characters): Page width of a PDF as a CSS length in mm, cm, in or px (a bare number is px), more than 0 and at most 200in; replaces the width of `pdf_paper_format` (`pdf_landscape` still turns the page). - `pdf_height` (string; at most 20 characters): Page height of a PDF as a CSS length, like `pdf_width`; replaces the height of `pdf_paper_format`. - `pdf_prefer_css_page_size` (boolean; default false): Print a PDF in the page size the page's own CSS sets (`@page { size }`) instead of `pdf_paper_format`, `pdf_width`/`pdf_height` and `pdf_landscape`. - `pdf_outline` (boolean; default false): Add a document outline (the bookmarks a PDF viewer shows) built from the page's headings. - `pdf_tagged` (boolean; default true): Write a tagged PDF: its structure (headings, paragraphs, tables) for screen readers and text extraction. - `markdown_main_content_only` (boolean; default true): For markdown: only the main content (the article, without navigation, sidebars, headers, footers and banners). - `response_type` (string; text, json; default text): `json` answers JSON instead of the file (case-insensitive). - `attachment_name` (string; at most 255 characters): Filename (without extension) for the downloaded file; the extension of the format is appended (`.md` for markdown). - `upload` (boolean; default false): When `true`, stores the result (markdown as a `.md` file) and returns a JSON object with its public URL instead; `response_type` does not apply then. - `image_width` (integer; 1-16384): Width of the returned image in pixels (1-16384), images only. - `image_height` (integer; 1-16384): Height of the returned image in pixels (1-16384), images only; see `image_width`. - `max_file_size` (integer; 1024-52428800): The most bytes the image may have (1024-52428800). - `png_compression` (integer; 0-9): zlib compression level of png (and the PNG inside an svg), 0-9: higher is smaller and slower. - `png_palette` (boolean; default false): png (and svg) with a palette of at most 256 colors (`png_colors`): much smaller for pages of flat colors and text. - `png_colors` (integer; 2-256): The most colors of the palette (2-256; implies `png_palette`). - `preset` (string; og, x_card, linkedin, thumbnail): Sets the parameters of a common image the request does not set itself: `og` (Open Graph, 1200 x 630), `x_card` (X's large card, 1200 x 600), `linkedin` (1200 x 627), each jpg at most 300,000 bytes, and `thumbnail` (a 1280 x 800 page as a 400 x 250 jpg of at most 50,000 bytes): viewport, device_scale_factor 1, format, image_width, image_height and max_file_size. - `show_url` (boolean; default false): Images only: a strip on top of the image with the page's URL (after redirects; none for HTML input). - `show_timestamp` (boolean; default false): Images only: the time of the capture (UTC, to the second) in the strip on top of the image (see `show_url`). - `async` (boolean; default false): When `true`, the request answers `202` at once with a job instead of the result, and the page is rendered in the background with a time limit of 300 seconds from the start of its render (`timeout` up to 295; on the free plan 120 seconds, `timeout` up to 115). - `webhook_url` (string; at most 2,048 characters): Only with `async=true`: an https URL of a public host that gets a signed POST (`screenshot.completed` or `screenshot.failed`, the job as `GET /v1/jobs/{job_id}` shows it) when the job is done. - `external_identifier` (string; at most 255 characters): Only with `async=true`: your own reference (printable ASCII), returned with the job, as `X-External-Identifier` and in the webhook (also as `X-Screenshotbase-External-Identifier`). - `Idempotency-Key` (string; at most 255 characters): With `async=true`: a key of 1 to 255 printable ASCII characters without spaces. - `diagnostics` (boolean; default false): When `true`, the response is the render's diagnostics as JSON (`RenderDiagnosticsResult`) instead of the file: its status, the target's HTTP status and final URL, the time of each stage, request, console and network counts, whether a cookie banner was on screen, and a signed link (24 hours) to a HAR of the page's requests without bodies, cookies or credentials. - `best_attempt` (boolean; default false): When `true`, a page that does not finish loading (or whose waits do not end) within `timeout` or the time limit is captured as it is once it has started to arrive, instead of failing with `408`: the response then carries `X-Render-Status: partial` and is billed like any render. - `ignore_host_errors` (boolean; default true): Whether a target that answers with a bot challenge or block page (Cloudflare, Akamai, PerimeterX, DataDome, Imperva, AWS WAF, Kasada, Sucuri, Vercel or a CAPTCHA wall) or with an HTTP error status (400 or more) is captured anyway (`true`, the default) or fails the request (`false`): with `424` and the error code `target_blocked` (`blocked_by` in the body names the vendor) or `target_http_error` (`target_status`), not billed. - `headers` (array): Extra request headers, each as `Name: value` (`headers[]=X-Api-Key: abc`; `headers[X-Api-Key]=abc` works too), at most 50 and 8 KB together. - `headers_scope` (string; target, all; default target): Which requests get `headers`: `target` (the origin of `url`: same scheme, host and port) or `all` (every request the page makes, third parties included). - `cookies` (array): Cookies the browser has before it loads `url`, each as a `Set-Cookie` value (`session=abc; Path=/; Secure; HttpOnly; SameSite=Lax`; `cookies[session]=abc` works too), at most 50 of at most 4 KB each. - `authorization` (string; at most 8,192 characters): An `Authorization` header for the origin of `url` only, sent with the first request (never as an answer to a 401, and never to a redirect target on another origin): `Basic ` or `Bearer `. - `user_agent` (string; at most 512 characters): The browser's user agent, sent as given (printable ASCII); client hints (`Sec-CH-UA-*`) follow it for a Chrome user agent. - `time_zone` (string; at most 64 characters): The browser's time zone, an IANA name such as `Europe/Berlin` or `UTC`. - `locale` (string; at most 35 characters): The browser's locale (`Intl`, `navigator.language`), a language tag such as `de-DE`. - `accept_language` (string; at most 256 characters): The languages of the `Accept-Language` header and `navigator.languages`, in order (`de-DE,de;q=0.9,en;q=0.8`); the browser sets the weights. - `geolocation_latitude` (number; -90-90): The position the page's geolocation API returns, with `geolocation_longitude` (both or neither). - `geolocation_longitude` (number; -180-180): The longitude of the position, with `geolocation_latitude`. - `geolocation_accuracy` (number; 0-100000): The accuracy of the position in meters, with the latitude and longitude. - `bypass_csp` (boolean; default false): Ignore the page's Content-Security-Policy, so that what it forbids (inline scripts, injected styles) runs. - `POST /v1/take` takes the same parameters as a JSON body, plus `html`: HTML to render instead of a URL, at most 10 MB (10,485,760 bytes of UTF-8), with `async=true` 50 MB (52,428,800 bytes). ## Optional - [Pricing & plans](https://screenshotbase.com/pricing/)