Loading
Loading
Capture websites exactly as users experience them - full-page, scrolling, and dynamic. Generate pixel-perfect screenshots or videos (MP4, GIF, WebM) from any public or protected URL with complete browser control.
Pass the target URL and optional rendering parameters as query strings. The API launches a headless browser, renders the page, and returns a JSON response containing the screenshot URL and metadata. Use the output=image parameter to receive the raw image bytes directly instead.
Authorize every request with your API key, passed either as a header or as a query parameter:
X-apiKeyapiKeyThis is version v1.0 of the API.
Pass parameters as query strings appended to the endpoint URL. Only url and apiKey are required - all other parameters are optional with sensible defaults.
urlrequiredStringURL of the website to be rendered as a screenshot or other format.
outputoptionalStringdefault: jsonSet the output format. json returns metadata with a hosted file URL. image streams the raw file bytes directly.
formatoptionalStringdefault: jsonjson.file_typeoptionalStringdefault: PNGOutput format. PNG (lossless, transparency), JPEG (compressed, smaller size), WebP (modern, efficient), PDF (document). For scrolling captures: MP4, GIF, WebM.
image_qualityoptionalIntegerdefault: 80Compression level for JPEG output (0-100). Lower = smaller file, higher = better quality. Only applies to JPEG.
omit_backgroundoptionalBooleandefault: falseReplaces simple white/plain backgrounds with transparency for a cut-out effect. Only works with PNG output.
pdf_options[format]optionalStringA0, A1, A2, A3, A4, A5, A6, Letter, Legal, Tabloid, or Ledger.pdf_options[landscape]optionalBooleandefault: falseRenders the PDF in landscape orientation, swapping the width and height of the paper size. Applies when file_type is PDF.
pdf_options[page_range]optionalStringPages to keep in the PDF, as start-end, for example 1-3 or 5-5. Pages are rendered first and then trimmed. Has no effect on a single-page PDF. Applies when file_type is PDF.
pdf_options[media]optionalStringprint or screen.pdf_options[print_background]optionalBooleandefault: falseIncludes background colors and images in the PDF. Applies when file_type is PDF.
result_file_nameoptionalStringdefault: Custom name for the output file. Helps with organized storage and retrieval. Note: non-unique names may overwrite existing files.
ttloptionalIntegerdefault: 2592000Time in seconds the render stays cached before auto-invalidation. Use higher values for static pages, lower for dynamic content. Default: 2592000 (30 days).
freshoptionalBooleandefault: trueIf true, bypasses cache and captures a fresh render. If false, returns cached version when available.
enable_cachingoptionalBooleandefault: falseStores the render in cache for reuse on subsequent identical requests.
destroy_screenshotoptionalBooleandefault: falseIf true, screenshot/PDF is not stored on server and must be downloaded immediately.
fail_on_erroroptionalBooleandefault: falseIf true, returns an error when the target page responds with 4xx or 5xx status.
widthoptionalIntegerdefault: 1680Viewport width in pixels. Simulates device screen sizes. Max: 7680.
heightoptionalIntegerdefault: 867Viewport height in pixels. Controls how much vertical area is visible. Max: 4320.
full_pageoptionalBooleandefault: falseCaptures the entire webpage from top to bottom, including scrollable content outside the viewport. Ideal for long-form pages.
thumbnail_widthoptionalIntegerSpecifies the width of the thumbnail in pixels. Default value is 0 (meaning no specific value is set, and the screenshot is returned at its original resolution).
retinaoptionalBooleandefault: falseCaptures at 2x resolution for sharper, high-DPI output. Increases file size.
clip[x]optionalIntegerX coordinate (in pixels) for the top-left corner of the clip area. Default: null.
clip[y]optionalIntegerY coordinate (in pixels) for the top-left corner of the clip area. Default: null.
clip[width]optionalIntegerWidth of the clip area in pixels. Default: null.
clip[height]optionalIntegerHeight of the clip area in pixels. Default: null.
adjust_topoptionalIntegerdefault: 0Initial vertical scroll position in pixels before capture. Use to position mid-page content in viewport. Not supported for PDF.
wait_for_eventoptionalStringdefault: loadControls when rendering starts based on page load lifecycle. load (all resources), domcontentloaded (HTML parsed), networkidle (no network activity for 500ms).
delayoptionalIntegerdefault: 0Wait period in milliseconds before capture. Allows animations, API responses, and dynamic elements to finish rendering.
lazy_loadoptionalBooleandefault: falseAutomatically scrolls the page to trigger lazy-loaded images and components. Ensures complete content capture.
scroll_delayoptionalIntegerdefault: 500Delay in milliseconds between scroll steps when lazy_load is enabled. Use higher values for heavy pages.
timeoutoptionalIntegerdefault: 100000Maximum wait in milliseconds for page load before aborting. Adjust for slow/heavy pages. Default: 100000 (100s).
selectoroptionalStringdefault: CSS selector to capture a specific element. Only that element is rendered. Falls back to full page if not found. Default: empty.
scroll_to_elementoptionalStringdefault: Scrolls the page to bring the specified CSS selector into view before capture. Ideal for below-the-fold content. Default: empty.
selector_to_clickoptionalStringdefault: CSS selector for an element to click before capturing the screenshot. Useful for opening dropdowns, modals, or triggering content.
click_recursionoptionalIntegerdefault: 1Number of times to click the selector (when set via selector_to_click).
blur_selectoroptionalStringdefault: CSS selectors to blur before capture. Masks sensitive data like emails, payments, or personal info. Multiple selectors supported. Default: empty.
remove_selectoroptionalStringdefault: CSS selectors to remove before capture. Deletes matched elements from DOM. Ideal for cleaning ads, popups, sidebars. Multiple selectors supported. Default: empty.
cssoptionalStringdefault: Allows injecting custom CSS code into the page before rendering. Pass the CSS code directly as a string.
css_urloptionalStringdefault: Allows loading external CSS into the page. Provide a URL pointing to the CSS file.
jsoptionalStringdefault: Allows injecting custom JavaScript code into the page before rendering. Pass the JavaScript code directly as a string.
js_urloptionalStringdefault: Allows loading external JavaScript into the page. Provide a URL pointing to the script file.
custom_htmloptionalStringdefault: Custom HTML to render instead of loading a URL. Overrides the url option. Use for capturing specific HTML structures or dynamic content.
markdownoptionalStringMarkdown to render instead of loading a URL. Works like custom_html, so you can capture a README or notes without hosting a page.
user_agentoptionalStringdefault: Custom User-Agent string sent in the request headers.
accept_languagesoptionalStringdefault: en-US,en;q=0.8Sets the accepted languages for the HTTP request. This is sent as the Accept-Language header.
dark_modeoptionalBooleandefault: falseWhen set to true, websites that support prefers-color-scheme: dark will render in dark mode.
grayscaleoptionalIntegerdefault: 0Applies a grayscale filter to the screenshot. Requires a value from 0 (no effect) to 100 (fully grayscale).
enable_incognitooptionalBooleandefault: falseEnables private/incognito browsing. Each render starts with a clean slate - no cookies, cache, or session data persisted.
headersoptionalStringCustom HTTP headers to include as key=value pairs. Use a semicolon to separate multiple headers (e.g., key1=value1;key2=value2).
cookiesoptionalStringdefault: Cookies to include in the request before rendering. Supports single or multiple cookies. Example: cookie=value; otherCookie=otherValue;.
longitudeoptionalFloatSpecify longitude for the browser Geolocation API. Provide a numeric value. Default: null (not set).
latitudeoptionalFloatSpecify latitude for the browser Geolocation API. Provide a numeric value. Default: null (not set).
timezoneoptionalStringIANA timezone the browser uses while rendering, such as Asia/Karachi or Europe/London. Useful for clocks and localized dates.
block_adsoptionalBooleandefault: falseBlocks requests to known ad networks for cleaner, distraction-free screenshots.
block_chat_widgetsoptionalBooleandefault: falseBlocks live chat popups, support bubbles, and messaging interfaces.
block_trackingoptionalBooleandefault: falseBlocks tracking scripts and analytics services for cleaner, privacy-oriented renders.
no_cookie_bannersoptionalBooleandefault: falseHides or blocks cookie consent banners and popups before capture.
block_jsoptionalBooleandefault: falseDisables all JavaScript execution. Renders a static version of the page. Speeds up capture but may break dynamic content.
block_stylesheetsoptionalBooleandefault: falseBlocks all stylesheets - page renders as raw HTML without visual formatting.
block_imagesoptionalBooleandefault: falseBlocks all image resources (jpg, png, gif, webp, svg, etc.) for faster rendering.
block_mediaoptionalBooleandefault: falseBlocks audio and video resources (mp3, mp4, webm, etc.) from loading.
block_fontoptionalBooleandefault: falseBlocks external font files - page falls back to system defaults. Supported: woff, woff2, ttf, otf, eot.
block_text_trackoptionalBooleandefault: falseBlocks subtitles and caption overlays from loading.
block_xhroptionalBooleandefault: falseBlocks all XMLHttpRequest (AJAX) calls - prevents dynamic API-driven content.
block_fetchoptionalBooleandefault: falseBlocks all Fetch API requests - stops async data loading.
block_event_sourceoptionalBooleandefault: falseBlocks EventSource (SSE) connections - prevents real-time data streams.
block_web_socketoptionalBooleandefault: falseBlocks WebSocket connections - prevents real-time bidirectional communication.
block_manifestoptionalBooleandefault: falseBlocks manifest files (.json, .webmanifest) - disables PWA-related functionality.
block_specific_requestsoptionalStringdefault: Fine-grained blocking of specific URLs or patterns. Separate multiple rules by comma, space, or newline. Default: empty.
extract_textoptionalBooleandefault: falseStrips all HTML and returns visible text as a .txt file. Ideal for text analysis, indexing, or AI pipelines. Only with output=json.
extract_htmloptionalBooleandefault: falseReturns rendered HTML as a .html file (includes JS-executed DOM). Only available with output=json.
extract_markdownoptionalBooleandefault: falseExtracts rendered page content as a structured .md (Markdown) file. Preserves headings, lists, links. Only with output=json.
get_image_urlsoptionalBooleandefault: falseExtracts all image URLs from the rendered DOM and returns them in structured format. Only with output=json.
stealthoptionalBooleandefault: falseMakes the browser look like a regular visitor for pages that block automated traffic. No extra credits.
gpuoptionalBooleandefault: falseRenders the page with a GPU, including WebGL and canvas content. Adds 20 credits per request.
proxyoptionalStringAllows defining a proxy for the connection. Provide a JSON string with keys: server (include port number), username, and password.
classic_proxyoptionalBooleandefault: falseLoads the page through a datacenter proxy. Adds 20 credits per request. Ignored when premium_proxy is true or a custom proxy is set.
premium_proxyoptionalBooleandefault: falseLoads the page through a residential proxy. Adds 200 credits per request. Used instead of classic_proxy.
countryoptionalStringTwo-letter country code, such as US or DE, for the exit address of classic_proxy or premium_proxy. Ignored when you send your own proxy. Any two-letter code is sent, including one that is not listed.
solve_captchaoptionalBooleandefault: falseSolves a captcha made of text drawn in a picture, then takes the screenshot. Requires captcha_image and captcha_input. Adds 20 credits per request.
captcha_imageoptionalStringCSS selector of the captcha picture. Required when solve_captcha is true.
captcha_inputoptionalStringCSS selector of the box the answer is typed into. Required when solve_captcha is true.
captcha_submitoptionalStringCSS selector of the button to click after the answer is typed.
captcha_erroroptionalStringCSS selector of the message shown for a wrong answer. While it is visible, the solver tries again.
captcha_refreshoptionalStringCSS selector of the control that loads a new captcha picture before the next try.
captcha_retriesoptionalIntegerdefault: 3Number of guesses the solver makes, from 1 to 5.
ocr_modeloptionalStringdefault: mini-ocr-v1mini-ocr-v1 (default) or ocr-v1.Use these additional parameters when capturing scrolling screenshots as a video. Set scrolling_screenshot=true on any URL in the batch to enable scrolling capture mode.
Scrolling captures can be exported in multiple video formats. Use the file_type parameter to choose the output format:webm, mp4, or gif.
Example:scrolling_screenshot=true&file_type=mp4will generate an MP4 video of the page being automatically scrolled from top to bottom.
scrolling_screenshotoptionalBooleandefault: falseEnables scrolling screenshot mode to capture a video (webm, gif, mp4) of the webpage.
multiple_scrollingoptionalBooleandefault: falseCaptures multiple scrolling screenshots at different viewport sizes in one request. Requires the sizes parameter.
sizesoptionalStringComma-separated list of screen sizes in the format index:WIDTHw:HEIGHTh, for example 0:1280w:720h,1:390w:844h. Required when multiple_scrolling is true.
file_typeoptionalStringdefault: MP4Output format for scrolling capture. Possible values:
WEBMWeb-optimizedMP4Widely compatible (default)GIFShort loopsscroll_speedoptionalStringdefault: normalfast, normal (default), or slow. Affects render time and output pacing.durationoptionalIntegerDuration of scrolling action in seconds (0-60). Higher = longer video. Default: null (full page scroll).
scroll_backoptionalBooleandefault: falseIf true, scrolls to bottom then back to top, creating a seamless loop.
start_immediatelyoptionalBooleandefault: falseStarts recording immediately without waiting for full page load.
videooptionalBooleandefault: falseRecords visible viewport only for a specified duration. Use with duration parameter. Ideal for dashboards and animations.
A successful request returns a 200 OK response with a JSON object. The core fields are always present; any request parameter passed with a non-default value is echoed back in the response.
screenshotSpecifies the file type for the output.
urlThe original URL that was captured.
created_atTimestamp when the screenshot was created (ISO 8601 format).
formatResponse format type.
ttlTime until the screenshot expires (ISO 8601 format).
file_typeThe file type of the output.
extracted_htmlURL of the extracted HTML from the webpage.
extracted_textURL of the extracted plain text from the webpage.
enable_cachingWhether caching was enabled (true/false).
omit_backgroundWhether background was removed (true/false).
destroy_screenshotWhether the screenshot was destroyed after generation (true/false).
fail_on_errorWhether the request failed on error (true/false).
longitudeThe longitude value used for geolocation.
latitudeThe latitude value used for geolocation.
proxyThe proxy configuration used for the request.
no_cookie_bannersWhether cookie banners were blocked (true/false).
block_adsWhether ads were blocked (true/false).
headersThe custom headers that were included in the request.
cookiesThe cookies that were included in the request.
scroll_to_elementThe element that was scrolled to before rendering.
selectorThe element that was selected for rendering.
blur_selectorThe elements that were blurred in the output.
remove_selectorThe elements that were removed from the output.
cssThe custom CSS that was injected into the page.
css_urlThe external CSS URL that was loaded.
jsThe custom JavaScript that was injected.
js_urlThe external JavaScript URL that was loaded.
user_agentThe User-Agent string that was used.
accept_languagesThe Accept-Language header that was used.
delayThe delay duration that was applied in milliseconds.
thumbnail_widthThe thumbnail width that was used in pixels.
outputThe output type that was used.
freshWhether a fresh render was performed (true/false).
enable_cachingWhether caching was enabled (true/false).
lazy_loadWhether lazy loading was triggered (true/false).
full_pageWhether full page capture was used (true/false).
retinaWhether retina capture was used (true/false).
heightThe viewport height that was used in pixels.
widthThe viewport width that was used in pixels.
custom_htmlThe custom HTML content that was rendered.
block_chat_widgetsWhether chat widgets were blocked (true/false).
block_jsWhether JavaScript was blocked (true/false).
block_stylesheetsWhether stylesheets were blocked (true/false).
block_imagesWhether images were blocked (true/false).
block_mediaWhether media files were blocked (true/false).
block_fontWhether fonts were blocked (true/false).
block_text_trackWhether text tracks were blocked (true/false).
block_xhrWhether XHR requests were blocked (true/false).
block_fetchWhether Fetch API requests were blocked (true/false).
block_event_sourceWhether EventSource connections were blocked (true/false).
block_web_socketWhether WebSocket connections were blocked (true/false).
block_manifestWhether manifest files were blocked (true/false).
block_specific_requestsThe specific requests that were blocked.
adjust_topThe vertical position that was scrolled to in pixels.
image_qualityThe image quality level that was applied.
extract_htmlWhether HTML content was extracted (true/false).
extract_textWhether text content was extracted (true/false).
dark_modeWhether dark mode was enabled (true/false).
block_trackingWhether tracking scripts were blocked (true/false).
wait_for_eventThe event that triggered the rendering to start.
grayscaleThe grayscale level that was applied (0-100).
clipThe dimensions of the clipped area that was captured.
result_file_nameThe final filename used for the output file.
enable_incognitoWhether incognito mode was enabled (true/false).
timeoutThe actual timeout duration that was applied in milliseconds.
scrolling_screenshotWhether scrolling screenshot mode was enabled (true/false).
multiple_scrollingWhether multiple scrolling captures were performed (true/false).
sizesThe dimensions used for each capture in the array.
extract_markdownWhether markdown extraction was enabled (true/false).
get_image_urlsWhether image URL extraction was enabled (true/false).
scroll_delayThe delay between scroll steps that was applied in milliseconds.
selector_to_clickThe CSS selector of the element that was clicked before capture.
click_recursionThe number of times the selector was clicked.
videoWhether viewport recording mode was enabled (true/false).
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
The target URL redirected too many times (redirect loop), so a final page could not be reached.
Your URL is incorrect
please pass correct parameters
The url parameter is required but was not provided.
The file_type value is not a supported output format.
The proxy value is malformed or invalid.
The latitude or longitude value is outside the allowed range.
The css_url value is not a valid URL.
The js_url value is not a valid URL.
The JavaScript passed in js is invalid and could not be executed.
The clip[x], clip[y], clip[width] or clip[height] values are invalid.
A parameter that expects an integer received an invalid value.
A secure connection could not be established because of an SSL certificate problem on the target site.
The SSL certificate does not match the domain. The site may be down or may have moved.
HTML, Markdown or text extraction is not supported for the requested file_type.
PNG, JPG and WEBP are not supported for scrolling capture. Use a video format such as MP4, WEBM or GIF.
The request was aborted before it completed, for example due to a timeout, network issue or cancellation.
A tunnel connection to the target could not be established. Check the URL and proxy setting.
A tunnel to the target failed. Verify the URL and proxy configuration.
The request took too long to complete. Please try again later.
The target site unexpectedly closed the connection.
The target server closed the connection without returning any data.
The browser and the target website have incompatible SSL/TLS versions or ciphers.