# Website Screenshots, PDF & HTML Capture (`peerless_columbine/website-screenshot-html-capture`) Actor

Capture public website URLs as PNG, JPEG or PDF, with optional mobile images, rendered HTML and per-page metadata.

- **URL**: https://apify.com/peerless_columbine/website-screenshot-html-capture.md
- **Developed by:** [tingyou333 zhuang](https://apify.com/peerless_columbine) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.00 / 1,000 captured pages

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 Screenshots, PDF & HTML Capture

Capture public web pages as PNG, JPEG or PDF, with optional mobile screenshots and rendered HTML. Use the files for website reviews, client reports, archives and scheduled checks. Each Dataset row connects its input URL to saved files, page metadata and capture diagnostics.

### Quick start

```json
{
  "startUrls": [{"url": "https://apify.com/"}],
  "maxItems": 10,
  "viewport": {"width": 1920, "height": 1080},
  "fullPage": true,
  "format": "png",
  "captureMobile": false,
  "captureHtml": true,
  "waitForSelector": "",
  "waitMs": 2000,
  "navigationTimeoutSecs": 45
}
```

These are this Actor's defaults. Start with one public page and inspect its image and diagnostics before scheduling a larger collection.

### Inputs

| Input | Default | Purpose |
| --- | --- | --- |
| `startUrls` | One `https://apify.com/` URL | List of `{ "url": "…" }` objects. |
| `maxItems` | `10` | Maximum URL occurrences to process, from 1 to 1,000,000. |
| `viewport` | `1920 × 1080` | Desktop CSS-pixel width and height; each supports 64–4096. |
| `fullPage` | `true` | Capture the scrollable page within finite limits; `false` captures the viewport. |
| `format` | `png` | Desktop `png`, `jpeg` or `pdf`. JPEG quality is 85. |
| `captureMobile` | `false` | Save an additional mobile image for each processed URL. |
| `captureHtml` | `true` | Save the rendered desktop DOM as HTML. |
| `waitForSelector` | Empty string | Wait for a visible CSS selector before capture. |
| `waitMs` | `2000` | Additional wait, 0–60,000 milliseconds. |
| `navigationTimeoutSecs` | `45` | Navigation timeout per desktop or mobile variant, 5–180 seconds. |

Mobile uses a 390 × 844 CSS-pixel viewport with device pixel ratio 3. With desktop PDF, the additional mobile image is PNG. Full-page captures scroll to trigger lazy content and wait for fonts and images within finite deadlines. Pages that keep loading or changing can still produce partial captures.

PDF uses the page's print layout. With `fullPage: true`, all generated print pages are saved within the document limit; with `false`, only the first print page is saved. `pdfPageCount` and `pdfPageScope` describe the saved document.

### Output

The default Dataset contains capture and diagnostic rows. Screenshots, PDFs and HTML are stored in the default key-value store. The Output tab links to the Dataset, `SUMMARY` and `OUTPUT` records.

Rows include:

- `url`, `finalUrl`, `title`, `screenshotAt`, `httpStatus`, `format`, `viewport`, `fullPage`, `pageLoadTimeMs` and `sizeBytes`.
- `screenshotKey` / `screenshotUrl`, optional `mobileScreenshotKey` / `mobileScreenshotUrl`, and optional `htmlSnapshotKey` / `htmlSnapshotUrl`.
- `metaTags`, `openGraph`, `twitterCard`, `pageHeadings`, `consoleErrors` and limited `technologies` hints.
- `success`, `partial`, `diagnostics`, artifact hashes, dimensions and mobile-specific status when applicable.

Site-dependent metadata can be empty. Technology hints are not a comprehensive technology audit. Failed rows can omit page metadata and contain null artifact links. Dataset exports in JSON, CSV, Excel or XML contain metadata and file links; download referenced files separately. Access and retention follow the run's Apify storage settings.

### Billing and incomplete work

The base event is charged after a captured desktop file and its Dataset row are saved. The additional mobile event is charged only after the mobile file is saved too. Failed captures and diagnostic rows are uncharged. A usable partial capture can incur the corresponding capture fee; inspect `partial` and `diagnostics` before relying on it. Current event fees and platform usage allocation are shown in the Store.

The native **Unlimited** maximum-cost setting is supported. With no event-fee budget set, the Actor processes admitted URL occurrences within `maxItems` and its runtime/resource limits. A finite budget is checked before each page and each event; desktop plus mobile must fit together before capture starts. For API runs, set `maxTotalChargeUsd` in the run options if you want an event-fee limit. This run option is separate from the ten Actor inputs and does not cap platform resource usage.

Each input occurrence is processed separately in this implementation, including repeated URLs. Mobile does not consume another `maxItems` slot. `SUMMARY` records delivered, failed, partial and unprocessed counts, quantity limits and budget stops. A quantity cap does not mean all input URLs were captured. An uncertain delivery or charge stops processing without automatically repeating it.

### Limits and suitable pages

This Actor uses fresh browser contexts for public HTTP/HTTPS pages. It has no input for login credentials, cookies, custom headers or proxies. Private/internal addresses are rejected. Challenges, access denials and blank pages produce explicit failures rather than successful empty results.

Per URL, captures are bounded at 1,024 page requests, 256 connections, 64 MiB relayed network data, 8 redirects, 16 MiB per artifact, 32 MiB combined artifacts, 2 MiB rendered HTML and 256 KiB metadata. Page height is limited to 16,000 CSS pixels, raster images to 60 million pixels and PDFs to 256 pages. Full-page scrolling has an 8-second budget, followed by waits of up to 3 seconds each for fonts and images. Limits and unavailable resources remain visible in diagnostics.

Animations, responsive layouts, print styles, lazy content and blocked resources can change the image. Scheduled runs provide separate snapshots for comparison; this Actor does not include a persistent visual-diff service.

# Actor input Schema

## `startUrls` (type: `array`):

Public HTTP(S) URL objects, each containing only url. This product uses one Apify homepage when omitted; supplied duplicate occurrences remain separate.

## `maxItems` (type: `integer`):

Maximum input occurrences to process, including duplicates; mobile is an additional variant of the same occurrence.

## `viewport` (type: `object`):

Desktop CSS-pixel width and height. This product accepts 64–4096 per dimension; these are our implementation limits.

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

Capture scrollable page height within the documented finite rendering limits; limits reached remain partial.

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

PNG, JPEG image, or PDF document. With PDF and mobile enabled, the additional mobile artifact is PNG; inspect its own format field.

## `captureMobile` (type: `boolean`):

Also capture an iPhone-class viewport separately from desktop; inspect mobile artifact and partial diagnostics.

## `captureHtml` (type: `boolean`):

Save rendered DOM HTML alongside desktop capture, subject to the disclosed HTML byte limit.

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

Optional CSS selector before capture. Empty disables selector waiting. A timeout may leave a partial capture when visible content exists.

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

Additional wait in milliseconds after navigation/readiness handling.

## `navigationTimeoutSecs` (type: `integer`):

Navigation timeout in seconds for each variant, not the entire run deadline.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com/"
    }
  ],
  "maxItems": 10,
  "viewport": {
    "width": 1920,
    "height": 1080
  },
  "fullPage": true,
  "format": "png",
  "captureMobile": false,
  "captureHtml": true,
  "waitForSelector": "",
  "waitMs": 2000,
  "navigationTimeoutSecs": 45
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

