Screenshot API for Astro

Capturing website screenshots from Astro usually means running and scaling a headless browser yourself. With Snapraven you skip all of that — capture screenshots at build time for static cards and previews.

What you can build with Astro

Bake screenshots into a static showcase, project gallery, or “sites built with” page at build time, so the rendered images ship as part of your static output with zero runtime cost.

Example in Astro

const res = await fetch(
  `https://api.snapraven.app/v1/screenshot?url=${url}`,
  { headers: { 'x-api-key': import.meta.env.SNAPRAVEN_KEY } }
);

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 Astro

Call it in component frontmatter so the image is generated during `astro build`, and cache results to disk so rebuilds skip URLs that haven’t changed.

Why developers use Snapraven with Astro

Astro screenshot API — FAQ

Build-time or runtime?

For static pages, call it in `.astro` frontmatter so images are baked in at build time. Use an endpoint or SSR for on-demand captures.

Will it slow my build?

Only on first run. Cache the captured files and reuse them on subsequent builds so unchanged URLs aren’t re-rendered.

Other guides

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

Add screenshots to your Astro app today

Get your free API key