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

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

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

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

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

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

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

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).

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

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

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

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

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

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

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

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

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

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

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

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)

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

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

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

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

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

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

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:false.

Hashtag
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

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

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

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.

  • Default value:867 pixels.

Hashtag
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.

  • Default value:1680 pixels.

Hashtag
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

©2025 ScreenshotAPI. All Rights Reserved.