/// GENERATE
2 credits

Screenshot API — pixel-accurate page captures

Full-page or viewport captures with retina scale, ad blocking and JS wait strategies.

/// Quick answer

The Screenshot API captures any public webpage as a PNG or JPEG in one REST call. Choose full-page or a fixed viewport, retina scale, ad blocking, element hiding and a wait strategy (load, networkidle, or a CSS selector) so JavaScript-heavy pages finish rendering before capture. The same SSRF guard as url-to-pdf refuses private and metadata addresses. Two credits per capture.

Try Screenshot API — free →Read the docs

How does the Screenshot API work?

One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.

curl -X POST https://www.ashdocs.com/api/v1/tools/screenshot \
  -H "X-API-Key: ash_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","options":{"viewport":{"width":1280,"height":800},"scale":2,"wait_for":"networkidle"}}'

Common use cases

Frequently asked questions

How do I screenshot a JavaScript-heavy page?+

Set options.wait_for to networkidle or to a CSS selector that appears when the page is ready, and add delay_ms for animations. The capture fires only after the condition is met.

Can I hide cookie banners and chat widgets?+

Yes — pass their CSS selectors in options.hide_selectors and they are removed before capture. block_ads strips common ad frames too.

Full page or viewport?+

options.full_page captures the entire scroll height; otherwise you get exactly the viewport you specify. Use scale 2 for retina-sharp output.

Can I screenshot internal or private URLs?+

No. The endpoint enforces the same SSRF protection as url-to-pdf — private ranges, loopback and cloud metadata addresses are refused with a 400 ssrf_blocked error.

RELATED TOOLS