• Square screenshot of Twitter Bootstrap
  • Viewport is 1024x1024
  • Thumbnail is 275px wide.

  • Twitter Bootstrap adaptive layout
  • Viewport is 320x480
  • Thumbnail is 275px wide

  • Fullpage screenshot of Apple's Store
  • Minimum page size is 1280x1024
  • Thumbnail is 275px wide.

http://api.url2png.com/v6/<APIKEY>/<TOKEN>/png/?url=google.com
  What is it? Where do I get it?
APIKEY Your personal unique identifier. Assigned to you during the signup process.
Starts with the letter "P"
TOKEN A security token to prevent unauthorized use of your account. You will need to generate this for each unqiue request.
It is the md5 hash of the query string and your SECRETKEY
See below for more detail.
?url=<TARGET_URL> urlencoded() website URL.  
  • The token is an MD5 hash created using the query string and your SECRETKEY.
  • Everything following the "?" including options from below, is considered part of the query string.
  • The entire query string must be included for a succesful request.
TOKEN = md5("url=google.com&fullpage=true&viewport=1024x768" + SECRETKEY)
  • This is your private key that goes with your APIKEY.
  • It is not your password to login to the dashboard.
  • This was assigned to you during the signup process.
  • It starts with the letter "S"
Option Description Default
Thumbnail

Constrain screenshot based on width or height or both.

i.e. &thumbnail_max_width=500, &thumbnail_max_height=500, etc
1:1
Viewport

Set viewport dimensions, adjust to your hearts content.

i.e. &viewport=500x500, &viewport=1024x768, etc
1480x1037
Fullpage

Will attempt to capture entire document canvas.

&fullpage=true
false
User Agent

Pass a custom user user agent

&user_agent=foobar
Accept Languages

Override the default HTTP Accept-Language header.

&accept_languages=de
en-US,en;q=0.8
Force

Please see unique

Unique

Forces a fresh screenshot by varying this value. We suggest using a timestamp.

&unique=2013-06-20_11:21:00

PHP Example


Ruby Example

http://api.url2png.com/v6/P4DE5D1C99D8EF/c9d1c2e545d1280fb6c249aed4031c4b/png/?url=twitter.github.com%2Fbootstrap&viewport=1024x1024&thumbnail_max_width=275

http://api.url2png.com/v6/P4DE5D1C99D8EF/4ee57c55979a42c8a55b93f09ec47cb5/png/?url=http%3A%2F%2Ftwitter.github.com%2Fbootstrap&viewport=320x480&thumbnail_max_width=275

http://api.url2png.com/v6/P4DE5D1C99D8EF/d951d9aabda3563689fede54c9426e4f/png/?url=http%3A%2F%2Fstore.apple.com%2F&viewport=1280x1024&thumbnail_max_width=275&fullpage=1
          


Advanced Usage; Header parsing, debugging