GET 25 FREE SCREENSHOTS PER MONTH  →
API REFERENCE

Quick Snap

Capture an instant screenshot of any web page with one GET request to the PagePixels Screenshot API. Pass a url and your access_token, and the snap endpoint returns the image.

BASE URL https://api.pagepixels.com
GET YOUR FREE API KEY →
ENDPOINT

Quick Snaps

GET /snap

Create an instant screenshot using the snap endpoint with only two required arguments:

Option Expected Value
url The URL for the web page you want to capture.
access_token Your account's Private API Key.

This example uses the Mars Rover Perseverance's Wikipedia page as the value for the url:

GET REQUEST /snap http
https://api.pagepixels.com/snap?url=https://en.wikipedia.org/wiki/Perseverance_(rover)&access_token=your-api-key

Returns the requested screenshot image as the result if successful.

JSON Parameter

By default, the snap endpoint returns the screenshot image as a raw binary. To get a link to the screenshot image instead of the raw version, you can use the json parameter.

Key Description
json Pass json=true to receive links to the image and thumbnail, instead of the raw image.

More Options

All screenshots are highly configurable using the Screenshot API Options as parameters in your URL or POST body.

AI Analysis

Want the AI to look at the page too? Add analyze_image_with_ai=true and an ai_prompt and the answer comes back with the screenshot. You can also ask for the answer as structured JSON, or run the analysis on your own Claude, OpenAI or OpenRouter account. See AI Analysis Screenshots for the details and examples.

TTL Parameter

Captured screenshots are automatically saved to Your Account. If the same URL is used again within 24 hours, the saved version is delivered via our CDN network for fast delivery.

Screenshot count: Saved deliveries do not count against your monthly screenshot limit.

The 24 hour time period can be increased or decreased by specifying the period in seconds using the ttl parameter.

For instance, the example below will capture the screenshot and then only deliver the saved version for the next 10 minutes on subsequent requests. If the URL is requested again after 10 minutes, a new screenshot will be captured and delivered.

GET REQUEST /snap http
https://api.pagepixels.com/snap?ttl=600&url=https://en.wikipedia.org/wiki/Perseverance_(rover)&access_token=your-api-key

Public Web Pages

If you use the snap endpoint on a public web page, as opposed to a backend process, you probably do not want to use your private API Key. If you do, anyone could use it without your permission.

PagePixels provides the API Secret Token and API Publishable Key to solve this problem.

Here is a quick example of how this can work in Ruby

Ruby ruby
require 'openssl'

# SPECIFY THE IMAGE LOCATION

url_to_image = "https://en.wikipedia.org/wiki/Perseverance_(rover)"

# SET YOUR API SECRET TOKEN AND API PUBLISHABLE KEY

api_secret_token = "your-api-secret-token"

api_publishable_key = "your-api-publishable-key"

# GENERATE YOUR HMAC SHA1 HASH WITH YOUR SECRET TOKEN AND IMAGE URL

api_hash_key = OpenSSL::HMAC.hexdigest('sha1', api_secret_token, url_to_image)

=> "2dbe2a4799de317572d81a5a9aceffcd9255067d"

# CREATE YOUR API URL WITH YOUR IMAGE URL, HASH KEY, AND API PUBLISHABLE KEY

request_location = "https://api.pagepixels.com/snap?url=#{url_to_image}&hash_key=#{api_hash_key}&access_token=#{api_publishable_key}"

=> "https://api.pagepixels.com/snap?url=https://en.wikipedia.org/wiki/Perseverance_(rover)&hash_key=2dbe2a4799de317572d81a5a9aceffcd9255067d&access_token=your-api-publishable-key"

Support

Questions? Contact us anytime by email:

Or send us a message through our Support page.

FREE PLAN

Start free. Upgrade when you’re ready.

Every feature and integration is included on the free plan. No credit card and no phone number required.

Free $0 / month
25 screenshots every month
32 MB of Real Location proxy bandwidth
25 AI Analysis credits