# Website Screenshot Generator (`apify/screenshot-url`) Actor

Create a screenshot of a website based on a specified URL. The screenshot is stored as the output in a key-value store. It can be used to monitor web changes regularly after setting up the scheduler.

- **URL**: https://apify.com/apify/screenshot-url.md
- **Developed by:** [Apify](https://apify.com/apify) (Apify)
- **Categories:** Developer tools, Open source
- **Stats:** 7,320 total users, 909 monthly users, 100.0% runs succeeded, 172 bookmarks
- **User rating**: 3.90 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### What can Website Screenshot Generator do?

Website Screenshot Generator takes a screenshot of a specified web page.

- Take a **screenshot of any website**, to your specifications
- Schedule screenshots to **track changes to a site over time**
- Website Screenshot Generator is **free to use**
- Store and export screenshots with structured metadata in  **JSON, CSV, Excel, or HTML**
- Export via SDKs (Python & Node.js), use **API endpoints**, **webhooks**, or integrate with workflows

> The Website Screenshot Generator is a simple Actor that serves primarily as an example Actor. It can be used for many websites and use cases but for more advanced use cases, prefer using [Website Content Crawler](https://apify.com/apify/website-content-crawler) which can also generate screenshots and supports:

- Sophisticated crawling options
- Adaptive anti-scraping and rendering strategies
- Automatic closing of cookie banners
- Extensive customization options

### How to use Website Screenshot Generator

Website Screenshot Generator is designed with users in mind, even those who have never extracted data from the web before. Using it takes just a few steps.

1. [Create](https://console.apify.com/sign-up) a free Apify account using your email
2. Open [Website Screenshot Generator](https://console.apify.com/actors/rGCyoaKTKhyMiiTvS/)
3. Add one or more web URLs
4. Click the “Start” button and wait for the data to be extracted
5. Download your data in JSON, XML, CSV, Excel, or HTML

### Input

The input for Website Screenshot Generator should be one or more web URLs of the pages you want to screenshot.

<a href="https://console.apify.com/actors/rGCyoaKTKhyMiiTvS/">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/website-screenshot-generator-input.png?raw=true" alt="Website Screenshot Generator input" style="width:70%;">
</a>

Note that you can also decide whether the scraper should scroll to the bottom of the page or not, and you can set the delay before the screenshot is taken. You can also set other input parameters; read the [input tab](https://apify.com/apify/screenshot-url/input-schema) for more on this.

### Output

Screenshot files are stored in Key-Value Store. Links to these files are pushed to a dataset that contains metadata about each page.

<a href="https://console.apify.com/actors/rGCyoaKTKhyMiiTvS/">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/website-screenshot-generator-output.png?raw=true" alt="Website Screenshot Generator output" style="width:70%;">
</a>

Here’s what it looks like in JSON:

```json
[
  {
    "startUrl": "https://www.apify.com/",
    "url": "https://apify.com/",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/cRzkYipMR1Q5KIp2a/records/screenshot_https___www_apify_com__0f8c0ae25fb410bb828c8efb40cdd068?signature=bCFB2m6c8Zsp1kKJIVwC&disableRedirect=true",
    "screenshotKey": "screenshot_https___www_apify_com__0f8c0ae25fb410bb828c8efb40cdd068"
  }
]
```

### How much will using Website Screenshot Generator cost you?

Using the Website Screenshot Generator is free; you’re only charged for using the Apify platform. These costs vary per payment plan. Check out the [Apify pricing page](https://apify.com/pricing) for details.

### Frequently asked questions

#### Can I use integrations with Website Screenshot Generator?

You can integrate Website Screenshot Generator with almost any cloud service or web app. We offer integrations with **Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive**, [and plenty more](https://docs.apify.com/integrations).

Alternatively, you could use [webhooks](https://docs.apify.com/integrations/webhooks) to carry out an action whenever an event occurs, such as getting a notification whenever Website Screenshot Generator successfully finishes a run.

#### Can I use Website Screenshot Generator with the Apify API?

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify Actors. The API also lets you access any datasets, monitor Actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the `apify-client` [NPM package](https://apify.com/apify/screenshot-url/api/javascript). To access the API using Python, use the `apify-client` [PyPI package](https://apify.com/apify/screenshot-url/api/python). Check out the [Apify API reference](https://docs.apify.com/api/v2) docs for all the details.

#### Can I use Website Screenshot Generator through an MCP Server?

With Apify API, you can use almost any Actor in conjunction with an MCP server. You can connect to the MCP server using clients like ClaudeDesktop and LibreChat, or even build your own. Read all about how you can [set up Apify Actors with MCP](https://blog.apify.com/how-to-use-mcp/).

For Website Screenshot Generator, go to the [MCP tab](https://apify.com/apify/screenshot-url/api/mcp) and then go through the following steps:

1. Start a Server-Sent Events (SSE) session to receive a `sessionId`
2. Send API messages using that `sessionId` to trigger the scraper
3. The message starts the Website Screenshot Generator with the provided input
4. The response should be: `Accepted`

#### Is it legal to take website screenshots?

Website Screenshot Generator does not extract any private user data, such as email addresses, gender, or location. They only extract what is shared publicly on a website.

That said, you should be careful not to scrape personal data, which is protected by the [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

#### Your feedback

We’re always working on improving the performance of our Actors. If you have any technical feedback for Website Screenshot Generator or found a bug, please create an issue in the [Issues tab](https://apify.com/apify/screenshot-url/issues/open).

# Actor input Schema

## `urls` (type: `array`):

List of URLs you want to take screenshots of.

## `format` (type: `string`):

Screenshot file format.

## `waitUntil` (type: `string`):

Control's when will the browser take a screenshot

## `delay` (type: `integer`):

Add's delay before a screenshot is taken. Minimum is 0, maximum is 5 minutes (3600000ms)

## `viewportWidth` (type: `integer`):

How wide should the website's viewport be

## `scrollToBottom` (type: `boolean`):

Should the browser scroll to the bottom of the page before taking a screenshot

## `delayAfterScrolling` (type: `integer`):

Specify the delay (in milliseconds) after scrolling to the bottom of the page before taking the screenshot. This option is only used if 'Wait for Network Idle After Scrolling' is not enabled.

## `waitUntilNetworkIdleAfterScroll` (type: `boolean`):

Choose whether to wait for the network to become idle after scrolling to the bottom of the page before taking a screenshot. If enabled, this option overrides the 'Delay After Scrolling' option.

## `waitUntilNetworkIdleAfterScrollTimeout` (type: `integer`):

Specify the maximum wait time (in milliseconds) for the network to become idle after scrolling to the bottom of the page before taking the screenshot, this option is used to make sure handler doesn't get stuck for some pages. This option is only used if 'Wait for Network Idle After Scrolling' is enabled.

## `proxy` (type: `object`):

Set the proxy configuration of the scraper

## `selectorsToHide` (type: `string`):

List of selectors to hide before taking a screenshot

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.apify.com/"
    }
  ],
  "format": "png",
  "waitUntil": "load",
  "delay": 0,
  "viewportWidth": 1280,
  "scrollToBottom": false,
  "delayAfterScrolling": 2500,
  "waitUntilNetworkIdleAfterScroll": false,
  "waitUntilNetworkIdleAfterScrollTimeout": 30000,
  "proxy": {
    "useApifyProxy": true
  },
  "selectorsToHide": ""
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        {
            "url": "https://www.apify.com/"
        }
    ],
    "waitUntil": "load",
    "delay": 0,
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("apify/screenshot-url").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": [{ "url": "https://www.apify.com/" }],
    "waitUntil": "load",
    "delay": 0,
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("apify/screenshot-url").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    {
      "url": "https://www.apify.com/"
    }
  ],
  "waitUntil": "load",
  "delay": 0,
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call apify/screenshot-url --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apify/screenshot-url"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rGCyoaKTKhyMiiTvS/builds/AEgoxMZIJXkz2zxdq/openapi.json