## `output` (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 = {
    "startUrls": [
        {
            "url": "https://apify.com/"
        }
    ],
    "maxItems": 10,
    "viewport": {
        "width": 1920,
        "height": 1080
    },
    "fullPage": true,
    "format": "png",
    "captureMobile": false,
    "captureHtml": true,
    "waitMs": 2000,
    "navigationTimeoutSecs": 45
};

// Run the Actor and wait for it to finish
const run = await client.actor("peerless_columbine/website-screenshot-html-capture").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 = {
    "startUrls": [{ "url": "https://apify.com/" }],
    "maxItems": 10,
    "viewport": {
        "width": 1920,
        "height": 1080,
    },
    "fullPage": True,
    "format": "png",
    "captureMobile": False,
    "captureHtml": True,
    "waitMs": 2000,
    "navigationTimeoutSecs": 45,
}

# Run the Actor and wait for it to finish
run = client.actor("peerless_columbine/website-screenshot-html-capture").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 '{
  "startUrls": [
    {
      "url": "https://apify.com/"
    }
  ],
  "maxItems": 10,
  "viewport": {
    "width": 1920,
    "height": 1080
  },
  "fullPage": true,
  "format": "png",
  "captureMobile": false,
  "captureHtml": true,
  "waitMs": 2000,
  "navigationTimeoutSecs": 45
}' |
apify call peerless_columbine/website-screenshot-html-capture --silent --output-dataset

```

## MCP server setup

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

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/hEiqZbbz6dijNYQf3/builds/9iWyYqW86DzPuX6IY/openapi.json
