# Website Screenshot (`i-scraper/website-screenshot`) Actor

⚡️ Website screenshot: easy-peasy screenshots, PNG & JPG formats

- **URL**: https://apify.com/i-scraper/website-screenshot.md
- **Developed by:** [i-Scraper](https://apify.com/i-scraper) (community)
- **Categories:** Automation, Other
- **Features:** Limited permissions
- **Stats:** 351 total users, 72 monthly users, 99.9% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Website Screenshot - Capture High-Quality Screenshots

Capture professional screenshots of any website automatically. Perfect for website monitoring, documentation, archiving, and visual testing.

### Why Use Website Screenshot?

- **Save Time** - Automate screenshot capture for multiple websites at once
- **High Quality** - Get pixel-perfect PNG or optimized JPEG and WebP screenshots
- **Flexible Options** - Full-page capture, custom viewport sizes, or specific elements
- **Fast Performance** - Block unnecessary resources for faster screenshot generation
- **Reliable** - Built on Playwright browser automation for consistent results

### Key Features

📸 **Multiple Format Support** - Choose PNG for lossless quality, JPEG for compatibility, or WebP for compact files

🖼️ **Full-Page Capture** - Screenshot entire scrollable pages, not just visible viewport

⚡ **Smart Resource Blocking** - Speed up captures by blocking images, fonts, or stylesheets

🎯 **Wait for Elements** - Ensure dynamic content loads before capturing

🔧 **Custom Viewports** - Set any desktop, tablet, or mobile screen size

📊 **Batch Processing** - Capture multiple URLs in parallel

### Common Use Cases

🔍 **Website Monitoring** - Track visual changes on competitor websites or your own pages

📚 **Documentation** - Create visual guides and tutorials with screenshots

🗄️ **Archiving** - Preserve website snapshots for legal or compliance purposes

🧪 **Visual Testing** - Generate screenshots across different viewport sizes

📊 **Report Generation** - Add website screenshots to automated reports

### How to Use

#### Quick Start

1. Enter one or more website URLs
2. Click "Start" to run the actor
3. Download screenshots from the dataset results

#### Configuration Options

**URLs** (required) - List of websites to capture

**Viewport Size** - Set browser window dimensions (default: 1920x1080)

- Mobile: 375x667
- Tablet: 768x1024
- Desktop: 1920x1080

**Format** - Choose PNG for lossless quality, JPEG for compatibility, or WebP for the smallest files. WebP is
preselected for new Console runs. Existing API and Task integrations that omit `format` continue to receive PNG.

**Full Page** - Capture entire scrollable page instead of just viewport

**Wait Options** - Control when screenshot is taken:

- Wait for page load
- Wait for specific elements to appear
- Add custom delay for animations

**Resource Blocking** - Speed up capture by blocking images, fonts, or other resources

### Output

Each screenshot produces a dataset record with the following fields:

- `url` - The URL that was screenshotted
- `screenshotKey` - Key-value store key for the screenshot file
- `screenshotUrl` - Public URL to access the screenshot (available after run completion)
- `format` - Screenshot image format used
- `viewportWidth` - Browser viewport width used
- `viewportHeight` - Browser viewport height used
- `fullPage` - Whether full page screenshot was captured
- `timestamp` - ISO timestamp when screenshot was taken
- `title` - HTML page title
- `status` - Success or error status
- `error` - Error message if screenshot failed (null on success)

### Example Configurations

#### Basic Screenshot

Capture a simple PNG screenshot with default settings:

```json
{
  "urls": ["https://apify.com"]
}
```

#### Full Page Screenshot

Capture entire scrollable page as high-quality JPEG:

```json
{
  "urls": ["https://example.com"],
  "format": "jpeg",
  "quality": 90,
  "fullPage": true
}
```

#### Compact WebP Screenshot

Capture a full page with a much smaller output file:

```json
{
  "urls": ["https://example.com"],
  "format": "webp",
  "quality": 80,
  "fullPage": true
}
```

#### Mobile View Screenshot

Capture with mobile viewport dimensions:

```json
{
  "urls": ["https://example.com"],
  "viewportWidth": 375,
  "viewportHeight": 667
}
```

#### Fast Screenshot

Speed up capture by blocking unnecessary resources:

```json
{
  "urls": ["https://news.ycombinator.com"],
  "blockResources": ["image", "font"],
  "waitUntil": "domcontentloaded"
}
```

### What You Get

Each screenshot run provides:

- **Dataset** - Metadata for each screenshot including URL, timestamp, page title, and download link
- **Key-Value Store** - Actual screenshot image files in your chosen format
- **Error Details** - Clear error messages for any failed screenshots

Screenshots are accessible via public URLs after the run completes.

### Performance & Reliability

✅ **Fast** - Captures up to 5 screenshots simultaneously

✅ **Reliable** - Automatic retry logic and graceful error handling

✅ **Flexible** - Wait for page load, network idle, or specific elements

✅ **Smart** - Block resources you don't need for faster processing

# Actor input Schema

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

List of website URLs to capture screenshots from

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

Browser viewport width in pixels

## `viewportHeight` (type: `integer`):

Browser viewport height in pixels

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

Output image format. WebP is preselected for new Console runs; API and Task inputs that omit this field keep PNG compatibility.

## `fullPage` (type: `boolean`):

Capture the entire scrollable page (ignores viewport height)

## `quality` (type: `integer`):

Quality for JPEG and WebP formats (0-100)

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

When to consider navigation successful

## `waitForSelector` (type: `string`):

Optional CSS selector to wait for before taking screenshot

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

Additional delay in milliseconds before taking screenshot

## `waitForImages` (type: `boolean`):

Auto-scroll full pages and wait briefly for visible images (recommended for lazy-loaded content)

## `blockResources` (type: `array`):

Resource types to block (e.g., images, stylesheets, fonts)

## `proxyConfiguration` (type: `object`):

Select proxies to be used by the browser

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "format": "webp",
  "fullPage": false,
  "quality": 80,
  "waitUntil": "domcontentloaded",
  "delay": 0,
  "waitForImages": true,
  "blockResources": [
    "media"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `screenshotMetadata` (type: `string`):

Dataset containing metadata for each screenshot: URL, format, viewport dimensions, page title, status, and a link to the screenshot image.

## `screenshotImages` (type: `string`):

Key-value store containing the captured screenshot images in PNG, JPEG, or WebP format.

# 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": [
        "https://apify.com"
    ],
    "format": "webp"
};

// Run the Actor and wait for it to finish
const run = await client.actor("i-scraper/website-screenshot").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": ["https://apify.com"],
    "format": "webp",
}

# Run the Actor and wait for it to finish
run = client.actor("i-scraper/website-screenshot").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": [
    "https://apify.com"
  ],
  "format": "webp"
}' |
apify call i-scraper/website-screenshot --silent --output-dataset

```

## MCP server setup

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

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/jz2cthiRraybrbmu8/builds/Um2mJ7LYh69faAgG1/openapi.json
