MCP Screenshot — Playwright PNG Capture, Custom Viewport avatar

MCP Screenshot — Playwright PNG Capture, Custom Viewport

Pricing

Pay per usage

Go to Apify Store
MCP Screenshot — Playwright PNG Capture, Custom Viewport

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

Alex

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

4 days ago

Last modified

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

  1. AI Vision Pipelines — Feed webpage screenshots into GPT-4V, Claude, or Gemini for visual analysis: layout review, design feedback, content extraction from images.
  2. Visual Regression Testing — Capture screenshots before and after deployments. Compare them to detect unintended UI changes across your web application.
  3. Website Change Monitoring — Schedule periodic screenshots of competitor landing pages, pricing pages, or product listings. Detect visual changes that text-based monitoring misses.
  4. Content Archiving — Create visual snapshots of web pages for legal compliance, evidence preservation, or historical records.
  5. Thumbnail Generation — Automatically generate preview thumbnails for link aggregators, dashboards, or content management systems.
  6. Social Media Previews — Capture how your webpage looks to create accurate social media preview images instead of relying on OG tags.
  7. Accessibility Audits — Screenshot pages at different viewport sizes to verify responsive design and mobile compatibility.

Input Parameters

ParameterTypeRequiredDefaultUI editorDescription
urlstringYestextfieldWebpage URL to capture (e.g., https://stripe.com)
fullPagebooleanNofalsecheckboxSet to true to capture the entire scrollable page, not just the viewport
widthintegerNo1280API/SDK onlyViewport width in pixels — pass via JSON when calling the actor programmatically
heightintegerNo720API/SDK onlyViewport 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

  1. Browser Launch — Starts a headless Chromium instance via Playwright.
  2. Page Navigation — Navigates to the target URL with domcontentloaded wait (45s timeout), then waits up to 15s for the load event (networkidle was dropped — it hangs on sites with SSE/WebSocket/analytics traffic such as stripe.com).
  3. Render Buffer — Waits an additional 2 seconds after load to allow late-loading elements (lazy images, animations, deferred scripts) to render.
  4. Screenshot Capture — Takes a PNG screenshot of the viewport (or full scrollable page if fullPage is true).
  5. Storage — Saves the PNG buffer to Apify Key-Value Store under the key screenshot_<unix_ms>.
  6. Output — Pushes metadata (URL, title, screenshot download URL, file size, dimensions) to the dataset.

Viewport Presets (for API/SDK callers)

PresetWidthHeightUse Case
Desktop HD19201080Standard desktop monitoring
Desktop1280720Default, good balance of speed and detail
Tablet7681024iPad-style responsive testing
Mobile375812iPhone-style mobile screenshots

Integration with AI Agents

// Node.js — Apify SDK
import { 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 Client
from apify_client import ApifyClient
client = 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

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