Screenshots and page images

A screenshot API hands you a link, not a picture, and the link has an expiry date. Capture pages for thumbnails and visual checks, keep the files you need, and list the images a page actually serves.

Text and metadata tell you what a page says. A screenshot tells you what it looks like, which is the only thing that catches a broken stylesheet, a cookie wall covering the content, a hero image that failed to load, or a competitor's redesign. And an image inventory tells you what the page loads, which matters for performance work, asset audits and checking that nobody is hotlinking your CDN.

Both APIs in this lesson return URLs rather than file contents. That one design decision drives most of the code you write around them.

Capturing a page

Website Screenshot renders a URL in a browser and stores the image. It costs 40 credits, the most expensive call in this course, so it pays to know the parameters before you start looping.

ParameterDefaultNotes
urlrequiredThe page to capture
typepngImage format; see the note below
width1920Viewport width, 100 to 3840 pixels
height1080Viewport height, 100 to 3840 pixels
fullpagefalsePremium. Capture the whole scrollable page instead of the viewport
Try it liveWebsite Screenshot40 credits
POSThttps://api.apiverve.com/v1/webscreenshots
curl -X POST "https://api.apiverve.com/v1/webscreenshots" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","width":1280,"height":800,"type":"jpeg"}'
Sign in or create a free account to run this with your own key.

imageName ends in .jpg. downloadURL is a signed link and expires is in milliseconds.

The response:

{
  "width": 1280,
  "height": 800,
  "scaleFactor": 1,
  "imageName": "1423a6ce-....jpg",
  "expires": 1792867371256,
  "url": "https://example.com",
  "downloadURL": "https://storage.googleapis.com/apiverve/APIData/webscreenshots/1423a6ce-....jpg?GoogleAccessId=...&Expires=1792867371&Signature=..."
}

width, height and scaleFactor (the device pixel ratio used) are premium fields that report what was actually captured. imageName and downloadURL are what you use.

On format: png and jpeg behaved as expected in testing. A request for webp came back with a .png image name, so check the extension of imageName rather than trusting the format you asked for, and convert locally if you need WebP. JPEG is the better default for photographs and busy pages, typically a fraction of the PNG size. PNG is better for text-heavy pages you plan to compare pixel by pixel, because JPEG compression noise shows up as differences that are not there.

The viewport is the layout

width is not just the image size. It is the browser window the page is laid out in, so it decides which responsive breakpoint you capture. A 390-pixel width gets the mobile layout with the hamburger menu; 1280 gets the desktop layout. If you are checking that a page works on phones, capture at a phone width. Do not capture at 1920 and shrink the image afterwards, which gives you a tiny desktop page, not a mobile one.

height is the visible window, and without fullpage the capture stops there. For "what does a visitor see before scrolling", that is exactly what you want.

Check yourself

You need to check that a landing page's mobile layout is not broken. Which capture is right?

Answer the check above to continue.

Run every example on your own key. Free plan, no card.

Scaling up?

Volume pricing, custom SLAs, and dedicated support for high-traffic teams.

Contact sales