---
title: "Render a Screenshot | ScreenshotAPI Docs"
slug: "/docs/renderScreenshot"
description: "Generate high-quality website screenshots effortlessly with ScreenshotAPI. Learn to render screenshots in various formats like JPEG, PNG, WebP, and PDF."
---

# Render a Screenshot

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

The following options for the API call are:

**TOKEN:** The`TOKEN`or your API key should be replaced by your real [ScreenshotAPI](https://screenshotapi.net/) API, you can find your API key after you [Sign Up](https://app.screenshotapi.net/) or [Log In](https://app.screenshotapi.net/) to the service via the [Dashboard](https://app.screenshotapi.net/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:**

```js

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);
});
```

```php

<?php
	$client = new http.Client;
	$request = new http.Client.Request;
	$request->setRequestUrl("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https://apple.com");
	$request->setRequestMethod("GET");
	$request->setOptions(array());

	$client->enqueue($request)->send();
	$response = $client->getResponse();
	echo $response->getBody();
?>
```

```go

package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {
	url := "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https://apple.com"
	method := "GET"

	client := &http.Client { }
	req, err := http.NewRequest(method, url, nil)

	if err != nil {
		fmt.Println(err)
		return
	}

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}

	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}
```

```java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder().url("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https://apple.com"
	.method("GET", body)
	.build();
Response response = client.newCall(request)
	.execute();
```

```py

import requests

url = "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https://apple.com"
payload = {}
headers = {}

response = requests.request("GET", url, headers, data=payload)
print(response.text)
```

```ruby

require "uri"
require "net/http"

url = URI("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https://apple.com")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
```

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

![s](https://screenshotapi.net/_next/image?url=%2Fimages%2Fdocs%2F1.png&w=3840&q=75)

## Cached & Fresh screenshot

When you take a screenshot with the`enable_caching` option enabled, our system captures a fresh screenshot the first time and stores it in the cache. On subsequent requests with the same URL and parameters, if`fresh=false`, the cached screenshot will be returned, resulting in faster response times.

**Example:**

```js

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&output=image&file_type=png&enable_caching=true&wait_for_event=load&[OPTIONS]",
	headers: { }
};

axios.request(config).then((response) => {
	console.log(JSON.stringify(response.data));
}.catch((error) => {
	console.log(error);
});
```

```php

<?php
	$client = new http.Client;
	$request = new http.Client.Request;
	$request->setRequestUrl("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&output=image&file_type=png&enable_caching=true&wait_for_event=load&[OPTIONS]");
	$request->setRequestMethod("GET");
	$request->setOptions(array());

	$client->enqueue($request)->send();
	$response = $client->getResponse();
	echo $response->getBody();
?>
```

```go

package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {
	url := "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&output=image&file_type=png&enable_caching=true&wait_for_event=load&[OPTIONS]"
	method := "GET"

	client := &http.Client { }
	req, err := http.NewRequest(method, url, nil)

	if err != nil {
		fmt.Println(err)
		return
	}

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}

	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}
```

```java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder().url("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&output=image&file_type=png&enable_caching=true&wait_for_event=load&[OPTIONS]"
	.method("GET", body)
	.build();
Response response = client.newCall(request)
	.execute();
```

```py

import requests

url = "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&output=image&file_type=png&enable_caching=true&wait_for_event=load&[OPTIONS]"
payload = {}
headers = {}

response = requests.request("GET", url, headers, data=payload)
print(response.text)
```

```ruby

require "uri"
require "net/http"

url = URI("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&output=image&file_type=png&enable_caching=true&wait_for_event=load&[OPTIONS]")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
```

To take a new screenshot and bypass the cache, you can pass`fresh=true`in your request. This is useful when the content of the target page is dynamic or has changed since the last capture.

**Example:**

```js

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);
});
```

```php

<?php
	$client = new http.Client;
	$request = new http.Client.Request;
	$request->setRequestUrl("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&[OPTIONS]");
	$request->setRequestMethod("GET");
	$request->setOptions(array());

	$client->enqueue($request)->send();
	$response = $client->getResponse();
	echo $response->getBody();
?>
```

```go

package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {
	url := "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&[OPTIONS]"
	method := "GET"

	client := &http.Client { }
	req, err := http.NewRequest(method, url, nil)

	if err != nil {
		fmt.Println(err)
		return
	}

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}

	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}
```

```java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder().url("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&[OPTIONS]"
	.method("GET", body)
	.build();
Response response = client.newCall(request)
	.execute();
```

```py

import requests

url = "https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&[OPTIONS]"
payload = {}
headers = {}

response = requests.request("GET", url, headers, data=payload)
print(response.text)
```

```ruby

require "uri"
require "net/http"

url = URI("https://shot.screenshotapi.net/v3/screenshot?token=TOKEN&url=https%3A%2F%2Fwww.apple.com%2F&fresh=true&[OPTIONS]")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
```

## Remove elements from a page

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

**Example:**

```js

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);
});
```

```php

<?php
	$client = new http.Client;
	$request = new http.Client.Request;
	$request->setRequestUrl("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");
	$request->setRequestMethod("GET");
	$request->setOptions(array());

	$client->enqueue($request)->send();
	$response = $client->getResponse();
	echo $response->getBody();
?>
```

```go

package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {
	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"
	method := "GET"

	client := &http.Client { }
	req, err := http.NewRequest(method, url, nil)

	if err != nil {
		fmt.Println(err)
		return
	}

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}

	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}
```

```java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder().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"
	.method("GET", body)
	.build();
Response response = client.newCall(request)
	.execute();
```

```py

import requests

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"
payload = {}
headers = {}

response = requests.request("GET", url, headers, data=payload)
print(response.text)
```

```ruby

require "uri"
require "net/http"

url = URI("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")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
```

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.

![Image](https://screenshotapi.net/_next/image?url=%2Fimages%2Fdocs%2FremoveElement.gif&w=3840&q=75)

## Essentials

### URL

The`url`option specifies the URL of the website to be rendered as a screenshot or other format.

### Token

The`token`option is your API key for authenticating requests to the Screenshot API.

## Features

### 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 is`PNG`.

### 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 the`file_type`is set to PNG.
    
*   **false** — Keeps the background intact (default behavior).
    

The default value is`false`.

### 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 is`false`.

### Fail On Error

**Parameter Name :** `fail_on_error`

Available options:

*   **true** — The API will return an error if the render encounters a`4xx`or`5XX`status 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 ignore`4xx`and`5xx`status codes, proceeding without returning an error (default behavior).
    

The default value is`false`.

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

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

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

### No Cookie Banners

**Parameter Name :** `no_cookie_banners`

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

*   When set to`true`, cookie banners will be blocked or hidden before the request is rendered.
    
*   Default value:`false`.
    

### Block Ads

**Parameter Name :** `block_ads`

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

*   When set to`true`, requests from popular ad networks will be blocked before rendering.
    
*   Default value:`false`.
    

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

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

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

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

### 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](https://screenshotapi.net/guide/how-to-blur-a-selector-while-taking-a-screenshot).

### 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](https://screenshotapi.net/guide/how-to-remove-a-selector-while-taking-a-screenshot).

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

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

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

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

### 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:`2592000`seconds (30 days).
    

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

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

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

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

### Output

**Parameter Name :** `output`

Set the output of the results from the render. The output can be either`JSON`or the raw image captured.

*   If you select`JSON`, the result will be returned in a structured JSON format containing metadata and other details about the render.
    
*   If you select`image`, the result will be the raw image file (PNG, JPG, WebP, PDF, etc.) depending on the file type specified.
    
*   Default value:`JSON`.
    

### Fresh

**Parameter Name :** `fresh`

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

*   Set to`true`to ensure a fresh render is generated, bypassing the cached version.
    
*   Set to`false`to use the cached version if available.
    
*   Default value:`true`.
    

### 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 to`true`to store the screenshot in cache, allowing it to be reused in future requests without regenerating it.
    
*   Default value:`false`.
    

### 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 to`true`to ensure that all content, including lazy-loaded elements, is fully loaded.
    
*   Set to`false`to render the page with only the initially loaded content.
    
*   Default value:`false`.
    

### Full Page

**Parameter Name :** `full_page`

If`full_page`is 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 to`true`to capture the entire page.
    
*   Set to`false`to capture only the visible portion of the page.
    
*   Default value:`false`.
    

### Retina

**Parameter Name :** `retina`

If`retina`s 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 to`true`for high-definition screenshots.
    
*   Set to`false`for standard screenshots.
    
*   Default value:`false`.
    

### Height

**Parameter Name :** `height`

The`height`option 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 specific`integer`value (in pixels) to define the height of the viewport.
    
*   Maximum height is `4320 pixels`.
    
*   Default value:`867 pixels`.
    

### Width

**Parameter Name :** `width`

The`width`option 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 specific`integer`value (in pixels) to define the width of the viewport.
    
*   Maximum width is `7680 pixels`.
    
*   Default value:`1680 pixels`.
    

### Custom HTML

**Parameter Name :** `custom_html`

The`custom_html`option 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 a`string`containing the HTML you want to render.
    
*   This will override the`URL`option, and the screenshot will be based on the provided HTML.
    
*   Default value:`' '`(empty string).
    

### 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 to`true`, 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`.
    

### Block JS

**Parameter Name :** `block_js`

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

*   When set to`true`, 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._

### Block Stylesheets

**Parameter Name :** `block_stylesheets`

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

*   When set to`true`, all requests for CSS resources will be blocked before rendering, which can improve performance or prevent styling from being applied.
    
*   Default value:`false`.
    

### Block Images

**Parameter Name :** `block_images`

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

*   When set to`true`, 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`.
    

### Block Media

**Parameter Name :** `block_media`

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

*   When set to`true`, 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`.
    

### Block Fonts

**Parameter Name :** `block_fonts`

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

*   When set to`true`, 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`.
    

### 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 to`true`, 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`.
    

### Block XHR Requests

**Parameter Name :** `block_xhr`

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

*   When set to`true`, 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`.
    

### Block Fetch Requests

**Parameter Name :** `block_fetch`

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

*   When set to`true`, 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`.
    

### 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 to`true`, 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`.
    

### Block WebSockets

**Parameter Name :** `block_web_socket`

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

*   When set to`true`, 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`.
    

### Block Manifest

**Parameter Name :** `block_manifest`

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

*   When set to`true`, 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`.
    

### 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:`' '`.
    

### Adjust Top

**Parameter Name :** `adjust_top`

Control the vertical scroll position of the page before rendering.

*   When set to a`numeric 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._

### 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 from`0`(lowest quality, highest compression) to`100`(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._

### Extract HTML

**Parameter Name :** `extract_html`

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

_`Note:` This option is only available when the output type is set to`json` and is not supported for `Scrolling Screenshots`_

### 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 to`json` and is not supported for `Scrolling Screenshots`_

### Dark Mode

**Parameter Name :** `dark_mode`

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

Default Value:`false`

### Block Tracking

**Parameter Name :** `block_tracking`

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

*   When set to`true`, tracking scripts and analytics services will be blocked, enhancing privacy and reducing unnecessary requests.
    
*   Default value:`false`.
    

### 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 is`load`.

### Grayscale

**Parameter Name :** `grayscale`

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

Range:`0`to`100`

*   **0** — No grayscale effect.
    
*   **100** — Fully desaturated, converting the image to complete grayscale.
    

The default value is`0`.

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

### 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._

### 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 to`true`, 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._

### Timeout

**Parameter Name :** `timeout`

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

*   Default value:`100000` (100 seconds).
    

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

### Cookies Template

**Parameter Name :** `template_id`

Specify the unique identifier of a predefined cookie template to be used during the screenshot process. This allows you to authenticate or set specific browser state before capturing the page. Learn how to get [template_id](https://screenshotapi.net/guide/how-to-take-screenshots-of-web-pages-behind-a-login-a-simple-guide)

*   Default value:`" "` (no template id).
    

_`Note:` If a valid`template_id` is provided, the system will apply the corresponding cookie data before navigation. Ensure the template exists and is correctly formatted to avoid request errors._

### Selector to Click

**Parameter Name :** `selector_to_click`

Specifies a CSS selector for an element to be clicked before capturing the screenshot. This is useful for triggering UI elements like dropdowns, modals, or setting preferences.

*   The click is triggered before the final render is performed.
    
*   If the selector does not match any element, the screenshot proceeds without clicking.
    
*   Example:`.settings-panel > .unit-toggle`
    
*   Default value:`' '`(empty string).
    

### Click Recursion

**Parameter Name :** `click_recursion`

Defines how many times the target element specified in `selector_to_click` should be clicked before capturing the screenshot. Useful for toggling elements that require multiple interactions (e.g., nested dropdowns or unit switches).

*   The selector will be clicked recursively based on the value provided.
    
*   Must be used in combination with `selector_to_click` to have an effect.
    
*   Example:`2`
    
*   Default value:`0`
    

### Bring Your Own Bucket (BYOB)

**Parameter Name :** `byob`

Allows the use of a custom storage bucket that has already been configured under the [Storage Integrations](https://app.screenshotapi.net/storage-integrations) tab. This enables direct saving of screenshots to your own cloud bucket instead of the default storage.

Default value:`false`.

_`Note:` Make sure the storage integration is properly set up and tested before enabling this parameter._

### Storage Service

**Parameter Name :** `storage_service`

Specifies which storage service to use for saving the screenshot when`byob` is enabled and multiple services are already configured. This must match the exact name of the service listed in the [Storage Integrations](https://app.screenshotapi.net/storage-integrations) tab (e.g., aws, wasabi, google_cloud).

Supported services:

*   **Amazon S3 (aws)** — Amazon's highly scalable and reliable cloud storage service. Industry standard for object storage with global availability.
    
*   **Wasabi** — Cost-effective cloud storage compatible with S3 APIs. Offers faster upload speeds and predictable pricing without egress fees.
    
*   **Google Cloud** — Google's robust cloud storage platform with strong integration capabilities. Provides excellent performance and seamless integration with other Google services.
    

Default value:`' '`.

_`Note:` This parameter is required when byob is set to `true`. Ensure the selected service is correctly configured and tested._

### Bucket Name

**Parameter Name :** `bucket_name`

Specifies the name of the storage bucket to which the screenshot will be saved when `byob` is enabled. This must match the exact bucket name configured under the [Storage Integrations](https://app.screenshotapi.net/storage-integrations) tab. Specify this if you have multiple buckets configured under the same service.

Default value:`' '`.

_`Note:` This parameter is required when byob is set to `true`. Ensure the bucket is correctly configured and accessible._

### Timezone

**Parameter Name :** `timezone`

Simulates a specific timezone in the browser during screenshot rendering.

*   Use IANA format (e.g., America/Tijuana, Asia/Karachi, Europe/London). See the [list of supported timezones](https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt).
    
*   Default value:`' '` (Server's local timezone).
    

_`Note:` Useful for rendering time-sensitive content (e.g., clocks, date displays, localized versions). Make sure the target site respects client timezone._

### Get Image Urls

**Parameter Name :** `get_image_urls`

Enable this option to extract all image URLs used on the requested webpage. When set to true, the response will include a structured list of all detected images.

*   Default value:`false`.
    

_`Note:` To use this feature, the output type must be set to `json`._
