# Website Screenshot & PDF for AI Agents (`poised_beardlichen/website-screenshot-pdf-agent`) Actor

Use this when an AI agent needs a clean screenshot or PDF of a web page (cookie banners, ads, chats removed). $0.0015/screenshot, $0.003/full page, $0.005/PDF. Input: {"url":"https://example.com"}. Output: screenshotUrl, title, status, width, height. Fast single-page runs.

- **URL**: https://apify.com/poised_beardlichen/website-screenshot-pdf-agent.md
- **Developed by:** [Isaac](https://apify.com/poised_beardlichen) (community)
- **Categories:** AI, Agents, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 & PDF for AI Agents: Clean Captures, No Cookie Banners

**Use this when an AI agent, LLM workflow or script needs to *see* a web page.** Give it a URL and it returns a clean **PNG, JPEG, WebP screenshot or a PDF**, with cookie banners, GDPR consent pop-ups, ads and chat bubbles removed. You get a public `screenshotUrl` that your agent can pass to a vision model, attach to a report or store.

This is a lightweight copy of the [Website Screenshot & PDF API](https://apify.com/poised_beardlichen/website-screenshot-pdf), built for agent tool calls. It uses the same capture engine and prices but runs as a normal Actor (no Standby). The input is a single `url`, the defaults are tuned so one capture finishes in about 10–20 seconds, and pricing is fixed per item so agents can predict costs.

### Use in ChatGPT or Claude

Add this tool to your AI assistant as a custom connector (MCP server) with this URL:

```
https://mcp.apify.com?tools=poised_beardlichen/website-screenshot-pdf-agent
```

- **ChatGPT:** Settings → Apps & Connectors → Create (needs Developer mode), paste the URL, choose OAuth and sign in to Apify.
- **Claude:** Settings → Connectors → Add custom connector, paste the URL, then click Connect.

Runs go on your own Apify account at the same per-event prices, so the free plan's monthly credit applies.

### Try it free

Apify's free plan includes **$5 of usage every month, no credit card**. On this Actor that's about **3,300 screenshots** or 1,000 PDFs a month, so you can test it on your real data before paying anything.

### Pricing

Pay per successful capture. There's no start fee or subscription, and platform usage is included:

| Event | Price |
|---|---|
| Viewport screenshot (PNG / JPEG / WebP, any device) | $0.0015 |
| Full-page screenshot | $0.003 |
| PDF of a page | $0.005 |

Pages that are blocked, return errors or fail to load are **not charged**. 1,000 screenshots cost $1.50.

### Input

Only `url` is needed:

```json
{ "url": "https://example.com" }
```

Common options:

- `format`: `png` (default), `jpeg`, `webp` or `pdf`
- `fullPage`: `true` captures the whole scrollable page
- `device`: `desktop` (default), `laptop`, `tablet`, `mobile` or `android`
- `urls`: a list of pages for batches

Advanced options are grouped and optional: custom viewport, retina, dark mode, a CSS selector for one element, wait conditions, custom CSS/JS and proxy.

### Output

One dataset item per capture:

```json
{
  "url": "https://example.com",
  "success": true,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../records/screenshot-example-com-desktop-1a2b3c4d5e.png",
  "title": "Example Domain",
  "status": 200,
  "width": 1920, "height": 1080,
  "device": "desktop", "format": "png",
  "durationMs": 2100, "error": null
}
```

When a site refuses the request (captcha or bot protection), the item has `success: false` and `blocked: true`, and it isn't charged.

### Use with AI agents (MCP)

Add the Actor to Claude Desktop, Cursor, VS Code or any MCP client through the [Apify MCP server](https://mcp.apify.com):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=poised_beardlichen/website-screenshot-pdf-agent",
      "headers": { "Authorization": "Bearer <YOUR_APIFY_TOKEN>" }
    }
  }
}
```

Then ask: *"Take a mobile screenshot of example.com and describe the hero section."*

### Calling it from an AI agent or a script (async pattern)

A single default screenshot usually finishes in about 10–20 seconds. The Apify MCP server waits only about 30–45 seconds for a run before it returns. So for batches, slow pages, or whenever a call returns before the run is done, start the run and fetch the results afterwards rather than waiting on it:

1. **Start the run:** `POST https://api.apify.com/v2/acts/poised_beardlichen~website-screenshot-pdf-agent/runs` with input such as `{"url": "https://example.com"}`. The response contains `data.id` (the run ID) and `data.defaultDatasetId`.
2. **Wait for it to finish:** poll `GET https://api.apify.com/v2/actor-runs/<runId>?waitForFinish=60` until `status` is `SUCCEEDED`.
3. **Fetch the results:** `GET https://api.apify.com/v2/datasets/<defaultDatasetId>/items?clean=true`.

