Developer API

SiteThumbshot, a website snapshot service is simply HTTP GET or POST request. The web page thumbnail service parameters are passed as simple HTTP parameters.

All requested URLs start with the host-name (customized URLs available for premium users) and resemble the following code:

http://images.sitethumbshot.com/

How to request a thumbnail:

You can request screenshots with your key using this simple API - but please always bear in mind our Terms and Conditions:

Append to the standard request url above the method followed by a question mark.

http://images.sitethumbshot.com/?

The method is followed by the actual query parameters, which take the form argument=value, where the arguments and values are url encoded. Multiple parameters are separated by an ampersand (&).

http://images.sitethumbshot.com/?size=[size]&key=[key]&url=[url]&format=[format]&quality=[quality]

Parameter Type Description
key String (required) All requests to SiteThumbshot service require a key. Sign-up and get your own key.
url String (required) The url to get the thumbnail for. The url must start with http:// or https://. Try to encode url parameter (in PHP you can use urlencode function for this purpose) otherwise in some cases you might get "Forbidden 403" error.
size String (Optional), default is T if not provided The size of thumbnail. Available sizes are: T (80 x 60), S (120 x 90), M (200 x 150), XM (400 x 300), L (640 x 480), ML (800 x 600) and XL (1024 x 768). If the parameter value is not set, the T size will be returned. Check your plan to see what sizes you can access in your plan.
format String (Optional) JPG/GIF/PNG. Default is JPG for all packages, only JPG format is available for Free users.
quality String (Optional) Quality of generated thumbnail. Check your plan for available value(s) of this parameter.
hash String (Optional)

If you are using your key in a way that it is exposed to public (e.g. you are directly calling our API on HTML pages) then you can use this parameter to safeguard your key. This parameter will send us the MD5 hash of URL and Key calculated using your secret phrase that you will define in your account. e.g. you are requesting thumbnail of http://www.google.com/ and your key is abcdefghijklmnopqrstuvwxyz and you have defined your secret phrase as LONG LIVE THE KING then this parameter will have the hash calculated as md5_hash_function ( http://www.google.com/ + abcdefghijklmnopqrstuvwxyz + LONG LIVE THE KING ).

In PHP you can calculate this hash as:

$url = "http://www.google.com/";

$key = "abcdefghijklmnopqrstuvwxyz";

$phrase = "LONG LIVE THE KING";

$hash = md5($url.$key.$phrase) ;

Do not expose your Secret Code to public. Currently this parameter is only availabe to paid customers.


The following example retrieves a large thumbnail for http://www.google.com:

http://images.sitethumbshot.com/?url=http://www.google.com&size=L&key=1234567890&format=jpg&quality=80

Check if a thumbnail exists:

Premium users can check existence of thumbnail before actually requesting a thumbshot.

Append to the standard request URL followed by exist/ and a question mark.

http://images.sitethumbshot.com/exist/?

The method is followed by the actual query parameters, which take the form argument=value, where the arguments and values are url encoded. Multiple parameters are separated by an ampersand (&).

http://images.sitethumbshot.com/exist/?key=[key]&url=[url]

Parameter Type Description
key String (required) All requests to SiteThumbshot service require a key. Sign-up and get your own key.
url String (required) The url to get the thumbnail for. The url must start with http:// or https://. Try to encode url parameter (in PHP you can use urlencode function for this purpose) otherwise in some cases you might get "Forbidden 403" error.

 

For each request, the server will return a JSON response indicating whether the request was successful or not.

Returned values:

Response Body Description
{"result": "Invalid URL"} URL provided in the request is not validated by our system.
{"result": "Key is missing"} Key is not provided, all requests to SiteThumbshot service require a key. Signup and get your own key.
{"result": "Invalid Key"} Key provided is not valid. This key is sent via email once you complete your registration. You can also get this key after login to our website.
{"result": "Not Allowed "} Your package does not allow you to acess this API, please upgrade your account.
{"result": "Yes"} Thumbnail exists for the requested URL.
{"result": "No"} Thumbnail is not yet captured by our system.

 

Get Thumbnail POPUP code for your website.

  • Already Registered?
0.1133