Screenshot API Documentation

How To Use Screenshot API

Take website screenshots or thumbnails programatically. Advanced features are available.

screenshot api

Screenshot API use case

Have you ever been in a situation where you needed more than one pair of eyes? Looking into millions of website can be time consuming, to say the least, so why not do it programmatically? Especially if you need a website screenshot or a thumbnail!

You can tell so much about a website by glancing at a small thumbnail! You can see if there’s a complete website, or just ads provided by domain registrar. You can see if the colors are bright or dark. You can see if there’s a website, a parked domain name or something else.

For detailed code examples that will help you use our Screenshot API, see our code examples page.

Screenshot API

Screenshot API How To

Additional information:

All images are stored on our servers for no more than 31 days. Please download images to your server in order to keep it. You can include the resulting image urls into your website, however be adviced that in case of a huge traffic load we reserve the right to block excesive requests. Keep in mind that depending on the request and page complexity it can take a long time to process a screenshot, use high enough timeouts to get a result.

By default our API waits for all page resources (images, JavaScripts, styles) to load completely. The overall timeout for the load is 30 seconds. If the resources could not be loaded within the set timeframe the API will return an error. If you need to change this behavior you can use the “asap=true” option described above.

Let’s make an example request:

http://api.whoapi.com/?domain=whoapi.com&r=screenshot&apikey=demokey&process=thumb

Output in JSON:

{
  "status": "0",
  "full_size": "http:\/\/node1.whoapi.com\/tmp\/e0dddcfa02522f28ea79c5126a24882d.jpg",
  "thumbnail": "http:\/\/node1.whoapi.com\/tmp\/e0dddcfa02522f28ea79c5126a24882d_th.jpg",
  "expires": "2018-01-17 19:37 GMT",
  "size": "1366x768",
  "full_size_https": "https:\/\/node1.whoapi.com\/tmp\/e0dddcfa02522f28ea79c5126a24882d.jpg",
  "thumbnail_https": "https:\/\/node1.whoapi.com\/tmp\/e0dddcfa02522f28ea79c5126a24882d_th.jpg",
  "requests_available": 100
}

http://api.whoapi.com/?domain=whoapi.com&r=screenshot&apikey=demokey&process=thumb&asxml

Output in XML format:

<?xml version="1.0"?>
<response>
  <status>0</status>
  <full_size>http://node1.whoapi.com/tmp/e0dddcfa02522f28ea79c5126a24882d.jpg</full_size>
  <thumbnail>http://node1.whoapi.com/tmp/e0dddcfa02522f28ea79c5126a24882d_th.jpg</thumbnail>
  <expires>2018-01-17 19:37 GMT</expires>
  <size>1366x768</size>
  <full_size_https>https://node1.whoapi.com/tmp/e0dddcfa02522f28ea79c5126a24882d.jpg</full_size_https>
  <thumbnail_https>https://node1.whoapi.com/tmp/e0dddcfa02522f28ea79c5126a24882d_th.jpg</thumbnail_https>
  <requests_available>100</requests_available>
</response>

Parameters explained:

status – processing result, “0” means success; in case of unsuccessful processing an additional parameter “status_desc” will be added with explanation of the error;

full_size – the full size image; for process=thumb it’s size will be equal the specified resolution, if a full page processing is requested the height of the image can be higher than the set resolution;

thumbnail – the small image of the website with size set in the thumbwidth and thumbheight parameters (133×100 pixels by default);

full_size_https – the https url to the full size image; for process=thumb it’s size will be equal the specified resolution, if a full page processing is requested the height of the image can be higher than the set resolution;

thumbnail_https – the https url to the small image of the website with size set in the thumbwidth and thumbheight parameters (133×100 pixels by default);

expires – the date and time in GMT when the images will no longer be available (will be removed from our servers);

size – the full screenshot size in pixels, for example: 1920×1080 for a process=thumb and resolution=1920×1080;

requests_available – the requests left that you have in your package.