Send your token as `Authorization: Bearer <APIFY_TOKEN>`. Through MCP, if the call returns a run ID instead of results, use the server's run-status and dataset tools (e.g. `get-actor-run`, then `get-dataset-items`) with that ID. For small, quick jobs you can use the synchronous endpoint `POST /v2/acts/poised_beardlichen~website-screenshot-pdf-agent/run-sync-get-dataset-items` instead, which waits for up to 300 seconds.

### FAQ

**How is this different from Website Screenshot & PDF API?** The capture engine and prices are the same. The original also offers a real-time HTTP endpoint (Standby mode) for apps. This copy is a plain Actor with an agent-friendly description and defaults.

**Does it bypass logins or paywalls?** No. It only captures publicly reachable pages.

**What if a site blocks it?** Set `proxyConfiguration` to Apify Proxy (residential). Blocked pages are flagged and not charged.

### Other tools by us

- [Audio & Video Transcriber (Whisper)](https://apify.com/poised_beardlichen/audio-video-transcriber): MP3, WAV, M4A and MP4 to text, timed segments and SRT subtitles at $0.006 per audio minute.
- [Bulk Email Verifier](https://apify.com/poised_beardlichen/email-verifier-bulk): syntax, MX, disposable and role-address checks at $0.30 per 1,000 emails.
- [Website Screenshot & PDF API](https://apify.com/poised_beardlichen/website-screenshot-pdf): bulk screenshots and PDFs of any page with cookie banners and pop-ups removed.
- [PDF to Text & Markdown with OCR](https://apify.com/poised_beardlichen/pdf-to-text-markdown-ocr): turn PDFs, DOCX and scans into clean, LLM-ready Markdown.
- [Image to Text OCR API](https://apify.com/poised_beardlichen/image-to-text-ocr): extract text from PNG, JPEG, TIFF and WebP images in 27 languages.
- [Bulk PageSpeed & Lighthouse Checker](https://apify.com/poised_beardlichen/pagespeed-lighthouse-checker): Lighthouse scores, Core Web Vitals and top fixes for many URLs.
- [Website Tech Stack Detector](https://apify.com/poised_beardlichen/tech-stack-detector): CMS, ecommerce, analytics, CDN and 7,600+ other technologies behind any website.
- [Research Paper Search](https://apify.com/poised_beardlichen/research-paper-search): arXiv, PubMed and Crossref papers plus legal open-access full text from $0.0015 per paper.
- [SEC EDGAR Financials & Filings](https://apify.com/poised_beardlichen/sec-edgar-financials): US company financials, filings and 10-K sections as compact JSON.
- [Website Legitimacy & Scam Check](https://apify.com/poised_beardlichen/website-legitimacy-check): domain age, SSL, look-alike brands, VAT and LEI signals at $0.008 per site.
- [Bulk Phone Number Validator](https://apify.com/poised_beardlichen/phone-number-validator): validity, E.164 format, line type and region for any number at $0.70 per 1,000.
- [Company Contact & Profile Extractor](https://apify.com/poised_beardlichen/company-contact-extractor): generic emails, phones, socials and profile from any company website at $0.004 per site.
- [UK & Australia Company Check](https://apify.com/poised_beardlichen/company-registry-check): ABN, ACN, ASIC and Companies House status and red flags from $0.003 per company.
- [Company Careers & Open Jobs Lookup](https://apify.com/poised_beardlichen/careers-jobs-lookup): open jobs from Greenhouse, Lever, Ashby and more at $0.0015 per job.
- [Domain Intelligence](https://apify.com/poised_beardlichen/domain-intelligence): WHOIS/RDAP, DNS, SPF/DMARC/DKIM and SSL for any domain at $0.002 per domain.
- [YouTube Transcript Scraper](https://apify.com/poised_beardlichen/youtube-transcript-scraper): YouTube captions to text, timestamped segments or SRT at $0.004 per video.

### More agent tools from Monie Tools

- [Website Tech Stack Detector — Wappalyzer Alternative](https://apify.com/poised_beardlichen/tech-stack-detector): to know what a website is built with: CMS, ecommerce platform, frameworks, analytics, ad pixels, CDN, hosting, payment and marketing tools, with versions.
- [Research Paper Search: arXiv, PubMed, Crossref + Full Text](https://apify.com/poised_beardlichen/research-paper-search): scholarly papers by topic, DOI, arXiv ID or PMID from arXiv, Crossref and Europe PMC/PubMed.
- [SEC EDGAR API: Financials, Filings & 10-K Sections](https://apify.com/poised_beardlichen/sec-edgar-financials): SEC data on a US public company: profile, standardised financials, filings, 10-K/10-Q sections or EDGAR full-text search.
- [Website Legitimacy & Scam Check: Domain Age, SSL, VAT, LEI](https://apify.com/poised_beardlichen/website-legitimacy-check): must judge if a website or company looks legitimate before buying, partnering or clicking.

# Actor input Schema

## `url` (type: `string`):

Shortcut for one page URL, e.g. "https://example.com". Combined with the list below; provide at least one of the two.

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

Web pages to capture, processed in parallel. "example.com" without https:// works too. Use "url" instead for a single page.

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

Image format, or PDF for a printable document.

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

Capture the whole scrollable page instead of just the visible viewport.

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

Viewport preset. Tablet and mobile use real device emulation (user agent, touch, pixel ratio).

## `hideCookieBanners` (type: `boolean`):

Remove cookie/consent pop-ups (OneTrust, Cookiebot, Didomi, Quantcast and more).

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

Block ads and trackers (EasyList/EasyPrivacy). Faster, cleaner pages.

## `hideChatWidgets` (type: `boolean`):

Hide Intercom, Drift, HubSpot, Zendesk and similar chat bubbles.

## `darkMode` (type: `boolean`):

Emulates prefers-color-scheme: dark.

## `devices` (type: `array`):

Capture every URL on several devices in one run. Overrides "Device".

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

Overrides the preset width.

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

Overrides the preset height.

## `scaleFactor` (type: `integer`):

Device pixel ratio. 2 = retina-sharp images (4× pixels).

## `selector` (type: `string`):

Screenshot only this element, e.g. "#pricing" or "article".

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

Page-load event to wait for. "networkidle" is slower but safest for heavy apps.

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

Wait until this element is visible before capturing.

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

Additional wait before capture, for animations.

## `scrollToBottom` (type: `boolean`):

Scroll first so lazy images load (full-page and PDF only).

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

Max time for navigation and waiting per attempt. Default 30 s.

## `maxRetries` (type: `integer`):

Retries after network errors or timeouts. Default 1.

## `customCss` (type: `string`):

CSS injected into every page, e.g. ".promo{display:none}".

## `customJs` (type: `string`):

Script run in the page before capture (may be async).

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

Ignored for PNG and PDF.

## `maxFullPageHeight` (type: `integer`):

Very long pages are cut at this height.

## `pdfFormat` (type: `string`):

Only for PDF output.

## `pdfLandscape` (type: `boolean`):

Only for PDF output.

## `maxConcurrency` (type: `integer`):

Pages captured in parallel.

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

Optional Apify Proxy for sites that block data-centre traffic or for a country version.

## `chargeErrorPages` (type: `boolean`):

HTTP 4xx/5xx and bot-protection pages are saved as failed and not charged by default. Enable to keep them as normal results.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://en.wikipedia.org/wiki/Web_scraping"
  ],
  "format": "png",
  "fullPage": false,
  "device": "desktop",
  "hideCookieBanners": true,
  "blockAds": true,
  "hideChatWidgets": true,
  "darkMode": false,
  "waitUntil": "load",
  "delayMs": 300,
  "scrollToBottom": true,
  "timeoutSecs": 30,
  "maxRetries": 1,
  "quality": 80,
  "maxFullPageHeight": 16000,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "chargeErrorPages": false
}
```

# Actor output Schema

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

Dataset items: url, device, success, finalUrl, status, title, screenshotUrl, width, height, bytes, durationMs, error.

## `screenshots` (type: `string`):

PNG, JPEG, WebP or PDF files, one per successful capture.

# 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://en.wikipedia.org/wiki/Web_scraping"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("poised_beardlichen/website-screenshot-pdf-agent").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://en.wikipedia.org/wiki/Web_scraping",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("poised_beardlichen/website-screenshot-pdf-agent").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://en.wikipedia.org/wiki/Web_scraping"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call poised_beardlichen/website-screenshot-pdf-agent --silent --output-dataset

```

## MCP server setup

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

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/ER0VDNQxAavtrSNTL/builds/PR0kbymrx6jL8U264/openapi.json
