API Documentation

Use our simple API to capture screenshots of websites.

Making an API request

To create a screenshot send a GET or POST request to this endpoint.

https://screenshotapi.net/api/v1/screenshot

Example

To make a screenshot of Github.com add the url parameter to the request.

https://screenshotapi.net/api/v1/screenshot?url=github.com

Authentication

Add the token parameter with your API token to the request to authorize yourself.

https://screenshotapi.net/api/v1/screenshot
    ?url=screenshotapi.net
    &token=YOUR_API_TOKEN

Parameters

This is a list of all parameters that you can add to the request.

Parameter Type Default value Description
token string '' Your API token.
url string '' The url of the website.
width int 1680 The width of the browser in pixels.
height int 876 The height of the browser in pixels.
full_page boolean false If true a screenshot of the entire webpage will be made.
fresh boolean false If true this will force a fresh screenshot (instead of a cached screenshot).
output string 'json' You can select json as output, or the raw image by setting it to image.
thumbnail_width int null The width of the output image, the aspect ratio will be preserved. If not set then the browser width is used.
delay int 0 How many milliseconds to wait before taking the screenshot.
accept_languages string 'en-US,en;q=0.8' The accept languages header to set.
user_agent string '' The user agent string to set.
ttl int 2592000 How many seconds the screenshot should be cached. Default is 30 days.
css_url string '' A specific CSS stylesheet URL to inject in the page.
css string '' CSS code to inject in the page.

Query builder

Use our query builder to explore our API.
(If you are logged in your API token is automatically added)

Code Examples

These code examples show how to save a website screenshot to a file.