× We're in Beta! so you can experiment with this API for free until we're ready to start charging.

http://api.snapito.com/(web|mobile|desktop)/<api-key>/<size>?url=<URL>[params]

http://api.snapito.com/(web|mobile|desktop)/<api-key>/<size>/<domain>(NO PARAMS)


Intro

To track usage we require an API Key. You can generate your key using our simple API Key Generator Please supply the correct web/mobile/desktop value at the beginning so that we can tailor and improve your experience. The advanced parameters are detailed below

Websites

We will in the future be supporting script based automatic thumbnailing, in the meantime you can use our standard URL based API.

http://api.snapito.com/web/<api-key>/<size>?url=<URL>[advanced parameters]

Sizes

Snapito! supports the following pre built sizes:

 
Size Code Description Dimensions
full Full Page 1024x????
lc Large Clipped 1024x768
mc Medium Clipped 320x200
sc Small Clipped 80x50

http://api.snapito.com/web/abc123/full/cnn.com
                http://api.snapito.com/web/abc123/sc?url=cnn.com

You can also provide the size as an arbitrary <width>x<height> size

http://api.snapito.com/web/abc123/900x200/cnn.com

Advanced Parameters

Freshness

The freshness parameter tells us approximately how old in seconds you are happy for the screenshot to be, note that a value of 0 means indefinitely old, so set it to 1 if you want the latest version of the snapshot.

http://api.snapito.com/web/abc123/full/cnn.com?freshness=1

Type

The type parameter tells Snapito! what format to supply the image in, the default is PNG for high quality results but you can specify 'jpeg' if you would prefer it in that format.

http://api.snapito.com/web/abc123/full/cnn.com?type=jpeg

Fast

The fast parameter indicates you are in a hurry and are willing to sacrifice completeness (like Flash rendering) for speed.

http://api.snapito.com/web/abc123/full/cnn.com?fast

Timestamp

The timestamp parameter will add a record of the snapshot to our database and return the following non-repudiation headers to the response

            X-Snapito-Non-Repudiation-Image-Length
            X-Snapito-Non-Repudiation-Image-Hash
            X-Snapito-Non-Repudiation-Time (in milliseconds since 1970)
            X-Snapito-Non-Repudiation-Computed-Hash  (the url, time and image hash - hashed with a secret)
            X-Snapito-Non-Repudiation-URL (the exact URL used for non-repudiation)
        
http://api.snapito.com/web/abc123/full/cnn.com?timestamp

Response

If your client is programatic (i.e. you are not just placing our URL in a web page) it is important to ensure your HTTP Client responds to various HTTP responses that can come back from our API.

Response Codes

200

Result provided as requested.

204

Your request is valid and there was no apparent error, but there is nothing to give you. Check for appropriate X-Snapito headers.

400

You've passed an invalid parameter, see the corresponding message.

307

Temporary redirect, check for X-Snapito headers (see below) to find out more or follow the redirect (URL is in the 'Location' header).

5xx

This is an internal error, please contact us with the problem and we'll get onto it.

Response Headers

We provide a variety of response headers that contain further information about the image or response returned.

X-Snapito-Contains-Flash

The requested URL contains Flash, and that's why it took so long to capture it, use the fast parameter in the URL to bypass this

X-Snapito-Not-Ready

This header is returned if the image has not finished processing, it's value is how long to wait before retrying, in seconds. This header is typically returned with a HTTP status code of 307. Unless a parameter of redirect=none is passed to the API in which case a 204 code is returned.

X-Snapito-Not-Ready: 10

X-Snapito-CDN-Redirect

The result of your API request is available on a Content Delivery Network, the value of this header is the URL on the CDN. This URL is not permanent and the header is typically returned with a HTTP status code of 307.

X-Snapito-CDN-Redirect:http://c769801.r1.cf3.rackcdn.com/376df72cf4534f03770521201948dffeae83e030