API Documentation > Img API

Create Website Screenshot with IMG API

Anyone who spend 5 minutes on this document can start to use our API no matter which engineering background knowledge you have. Let us skip the heavy documents and go to samples directly.

To Show Screenshot of Google.com on Your Website

<img src='http://api.page2images.com/directlink?p2i_url=http://www.google.com&p2i_key=YOUR_API_KEY'>
Click this here to see the demo image

To Show a Screenshot For iPhone

<img src='http://api.page2images.com/directlink?p2i_url=http://www.google.com&p2i_key=YOUR_API_KEY&p2i_device=0'>
Click this here to see the demo image

To Create a Small Screenshot For iPhone Like This

<img src='http://api.page2images.com/directlink?p2i_url=http://www.google.com&p2i_key=YOUR_API_KEY&p2i_device=0&p2i_size=300x300'>
Click this here to see the demo image

To Create a Screenshot For Desktop Browsers

<img src='http://api.page2images.com/directlink?p2i_url=http://www.google.com&p2i_key=YOUR_API_KEY&p2i_device=6&p2i_size=200x200'>
Click this here to see the demo image

To Change the Screen Size of the Browser

<img src='http://api.page2images.com/directlink?p2i_url=http://www.google.com&p2i_key=YOUR_API_KEY&p2i_device=6&p2i_size=200x200&p2i_screen=1024x768'>
Click this here to see the demo image

To Get a Full Page Screenshot of One Page Like This

<img src='http://api.page2images.com/directlink?p2i_url=http://www.google.com&p2i_key=YOUR_API_KEY&p2i_device=6&p2i_size=200x200&p2i_screen=1024x768&p2i_fullpage=1'>
Click this here to see the demo image

We Will Return This Image When System is Processing the Request.

We Will Return Following Images When There is Anything Wrong Accordingly.

It is very helpful to test the tag. But it is not good idea to show it to your customer. So, if you want to us do not send the error information, please add p2i_display_error=0 in the url like this way:

<img src='http://api.page2images.com/directlink?p2i_url=http://www.google.com&p2i_key=YOUR_API_KEY& p2i_display_error=0 '>

In this case, we will send a blank picture instead of the error information pictures.

Sample Codes
Download Java sample source code for website screenshot
Download PHP sample source code for website screenshot
Download Python sample source code for website screenshot
Download PHP sample source code for convert HTML to image
Use Code Generator to Build the Code

Using our Code Generator, you can quickly generate the source code for IMG Tags. Use page2images code generator for website screenshot.

Free Engineering Service

Premium and XLarge rate plan users get free help with writing and testing code. Please contact us if you need help.

version:1.7