MCP Screenshot — Playwright PNG Capture, Custom Viewport
Pricing
Pay per usage
MCP Screenshot — Playwright PNG Capture, Custom Viewport
17 runs. Playwright screenshot → PNG in Apify KV. Returns screenshotUrl + title + dimensions + fileSize. Custom viewport. For LLM agents + MCP servers + visual regression. Backed by 951-run Trustpilot flagship + 31-actor portfolio. spinov001@gmail.com · blog.spinov.online · t.me/scraping_ai
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Alex
Actor stats
0
Bookmarked
2
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Share
MCP Screenshot - Capture Any Webpage as PNG for AI Agents & Visual Monitoring
Need your AI agent to "see" a webpage but LLMs only process text? Screenshots bridge the gap between visual web content and AI understanding. Manual screenshot workflows do not scale. What if your AI agent could capture any URL as a high-resolution PNG in seconds — viewport or full page — and get back a direct download link?
MCP Screenshot is an Apify actor that uses Playwright (Chromium) to render any webpage and capture it as a PNG image. Supports custom viewport dimensions (width/height) when called via the Apify API/SDK, full-page scrollable captures, and stores the result in Apify Key-Value Store with a direct download URL. Built for AI vision pipelines, visual regression testing, change monitoring, and content archiving.
Features
- Full Chromium rendering via Playwright — captures JavaScript-rendered pages, SPAs, and dynamic content
- Viewport or full-page capture modes
- Custom viewport dimensions (default: 1280x720) — settable via API/SDK input JSON
- Waits for
domcontentloaded(45s timeout) +load(15s soft timeout) + 2-second buffer to ensure complete page rendering - PNG output stored in Apify Key-Value Store with direct download URL
- Returns file size, page title, and metadata alongside the screenshot
- Headless execution — no GUI required
- Graceful error handling — returns
{url, error}to the dataset instead of crashing on unreachable URLs
Output Data Example
{"url": "https://stripe.com","title": "Stripe | Financial Infrastructure for the Internet","screenshotKey": "screenshot_1710842400000","screenshotUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/screenshot_1710842400000","width": 1280,"height": 720,"fullPage": false,"fileSize": 487231,"scrapedAt": "2026-03-19T10:30:00.000Z"}
On error (unreachable URL, navigation timeout, etc.):
{"url": "https://example.invalid","error": "page.goto: net::ERR_NAME_NOT_RESOLVED at https://example.invalid"}
Use Cases
- AI Vision Pipelines — Feed webpage screenshots into GPT-4V, Claude, or Gemini for visual analysis: layout review, design feedback, content extraction from images.
- Visual Regression Testing — Capture screenshots before and after deployments. Compare them to detect unintended UI changes across your web application.
- Website Change Monitoring — Schedule periodic screenshots of competitor landing pages, pricing pages, or product listings. Detect visual changes that text-based monitoring misses.
- Content Archiving — Create visual snapshots of web pages for legal compliance, evidence preservation, or historical records.
- Thumbnail Generation — Automatically generate preview thumbnails for link aggregators, dashboards, or content management systems.
- Social Media Previews — Capture how your webpage looks to create accurate social media preview images instead of relying on OG tags.
- Accessibility Audits — Screenshot pages at different viewport sizes to verify responsive design and mobile compatibility.
Input Parameters
| Parameter | Type | Required | Default | UI editor | Description |
|---|---|---|---|---|---|
url | string | Yes | — | textfield | Webpage URL to capture (e.g., https://stripe.com) |
fullPage | boolean | No | false | checkbox | Set to true to capture the entire scrollable page, not just the viewport |
width | integer | No | 1280 | API/SDK only | Viewport width in pixels — pass via JSON when calling the actor programmatically |
height | integer | No | 720 | API/SDK only | Viewport height in pixels — pass via JSON when calling the actor programmatically |
Note: width and height are accepted by the actor's runtime but are not exposed in the Apify Console form. To set them, call the actor via the API or SDK with a JSON input — see the "Integration with AI Agents" section below.
How It Works
- Browser Launch — Starts a headless Chromium instance via Playwright.
- Page Navigation — Navigates to the target URL with
domcontentloadedwait (45s timeout), then waits up to 15s for theloadevent (networkidlewas dropped — it hangs on sites with SSE/WebSocket/analytics traffic such asstripe.com). - Render Buffer — Waits an additional 2 seconds after
loadto allow late-loading elements (lazy images, animations, deferred scripts) to render. - Screenshot Capture — Takes a PNG screenshot of the viewport (or full scrollable page if
fullPageis true). - Storage — Saves the PNG buffer to Apify Key-Value Store under the key
screenshot_<unix_ms>. - Output — Pushes metadata (URL, title, screenshot download URL, file size, dimensions) to the dataset.
Viewport Presets (for API/SDK callers)
| Preset | Width | Height | Use Case |
|---|---|---|---|
| Desktop HD | 1920 | 1080 | Standard desktop monitoring |
| Desktop | 1280 | 720 | Default, good balance of speed and detail |
| Tablet | 768 | 1024 | iPad-style responsive testing |
| Mobile | 375 | 812 | iPhone-style mobile screenshots |
Integration with AI Agents
// Node.js — Apify SDKimport { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('knotless_cadence/mcp-screenshot').call({url: 'https://competitor.com/pricing',fullPage: true,width: 1920,height: 1080,});const { items } = await client.dataset(run.defaultDatasetId).listItems();const screenshotUrl = items[0].screenshotUrl;// Pass screenshotUrl to your vision model
# Python — Apify Clientfrom apify_client import ApifyClientclient = ApifyClient(token="<APIFY_TOKEN>")run = client.actor("knotless_cadence/mcp-screenshot").call(run_input={"url": "https://competitor.com/pricing","fullPage": True,"width": 1920,"height": 1080,})items = list(client.dataset(run["defaultDatasetId"]).iterate_items())screenshot_url = items[0]["screenshotUrl"]
Honest limitations
- No CAPTCHA handling. If the target page returns a CAPTCHA or bot wall (e.g. Cloudflare interstitial), the screenshot will capture that page, not the underlying content.
- No authentication. Cannot log in to authenticated/paywalled URLs. If you need that, fork the actor and add cookie/state injection in
newContext(). - No proxy rotation. Runs from Apify's default outbound IPs. If the target rate-limits or blocks Apify CIDR ranges, the screenshot will fail with a network error.
- Screenshot is a single attempt. No retry on timeout — failed URLs are recorded in the dataset with the error string.
- PNG only. No JPEG, WebP, or PDF output. PNG was chosen for lossless quality at the cost of larger file size.
- No element-level screenshots. Captures viewport or full page, not specific selectors. For per-element captures, fork and pass a selector to
page.locator(...).screenshot().
More tools for AI agents
- MCP Web Search — Multi-source search for AI agents
- MCP Content Analyzer — Readability and keyword analysis
- MCP Data Enrichment — Domain intelligence in one call
- MCP Price Monitor — Extract prices from any product page
- All actors by knotless_cadence
15 MCP Servers for AI Agents
This is part of a complete MCP suite on Apify:
Research: Market Research · Company Researcher · Startup Validator Intelligence: Competitor Tracker · Trend Detector · Social Monitor Lead Gen: Lead Finder · Email Enrichment · Data Enrichment SEO/Content: SEO Analyzer · Content Analyzer · Keyword Research Utilities: Web Search · Price Monitor · Screenshot
Need data, not infrastructure? We build, you query.
This actor is part of a 78-actor portfolio (31 published) by an indie scraping/data engineer who's run web scraping pipelines on Apify since 2025. If you need a custom screenshot or scraping actor — for monitoring competitor sites, archiving content, building visual datasets, or feeding AI vision models — we offer 3 service tiers:
- Pilot — $97: 1 actor, basic config, 7-day support.
- Standard — $297: custom actor + Slack/email alerts on results, 30-day support.
- Premium — $797: custom actor + dashboard + 90-day support + 1 modification round.
Recently delivered: Paid 3-article series for Proxy-Seller (April 2026, $150) — Article #1 live on Dev.to: How to scale web scraping to 100K pages without getting blocked (2,320 words, sponsored disclosure). Track record: 31 published actors with real users — trustpilot-review-scraper 951 lifetime runs, reddit-discussion-scraper 82, email-extractor-pro 107.
📧 Email: spinov001@gmail.com 🌐 Blog & case studies: blog.spinov.online 💬 Telegram: @scraping_ai — practical web-scraping tips