Hashtag
Render a Screenshot

GEThttps://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=URL&[OPTIONS]

The following options for the API call are:

TOKEN: TheTOKENor your API key should be replaced by your real ScreenshotAPI API, you can find your API key after you Sign Up or Log In to the service via the Dashboard page.

Note: If for any reason you need to get a new API key, simply click "Roll API Key" in the "Settings" card on the Dashboard. This will issue you a fresh API key and revoke access from the previous key.

URL: Website URL for the site you would like to render for the screenshot. We support a wide variety of websites types, such as single page apps, very long-content, and sites that require lazy loading or delays ensuring accurate and complete screenshots of these unique sites.

OPTIONS: Options indicates the different URL parameters keys and values that can be used to render your "perfect" screenshot. All the options for screenshots will be detailed below.

Note: Default options for the screenshot will be shown in the Options table below.

Example:

const axios = require("axios");
let config = {	method: "get",	maxBodyLength: Infinity,	url: "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https://apple.com",	headers: { }};
axios.request(config).then((response) => {	console.log(JSON.stringify(response.data));}.catch((error) => {	console.log(error);});

This will render the followingpngimage output when you paste in the above string into your browsers URL bar (replacing TOKEN with your API key):

s

POST https://shot.screenshotapi.net/screenshot

POST mode accepts the exact same parameters in the request body, but you need to use a JSON.

Hashtag
Cached & Fresh screenshot

When you take a screenshot, it automatically get cached on our backend, so when you make a get request to the same URL this will return the same screenshot that got cached, but if you want to take a newer screenshot of the URL provided, you may want to use our fresh screenshot functionality.

Example:

const axios = require("axios");
let config = {	method: "get",	maxBodyLength: Infinity,	url: "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&[OPTIONS]",	headers: { }};
axios.request(config).then((response) => {	console.log(JSON.stringify(response.data));}.catch((error) => {	console.log(error);});

In the following video, you will see an example of how the 'Fresh Screenshot' functionality is used. First, we demonstrate how a regular request to a specific URL is made for the first time, which typically takes a few seconds since it's the initial request. Then, the same request is made a second time, which is much faster because it retrieves the cached screenshot. However, if you want to capture a completely new screenshot without using the cached one, you should click the checkbox labeled 'Fresh screenshot' as shown in the example during the third request in the video.

Hashtag
Remove elements from a page

You can select elements by class name, ID, or other CSS selectors and then add thedisplay: noneattribute to hide them on the inject CSS feature.

Example:

const axios = require("axios");
let config = {	method: "get",	maxBodyLength: Infinity,	url: "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&output=image&file_type=png&wait_for_event=load&css=.module-content%7Bdisplay%3A%20none%7D%0A",	headers: { }};
axios.request(config).then((response) => {	console.log(JSON.stringify(response.data));}.catch((error) => {	console.log(error);});

In the following video, you'll find a more illustrative example of how to use the 'Inject CSS' functionality to remove an element from a page. In the first request, you'll see a standard screenshot to observe the page's initial state. Then, in the second request, we demonstrate how to achieve this by utilizing the 'Inject CSS' feature to remove the desired element.

Hashtag
Essentials

Hashtag
URL

Theurloption specifies the URL of the website to be rendered as a screenshot or other format.

Hashtag
Token

Thetokenoption is your API key for authenticating requests to the Screenshot API.

Hashtag
Features

Hashtag
File Type

Parameter Name : file_type

Available file types:

  • PNG — A widely supported lossless image format. Ideal for high-quality screenshots with transparency support.

  • JPG — A lossy image format best suited for photographs or images with gradients. It offers smaller file sizes but may lose some image quality.

  • WebP — A modern image format that provides superior compression and quality characteristics compared to PNG and JPG. It supports both lossless and lossy compression, making it a versatile choice.

  • PDF — Used for generating screenshot files in a portable document format. Suitable for documents, reports, or multi-page captures.

The default value isPNG.

Hashtag
Omit Background

Parameter Name : omit_background

Available options:

  • true — Removes the background from websites with a basic white background, making it transparent. This is only effective when thefile_typeis set to PNG.

  • false — Keeps the background intact (default behavior).

The default value isfalse.

Hashtag
Destroy Screenshot

Parameter Name : destroy_screenshot

Available options:

  • true — The screenshot (or PDF) will not be stored on the server after it is rendered. It must be downloaded immediately, as it will not be accessible again.

  • false — The screenshot (or PDF) is stored on the server and can be accessed later (default behavior).

The default value isfalse.

Hashtag
Fail On Error

Parameter Name : fail_on_error

Available options:

  • true — The API will return an error if the render encounters a4xxor5XXstatus code. This is useful when you want to ensure the response indicates a failure in case of server or client-side issues during rendering.

  • false — The API will ignore4xxand5xxstatus codes, proceeding without returning an error (default behavior).

The default value isfalse.

Hashtag
Longitude

Parameter Name : longitude

Specify the longitude to be used by the browser's Geolocation API.

  • Provide a numeric value to define the geographical longitude for the rendering context.

  • Default value: null (no longitude set).

Hashtag
Latitude

Parameter Name : latitude

Specify the latitude to be used by the browser's Geolocation API.

  • Provide a numeric value to define the geographical latitude for the rendering context.

  • Default value: null (no latitude set).

Hashtag
Proxy

Parameter Name : proxy

Set a proxy server address for the request.

  • Format:

    • Address and port:address:port.

    • With authentication:username:password@address:port.

  • Use this to route the rendering request through a proxy server, if needed.

  • Default value:' '(no proxy).

Parameter Name : no_cookie_banners

Prevent cookie banners from appearing on websites during the rendering process.

  • When set totrue, cookie banners will be blocked or hidden before the request is rendered.

  • Default value:false.

Hashtag
Block Ads

Parameter Name : block_ads

Prevent advertisements from being displayed on websites during the rendering process.

  • When set totrue, requests from popular ad networks will be blocked before rendering.

  • Default value:false.

Hashtag
Headers

Parameter Name : headers

Specify custom HTTP headers to be included when the request is sent before rendering.

  • Supports single or multiple headers.

  • Example:X-HEADER: value; X-OTHER-HEADER: otherValue;

  • Default value:' '(empty string).

Hashtag
Cookies

Parameter Name : cookies

Define cookies to be included in the request before rendering.

  • Supports single or multiple cookies.

  • Example:cookie=value; otherCookie=otherValue;

  • Default value:' '(empty string).

Hashtag
Scroll To Element

Parameter Name : scroll_to_element

Specify a target element for the browser to scroll to before rendering.

  • Useful for ensuring elements that load within the viewport are captured.

  • Example:#element-id, .class-name

  • Default value:' '(empty string).

Hashtag
Selector

Parameter Name : selector

Specify a target element for rendering based on a matching CSS selector.

  • If the specified element is not found, the render will still return the full result.

  • Example:div > .main-navigation > .logo

  • Default value:' '(empty string).

Hashtag
Blur Selectors

Parameter Name : blur_selector

Specify one or more CSS selectors to target specific elements for blurring. Multiple selectors can be added to blur different elements simultaneously.

  • Example:#main-wrapper > div > section:Anth-child(1)

  • Default value:' '(empty string).

Learn more about blur selectors.

Hashtag
Remove Selectors

Parameter Name : remove_selector

Specify a target element to remove based on a matching CSS selector. You can add multiple selectors to remove different elements.

  • If the specified element is not found, the function will still execute without errors.

  • Example:.ad-banner,#sidebar

  • Default value:' '(empty string).

Learn more about remove selectors.

Hashtag
Inject CSS

Parameter Name : css

Inject custom CSS into the render.

  • This allows you to apply specific styles to the rendered page before capturing the screenshot.

  • Example:body { background-color: #f0f0f0; }

  • Default value:' '(empty string).

Hashtag
Inject CSS URL

Parameter Name : css_url

URL for CSS code injected into the render.

  • Provides the ability to load external CSS from a URL and apply it to the rendered page.

  • Example:https://example.com/styles.css

  • Default value:' '(empty string).

Hashtag
Inject JS

Parameter Name : js

JS code injected into the render.

  • Allows for custom JavaScript code to be executed during the render process.

  • Example:document.body.style.backgroundColor = 'lightblue';

  • Default value:' '(empty string).

Hashtag
Inject JS URL

Parameter Name : js_url

URL for JS code injected into the render.

  • Allows you to specify a URL from which JavaScript code will be loaded and executed during the render process.

  • Example:https://example.com/custom-script.js

  • Default value:' '(empty string).

Hashtag
TTL (Time to Live)

Parameter Name : ttl

TTL (Time to Live) sets the number of seconds to keep a rendered screenshot (or PDF) in the cache.

  • This determines how long the rendered content will remain in cache before it expires and needs to be re-rendered.

  • Default value:2592000seconds (30 days).

Hashtag
User Agent

Parameter Name : user_agent

Sets the User-Agent string for the render for a particular request.

  • This allows you to specify a custom User-Agent, which is sent in the request headers to identify the browser or device making the request.

  • Example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36

  • Default value:' '(empty string).

Hashtag
Accept Language

Parameter Name : accept_languages

Sets the Accept-Language header on the request for the specified URL rendered.

  • This allows you to specify the language preferences for the content to be rendered, determining how the server responds based on language.

  • Default value:en-US,en;q=0.8(English - United States, with fallback to English).

Hashtag
Delay

Parameter Name : delay

Time delay in milliseconds (ms) before the screenshot is rendered from the browser instance (this includes PDFs).

  • This setting allows you to introduce a delay between the page load and the rendering process, ensuring all elements have fully loaded before capturing the screenshot or PDF.

  • Default value:0(no delay).

Hashtag
Thumbnail Width

Parameter Name : thumbnail_width

The width in pixels of the thumbnail generated from the render. If not set, the fallback behavior is the outputted screenshot.

  • This setting controls the width of the thumbnail image. If you don’t specify a width, the original screenshot will be used.

  • Default value:null(no thumbnail generated by default).

Hashtag
Output

Parameter Name : output

Set the output of the results from the render. The output can be eitherJSONor the raw image captured.

  • If you selectJSON, the result will be returned in a structured JSON format containing metadata and other details about the render.

  • If you selectimage, the result will be the raw image file (PNG, JPG, WebP, PDF, etc.) depending on the file type specified.

  • Default value:image.

Hashtag
Fresh

Parameter Name : fresh

Take a fresh screenshot or render (or PDF) vs. getting the cached version from the app's storage.

  • Set totrueto ensure a fresh render is generated, bypassing the cached version.

  • Set tofalseto use the cached version if available.

  • Default value:true.

Hashtag
Enable Caching

Parameter Name : enable_caching

Control whether the generated screenshot or render (or PDF) is stored in cache for future reuse, improving efficiency and performance. Enabling caching can significantly reduce processing time and API load for repeated requests to the same page.

  • Set totrueto store the screenshot in cache, allowing it to be reused in future requests without regenerating it.

  • Set tofalseto always generate a fresh screenshot, bypassing any cached versions.

  • Default value:false.

Hashtag
Lazy Load

Parameter Name : lazy_load

If lazy load is set to true, the browser will scroll down the entire page to ensure all content is loaded before the render.

  • Set totrueto ensure that all content, including lazy-loaded elements, is fully loaded.

  • Set tofalseto render the page with only the initially loaded content.

  • Default value:false.

Hashtag
Full Page

Parameter Name : full_page

Iffull_pageis set to true, the screenshot or render will capture the entire webpage, including areas that are not currently visible in the viewport. This means the full content of the page will be included, even if the user would need to scroll to see it.

  • Set totrueto capture the entire page.

  • Set tofalseto capture only the visible portion of the page.

  • Default value:false.

Hashtag
Retina

Parameter Name : retina

Ifretinas set to true, the screenshot or render will be captured with a higher pixel density (2x). This is useful for devices with Retina or high-definition displays where images need to appear sharper. Enabling this option will result in a higher-quality image, but may increase the processing time due to the larger image size.

  • Set totruefor high-definition screenshots.

  • Set tofalsefor standard screenshots.

  • Default value:false.

Hashtag
Height

Parameter Name : height

Theheightoption specifies the viewport height of the browser when the render is captured. It determines how much of the page is visible in the viewport before the render is taken. Adjusting the height can be useful if you need to capture a larger or smaller section of the webpage in your screenshot.

  • Set to a specificintegervalue (in pixels) to define the height of the viewport.

  • Maximum height is 4320 pixels.

  • Default value:867 pixels.

Hashtag
Width

Parameter Name : width

Thewidthoption specifies the viewport width of the browser when the render is captured. It determines how much of the page is visible horizontally before the render is taken. You can adjust the width if you want to capture a wider or narrower view of the webpage.

  • Set to a specificintegervalue (in pixels) to define the width of the viewport.

  • Maximum width is 7680 pixels.

  • Default value:1680 pixels.

Hashtag
Custom HTML

Parameter Name : custom_html

Thecustom_htmloption allows you to provide custom HTML content that will be rendered instead of loading a URL. This is useful if you want to capture a screenshot of a specific HTML structure or dynamically generated content.

  • Set to astringcontaining the HTML you want to render.

  • This will override theURLoption, and the screenshot will be based on the provided HTML.

  • Default value:' '(empty string).

Hashtag
Block Chat Widgets

Parameter Name : block_chat_widgets

Prevent chat widget scripts and resources from being loaded on websites during the rendering process.

  • When set totrue, all requests related to chat widgets will be blocked before rendering, which can prevent live chat features, customer support popups, and messaging interfaces from appearing.

  • Default value:false.

Hashtag
Block JS

Parameter Name : block_js

Prevent JavaScript files from being loaded on websites during the rendering process.

  • When set totrue, all requests for JavaScript resources will be blocked before rendering, which can improve performance or prevent dynamic content.

  • Default value:false.

Note: Enable this option only for necessary purposes, as it may affect the functionality of the website.

Hashtag
Block Stylesheets

Parameter Name : block_stylesheets

Prevent CSS files from being loaded on websites during the rendering process.

  • When set totrue, all requests for CSS resources will be blocked before rendering, which can improve performance or prevent styling from being applied.

  • Default value:false.

Hashtag
Block Images

Parameter Name : block_images

Prevent image files from being loaded on websites during the rendering process.

  • When set totrue, all requests for image resources will be blocked before rendering, which can prevent images from being displayed.

  • Image types:(.jpg, .jpeg, .png, .gif, .bmp, .tiff, .tif, .webp, .svg, .heif, .heic, .ico, .raw)

  • Default value:false.

Hashtag
Block Media

Parameter Name : block_media

Prevent media files (audio and video) from being loaded on websites during the rendering process.

  • When set totrue, all requests for media resources will be blocked before rendering, which can prevent audio and video files from being played or displayed.

  • Media types:(.mp3, .wav, .ogg, .mp4, .webm, .avi, .mov, .flv, .mkv, .wmv)

  • Default value:false.

Hashtag
Block Fonts

Parameter Name : block_fonts

Prevent font files from being loaded on websites during the rendering process.

  • When set totrue, all requests for font resources will be blocked before rendering, which can prevent custom fonts from being applied and fallback to default system fonts.

  • Font types:(.woff, .woff2, .ttf, .otf, .eot)

  • Default value:false.

Hashtag
Block Text Tracks

Parameter Name : block_text_track

Prevent text track files (subtitles, captions, and other text-based media) from being loaded on websites during the rendering process.

  • When set totrue, all requests for text track resources will be blocked before rendering, which can prevent subtitles or captions from being displayed in media players.

  • Default value:false.

Hashtag
Block XHR Requests

Parameter Name : block_xhr

Prevent XMLHttpRequest (XHR) requests from being made on websites during the rendering process.

  • When set totrue, all requests for data through XHR (typically used for asynchronous communication like API calls) will be blocked before rendering, which can prevent dynamic data from being fetched and rendered.

  • Default value:false.

Hashtag
Block Fetch Requests

Parameter Name : block_fetch

Prevent Fetch API requests from being made on websites during the rendering process.

  • When set totrue, all requests initiated by the Fetch API will be blocked before rendering, which can prevent data from being fetched asynchronously and interfere with dynamic content loading.

  • Default value:false.

Hashtag
Block Event Source

Parameter Name : block_event_source

Prevent EventSource connections (used for Server-Sent Events) from being established on websites during the rendering process.

  • When set totrue, all requests for EventSource connections will be blocked before rendering, which can prevent real-time data updates or notifications from being received.

  • Default value:false.

Hashtag
Block WebSockets

Parameter Name : block_web_socket

Prevent WebSocket connections from being established on websites during the rendering process.

  • When set totrue, all requests for WebSocket connections will be blocked before rendering, which can prevent real-time communication or data transfer between the client and server.

  • Default value:false.

Hashtag
Block Manifest

Parameter Name : block_manifest

Prevent manifest files from being loaded on websites during the rendering process.

  • When set totrue, all requests for manifest resources (such as web app manifests or service worker manifests) will be blocked before rendering, which can prevent the website from functioning as a Progressive Web App (PWA) or disrupt service worker behavior.

  • Manifest types:(.json, .webmanifest)

  • Default value:false.

Hashtag
Block Specific Requests

Parameter Name : block_specific_requests

Prevent specific requests from being loaded on websites during the rendering process.

  • All requests matching the specified criteria (such as URLs, files, or patterns) will be blocked before rendering. This can help optimize the rendering process by eliminating unwanted resources or preventing external dependencies from loading.

  • Request Delimiters: Each comma(,), space( ), or newline(↵)is treated as a separate delimiter, with each resulting segment considered an individual request for processing.

  • Request types: Can include URLs, specific file, or other request patterns.

  • Request Example:https://example.com/api/data,https://example.js

  • Default value:' '.

Hashtag
Adjust Top

Parameter Name : adjust_top

Control the vertical scroll position of the page before rendering.

  • When set to anumeric value (pixels), the page will automatically scroll to the specified pixel position from the top before rendering begins. This is useful for ensuring that a particular section of the page is captured or visible in the viewport during rendering.

  • Purpose: Allows precise positioning of the viewport to capture content or simulate user scrolling for testing and automation.

  • Default value:0 pixels(No adjustment).

Note: This feature is not available for PDF rendering.

Hashtag
Image Quality

Parameter Name : image_quality

Control the quality of the rendered image when using JPG or JPEG file types.

  • When set, this option adjusts the compression level of the output image, with a range from0(lowest quality, highest compression) to100(highest quality, least compression).

  • Default value:80.

Note: This option is only available for JPG or JPEG file types and does not apply to PNG or other formats.

Hashtag
Extract HTML

Parameter Name : extract_html

Retrieve the raw HTML content of the rendered page as a.htmlfile, excluding any CSS or other resources.

Note: This option is only available when the output type is set tojson.

Hashtag
Extract Text

Parameter Name : extract_text

Retrieve the plain text content from the rendered page, stripping out HTML, CSS, and other resources. The response will include a URL to a file containing the extracted text (.txt), making it useful for analysis or text-based processing.

Note:This option is only available when the output type is set tojson.

Hashtag
Dark Mode

Parameter Name : dark_mode

Enable dark mode for the rendered page when set totrue. This option only applies to websites that support dark mode.

Default Value:false

Hashtag
Block Tracking

Parameter Name : block_tracking

Prevent tracking scripts from loading on websites during the rendering process.

  • When set totrue, tracking scripts and analytics services will be blocked, enhancing privacy and reducing unnecessary requests.

  • Default value:false.

Hashtag
Wait For Event

Parameter Name : wait_for_event

This option determines when the page rendering should begin based on specific loading events.

Available events:

  • load — The default option. The rendering process starts once all resources, including images and stylesheets, are fully loaded.

  • domcontentloaded — Starts rendering as soon as the initial HTML document is completely parsed, without waiting for stylesheets, images, or subframes to load.

  • networkidle — Waits until there are no more network connections for at least 500ms, ensuring that all requests (such as AJAX calls) have finished loading.

The default value isload.

Hashtag
Grayscale

Parameter Name : grayscale

This option applies a black-and-white filter to the rendered output, removing colors based on the specified intensity.

Range:0to100

  • 0 — No grayscale effect.

  • 100 — Fully desaturated, converting the image to complete grayscale.

The default value is0.

Hashtag
Clip

Parameter Name : clip

Defines a specific rectangular area of the page to capture during rendering. Allows you to specify the exact portion of the screen to be included in the output.

Parameters:

  • x – The x-coordinate of the top-left corner of the clipping region.

  • y – The y-coordinate of the top-left corner of the clipping region.

  • width – The width of the clipping region in pixels.

  • height – The height of the clipping region in pixels.

Default value :' '(captures the entire viewport).

Hashtag
Result File Name

Parameter Name : result_file_name

Specify a custom name for the output file. This feature allows you to define a desired filename for the screenshot, facilitating organized storage and retrieval.

Note: If a non-unique filename is provided, it may overwrite an existing file with the same name in storage. To prevent data loss, ensure each filename is unique or avoid using this feature unless necessary.

Hashtag
Incognito Mode

Parameter Name : incognito_mode

Operate in a private browsing session that doesn't retain any browsing data. Some websites may alter their content when users are in Incognito Mode

  • When set totrue, the browser will launch in incognito mode, ensuring no data is stored between sessions.

  • Default value:false.

Note: Some websites restrict access when they detect users are in Incognito Mode.

Hashtag
Timeout

Parameter Name : timeout

Set a specific duration for navigation and operation timeouts. This determines how long the system will wait before aborting an operation.

  • Default value:60000 (60 seconds).

Note: Setting a very low timeout may cause premature failures, while a very high timeout may lead to extended wait times.

©2025 ScreenshotAPI. All Rights Reserved.