Skip to content

Screenshot all pages of a website from its sitemap

To scan all pages of a website, take the list of addresses from its sitemap.xml and send it to the CurlShot bulk endpoint, 100 pages per call. Every page is rendered in a real browser and you collect the screenshots with one status request per batch or by webhook. CurlShot does not crawl a site by following links, and it does not check links or SEO: it makes a picture of each address you give it, so the sitemap supplies the list.

Request
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://example.com/about&full_page=true&format=webp&cache=true" \
  --output about.webp

How to screenshot every page of a website in three steps

  1. 1

    Read the addresses from the sitemap.xml of the site (or from your own list).

  2. 2

    Send them to the bulk endpoint in groups of up to 100.

  3. 3

    Collect the screenshots with the batch status request, or receive each by webhook.

A script that follows the sitemap

The script reads a sitemap.xml, splits the addresses into groups and sends each group as one bulk call. It stops on an API error instead of saving the error as a result. If the sitemap is an index that lists other sitemaps, run it on each of them.

  • The jobs in each batch come back in the same order as the addresses you sent, so the first job belongs to the first address.
  • Ask the batch_url with your access key to see how far the batch is and to get a link to every finished file. Or add webhook_url to the call and each result is sent to you as it finishes.
  • Add viewport_device=iphone_15_pro to a second run to see every page in its phone layout.
  • Each successful render counts as one screenshot, so a site with 400 pages in its sitemap uses 400 of your monthly allowance.
Node.js 18 or later
const sitemap = 'https://example.com/sitemap.xml'
const xml = await (await fetch(sitemap)).text()
const urls = [...xml.matchAll(/<loc>([^<]+)<\/loc>/g)].map((m) => m[1].trim())

for (let i = 0; i < urls.length; i += 100) {
  const response = await fetch('https://curlshot.com/api/v1/bulk', {
    method: 'POST',
    headers: { 'X-Access-Key': process.env.ACCESS_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({
      requests: urls.slice(i, i + 100).map((url) => ({ url, full_page: true, format: 'webp', block_cookie_banners: true })),
    }),
  })
  if (!response.ok) throw new Error('Bulk call failed: ' + response.status + ' ' + (await response.text()))
  const batch = await response.json()
  console.log(batch.batch_id, 'started:', batch.jobs.length, 'pages. Status at', batch.batch_url)
}

What people use it for

  • A screenshot of every page of a site before and after a redesign, to compare them
  • A visual record of a client site, page by page
  • Looking at every template of your own site on phone and desktop sizes
  • Thumbnails for every page of a directory or a documentation site

For developers: one request

The same thing from your own code. It is a plain HTTP request, so it works from any language. Create a free account to get an access key.

Questions people ask

How do I scan all the pages of a website?

Read the address list from the sitemap of the site, usually /sitemap.xml, and send it to the CurlShot bulk endpoint. Each address becomes one screenshot job. The script on this page does the reading and the sending.

Does it crawl a website by following links?

No. CurlShot renders the addresses you send and nothing else, so a page that is not in the sitemap is not captured unless you add its address to the list.

Does it check for broken links or SEO problems?

No. It makes a picture of each page, which is what you need to compare versions of a site or to look at every template. A link checker or an SEO crawler is a different tool.

How many pages can I capture, and what does it cost?

One bulk call takes up to 100 pages, and you can send as many calls as your plan allows. Each successful render counts as one screenshot; failed renders are not counted. The pricing page shows the allowance of each plan and which plans include bulk.

Take as many screenshots as you need

A free account gives you 100 screenshots every month and keeps them in one place. No card needed.