Skip to content

How to slice full-page screenshots

When you analyze website screenshots with AI, very tall full-page screenshots can be hard to process well. Based on customer feedback, slicing a full-page screenshot into smaller vertical images can produce better analysis results than sending one very large image.

ScreenshotOne can render the full page normally, split the final image into slices, upload every slice to ScreenshotOne cache storage, and return slice URLs.

Basic request

Set full_page=true and full_page_slices=true:

https://api.screenshotone.com/take?url=https://example.com&full_page=true&full_page_slices=true&response_type=json&access_key=<your access key>

The JSON response includes a slices array:

{
"slices": [
{
"index": 0,
"offset_y": 0,
"width": 1280,
"height": 4000,
"url": "https://cache.screenshotone.com/..."
}
]
}

You can then send the slice URLs to your AI workflow one by one instead of sending one huge full-page screenshot.

Control slice height

Use full_page_slice_height to control the maximum height of each slice:

https://api.screenshotone.com/take?url=https://example.com&full_page=true&full_page_slices=true&full_page_slice_height=3000&response_type=json&access_key=<your access key>

The default value is 4000. The minimum value is 1, and the maximum value is 16000.

If the final screenshot is shorter than full_page_slice_height, ScreenshotOne returns one slice.

Add overlap between slices

Use full_page_slice_overlap_height when you want adjacent slices to share some vertical context:

https://api.screenshotone.com/take?url=https://example.com&full_page=true&full_page_slices=true&full_page_slice_height=4000&full_page_slice_overlap_height=500&response_type=json&access_key=<your access key>

For example, with an image height of 8000, slice height of 4000, and overlap height of 500, the slices are:

  • 0..4000
  • 3500..7500
  • 7000..8000

Validation rules

The slice options have a few safeguards:

  • full_page_slices=true requires full_page=true.
  • full_page_slices=true does not support store=true.
  • full_page_slice_height must be between 1 and 16000.
  • full_page_slice_overlap_height must be 0 or greater.
  • full_page_slice_height - full_page_slice_overlap_height must be at least 100.

The last rule prevents accidental configurations that would generate too many tiny steps between slices.

Binary responses

If you use a non-JSON response type, the screenshot response remains binary. The slice manifest URL is returned in the X-ScreenshotOne-Full-Page-Slices-URL response header.

For most AI analysis workflows, response_type=json is simpler because it returns the slice URLs directly in the response body.