Screenshot API for PHP

Capturing website screenshots from PHP usually means running and scaling a headless browser yourself. With Snapraven you skip all of that — call the screenshot API from plain PHP with cURL.

What you can build with PHP

Add link thumbnails to a plain-PHP site, build a small directory of site previews, or run a cron script that refreshes captured images — with nothing but core cURL.

Example in PHP

$ch = curl_init('https://api.snapraven.app/v1/screenshot?url=' . urlencode($target));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . SNAPRAVEN_KEY]);
$png = curl_exec($ch);

That's the entire integration. Snapraven renders the page in a real Chromium browser and returns a PNG or JPEG. Add fullPage=true for the full scrollable page, or width/height for custom viewports.

💡 Tip for PHP

Cache the captured file to disk and serve that, refreshing on a cron, so you’re not calling the API on every page request.

Why developers use Snapraven with PHP

PHP screenshot API — FAQ

Do I need a framework?

No — core PHP with cURL works. The same call drops into Laravel, Symfony, or WordPress if you use one.

How do I keep pages fast?

Save the image once, serve the cached file, and refresh it on a schedule with cron.

Other guides

Not a developer? Capture screenshots with no code in the dashboard — paste URLs and download a ZIP.

Add screenshots to your PHP app today

Get your free API key