# Website Screenshot: full page or viewport PNG and JPEG (`examsens.ai/website-screenshot`) Actor

Captures a screenshot of each URL you list in headless Chrome, as the visible window or the full page, on desktop or a phone profile, and returns a link to every image.

- **URL**: https://apify.com/examsens.ai/website-screenshot.md
- **Developed by:** [Ed Rayyis](https://apify.com/examsens.ai) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 screenshot processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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: full page or viewport PNG and JPEG

Give it a list of URLs and it opens each page in headless Chrome and saves a screenshot. Capture the visible window or the whole scrollable page, on a desktop window of the size you choose or on a phone profile, as PNG or JPEG.

Every image is stored in the run's key value store, and the dataset gives you a direct link to it, so you can download screenshots one by one, in bulk, or over the API.

### Input

- URLs (required)
- Full page (default off: visible window only)
- Device: desktop (default) or mobile (iPhone 13 profile: 390 by 664 CSS pixels at 3x, phone user agent)
- Viewport width and height for desktop (default 1280 by 800)
- Image format: PNG (default) or JPEG, with JPEG quality (default 80)
- Wait until: load event (default), DOM content loaded, or network idle
- Extra delay after loading (default 1,000 ms)
- Page timeout (default 30 seconds)

### Output

Dataset: one item per URL with `url`, `ok`, `finalUrl` (after redirects), `status` (the HTTP status of the page), `title`, `screenshotUrl` (link to the image), `screenshotKey`, `format`, `fullPage`, `device`, `viewportWidth`, `viewportHeight` and `bytes`. A page that cannot be opened gets `ok: false` and an `error`. Export as JSON, CSV or Excel, or read it over the API.

### Pricing

Pay per event: one event per screenshot captured. A page that cannot be opened (for example, an unknown host) is not charged. A page that answers with an HTTP error such as 404 is still captured and charged, and its `status` shows the code. The run stops when it reaches the maximum charge you set.

### Scope and conduct

Only the URLs you supply are opened, one at a time, each in a fresh browser context with no cookies carried over. No proxies are used, and the actor does not log in anywhere or collect personal data. Capture pages you are allowed to capture.

### Support

Questions and problems: the Issues tab on this page.

# Actor input Schema

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

Web pages to capture.

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

Capture the whole scrollable page. When off, only the visible window is captured.

## `device` (type: `string`):

Desktop uses the viewport size below. Mobile uses an iPhone 13 profile (390 by 664 CSS pixels at 3x, phone user agent, touch).

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

Browser window width in pixels.

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

Browser window height in pixels.

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

PNG is lossless. JPEG files are smaller.

## `jpegQuality` (type: `integer`):

Used only for JPEG.

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

When the page counts as loaded: the load event, DOMContentLoaded, or no network traffic for 500 ms.

## `delayMs` (type: `integer`):

Wait this long after the page has loaded before capturing, for animations and late content.

## `timeoutSecs` (type: `integer`):

Give up on a page that does not load within this time.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    }
  ],
  "fullPage": false,
  "device": "desktop",
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "format": "png",
  "jpegQuality": 80,
  "waitUntil": "load",
  "delayMs": 1000,
  "timeoutSecs": 30
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/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": [{ "url": "https://apify.com" }] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,examsens.ai/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/9I8ENe7uZc4VOoGS2/builds/UOJfmSe2z3jHnvuei/openapi.json
