# Website Screenshot API — Full Page, Mobile, Ad-Block (`jmayniac/website-screenshot-api`) Actor

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

## Pricing

$2.00 / 1,000 screenshots

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 API

Turn any URL into a pixel-perfect screenshot — full page, mobile or desktop — in one API call. No browser setup, no CSS headaches.

**Why this Actor?**

- 📸 **Full-page capture** — the entire scrollable page, not just the viewport
- 📱 **Real device profiles** — iPhone 15, iPhone SE, iPad Pro, Pixel 8 presets with correct user agents and pixel density
- 🚫 **Ad & tracker blocking** — clean screenshots without banners or cookie walls
- 🍪 **Cookie-banner auto-dismiss** — clicks "Accept all" for you before capture
- 🖼️ **PNG / JPEG / WebP** with adjustable quality
- ⚡ **Fast** — optional font blocking and smart waits

### Input

```json
{
  "urls": ["https://stripe.com", "https://example.com"],
  "fullPage": true,
  "format": "png",
  "device": "iphone-15",
  "blockAds": true,
  "waitMs": 1500
}
```

### Output

Each screenshot is saved to the run's key-value store; the dataset lists every result with a direct download URL:

```json
{
  "url": "https://stripe.com",
  "status": "succeeded",
  "screenshotKey": "stripe.com-https-stripe-com.png",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../records/stripe.com-https-stripe-com.png",
  "format": "png",
  "bytes": 284123
}
```

### Usage tips

- If a site blocks datacenter IPs, enable **Apify Proxy** (residential recommended) in the input.
- Heavy JavaScript sites: increase `waitMs` or use `waitUntil: networkidle`.
- Screenshots can be posted straight to Slack, Notion, Google Sheets, or saved as compliance evidence.

### Use cases

- Website redesign archives and A/B documentation
- Compliance / audit evidence (price pages, terms of service)
- Automated portfolio and social media previews
- Monitoring partner or competitor pages visually

### Integration

Call it from your code with the [Apify API](https://docs.apify.com/api) or from Make / Zapier / n8n webhooks. Pass URLs, receive image URLs.

# Actor input Schema

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

List of web page URLs. One per line, or a JSON array of strings.

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

Output image format.

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

0-100. Default 90.

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

If true, captures the entire page height, not just the viewport.

## `width` (type: `integer`):

Default 1280.

## `height` (type: `integer`):

Default 800.

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

Overrides width/height with a common device profile.

## `blockAds` (type: `boolean`):

Aborts known ad/analytics network requests for cleaner screenshots.

## `blockFonts` (type: `boolean`):

Faster loads; uses system fonts instead.

## `waitMs` (type: `integer`):

Time to let animations/lazy content settle. Default 1500.

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

Playwright navigation wait condition.

## `timeoutSec` (type: `integer`):

Default 45.

## `hideCookies` (type: `boolean`):

Attempts to click common Accept/Reject cookie-banner buttons before capture.

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

Use a proxy if the target blocks datacenter IPs. Apify Proxy recommended.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "format": "png",
  "quality": 90,
  "fullPage": true,
  "width": 1280,
  "height": 800,
  "device": "none",
  "blockAds": true,
  "blockFonts": false,
  "waitMs": 1500,
  "waitUntil": "load",
  "timeoutSec": 45,
  "hideCookies": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per URL: status, screenshotUrl, format, bytes.

## `images` (type: `string`):

Image records keyed by hostname+URL slug, e.g. stripe.com-https-stripe-com.png.

# 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",
        "https://example.com"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jmayniac/website-screenshot-api").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",
        "https://example.com",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("jmayniac/website-screenshot-api").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",
    "https://example.com"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call jmayniac/website-screenshot-api --silent --output-dataset

```

## MCP server setup

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

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/fll20RrEyMWuwi6Nc/builds/p1DR2I2crJidj3ZKh/openapi.json
