# Website Screenshot & PDF Capture (`deepaksheoran172/website-screenshot-pdf`) Actor

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

## Pricing

$5.00 / 1,000 high-resolution screenshot & pdf captures

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

<p align="center">
  <img src="https://raw.githubusercontent.com/deepakshe/apify-b2b-super-actors/main/assets/actor_icons/website-screenshot-pdf.png" width="96" height="96" alt="High-Resolution Web Page Screenshot & PDF Archiver Icon" style="border-radius: 20px; box-shadow: 0 8px 24px rgba(0,0,0,0.18);" />
</p>

<p align="center">
  <a href="https://apify.com/deepaksheoran172/website-screenshot-pdf"><img src="https://img.shields.io/badge/Apify_Store-Active_PPE-blue?style=for-the-badge&logo=apify" alt="Apify Store" /></a>
  <a href="https://apify.com/deepaksheoran172/website-screenshot-pdf"><img src="https://img.shields.io/badge/Launch_Discount-60%25_OFF-success?style=for-the-badge" alt="60% Launch Discount" /></a>
  <img src="https://img.shields.io/badge/Architecture-Zero--Proxy_Fast-informational?style=for-the-badge" alt="Zero-Proxy Fast" />
  <img src="https://img.shields.io/badge/QA_Validation-Verified_Pass-brightgreen?style=for-the-badge" alt="Verified QA Pass" />
</p>

## 📸 Website Screenshot & High-Resolution PDF Generator

> Headless Chromium automated rendering service for full-page website screenshots and printable PDF documents.

***

### ⚡ What it Does

- **Full-Page & Viewport Capture:** Renders lazy-loaded images, dynamic web fonts, and sticky headers.
- **Vector PDF Generation:** Generates vector PDFs formatted for archiving, compliance, or document reporting.
- **Configurable Viewports & Delays:** Supports custom desktop/mobile screen dimensions and configurable capture delay (`delayMs`).
- **Batch Processing:** Processes multiple URLs (`urls[]`) with unique Key-Value Store assets and dataset reference links per target.

***

### 📥 Input Example

```json
{
  "urls": [
    "https://example.com"
  ],
  "format": "BOTH",
  "fullPage": true,
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "delayMs": 500,
  "timeoutSec": 20
}
```

***

### 📤 Output Example (Dataset Item)

```json
{
  "url": "https://example.com",
  "status": "SUCCESS",
  "error": null,
  "format": "BOTH",
  "screenshot_record_key": "SCREENSHOT_100680ad54.png",
  "screenshot_url": "key-value-stores/default/records/SCREENSHOT_100680ad54.png",
  "pdf_record_key": "DOCUMENT_100680ad54.pdf",
  "pdf_url": "key-value-stores/default/records/DOCUMENT_100680ad54.pdf",
  "captured_at": "2026-10-19T01:21:54.801132+00:00"
}
```

***

### 💰 Pricing & High-Agency Guarantee

| Plan / Tier | Rate | Details |
|---|---|---|
| **Pay-Per-Result (Active Launch Discount - 60% OFF)** | **$3.00 / 1,000 captured URLs** ($0.0030 / URL) | Regular ~~$8.00 / 1k~~. Charged strictly on `SUCCESS` captures. Includes both full-page PNG & PDF. |
| **Agency Subscription** | **$29.00 / month** | High-volume automated visual archiving & compliance reporting. |
| **Failed / Blocked Captures** | **$0.00 (FREE)** | Zero charge for unreachable domains or SSRF-blocked requests. |

***

### 🛡️ Security Architecture & Boundary Disposition

- **Application Egress Proxy**: Chromium routes all HTTP/HTTPS navigation and subrequests through an internal socket-level forward proxy (`SSRFEgressProxy`). Target hosts are resolved and strictly validated at connection time against IPv4/IPv6 loopback, RFC1918 private subnets, link-local metadata (`169.254.169.254`), and multicast ranges before establishing tunnels.
- **DNS Rebinding Defense**: Socket destinations are pinned directly to validated IPs; time-of-check to time-of-use IP changes immediately trigger `HTTP 403 Forbidden` and abort outbound packets.
- **Boundary / Unverified Scope**: Kernel and container network-namespace egress filtering (`iptables`/`nftables`) is **UNTESTED** and not enforced within the Actor container. Threat models requiring zero socket egress outside the application proxy must enforce container network policies or VPC security groups at the runtime/cluster layer.

# Actor input Schema

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

List of URLs to capture screenshots or render to PDF.

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

Select whether to generate PNG screenshot, PDF document, or both.

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

Capture the entire scrollable height of the webpage.

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

Browser viewport width in pixels.

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

Browser viewport height in pixels.

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

Additional wait time in milliseconds after DOM load before capturing.

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

Maximum navigation and rendering timeout in seconds.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "format": "BOTH",
  "fullPage": true,
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "delayMs": 500,
  "timeoutSec": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

Extracted dataset items pushed to the default Dataset.

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

Summary metadata and run statistics.

# 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://example.com"
    ],
    "format": "BOTH",
    "fullPage": true,
    "viewportWidth": 1920,
    "viewportHeight": 1080,
    "delayMs": 500,
    "timeoutSec": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepaksheoran172/website-screenshot-pdf").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://example.com"],
    "format": "BOTH",
    "fullPage": True,
    "viewportWidth": 1920,
    "viewportHeight": 1080,
    "delayMs": 500,
    "timeoutSec": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("deepaksheoran172/website-screenshot-pdf").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://example.com"
  ],
  "format": "BOTH",
  "fullPage": true,
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "delayMs": 500,
  "timeoutSec": 20
}' |
apify call deepaksheoran172/website-screenshot-pdf --silent --output-dataset

```

## MCP server setup

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

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/sRzlX9rQq1Ek0czGb/builds/06ze9uhLZMAIPgcUO/openapi.json
