Follow @www2png

API Help

API Endpoints

Endpoint Query Params Description
/api/capture/<api_key> url (required), resolution, full_page, delay Initiate a new capture session. On successful submission, a request_id will be returned that is used with the other endpoints. All images are pruned after 24 hours.
/api/status/<api_key>/<request_id> none View the status of a request. This includes the screenshot_available and proof_available flags, which directly correspond to the availability of the image and proof endpoints.
/api/image/<api_key>/<request_id> none View the image for the request. This endpoint is usually available after a few seconds, but the status endpoint should be used for an accurate status. All images are pruned after 24 hours.
/api/proof/<api_key>/<request_id> none View the proof for the request. This endpoint is available an hour after the request has been processed. The status endpoint should be used for an accurate status. All proofs are currently retained indefinitely, but may be pruned at a later date.
/api/upload-to-imgur/<api_key>/<request_id> none Upload the screenshot for the request to Imgur. On success, the url of the image on Imgur will be returned.

The basic url format to generate a screenshot capture is: https://www2png.com/api/capture/<api_key>?url=<url>

Example of all parameters in a single query: https://www2png.com/api/capture/<api_key>?url=<url>&resolution=<width>x<height>&full_page=<true|false>&delay=<seconds>

Capture Parameters

Parameter Required Default Description
url yes The URL of the website to screenshot. This value should be URL encoded.
resolution no 1366x768 The resolution of the browser window used to screenshot in pixels. The default is 1366x768, which is the most common resolution and commonly found on laptops. The maximum resolution is 1920x10800.
full_page no false Should the browser screenshot the entire page? If yes, the browser will attempt to capture the entire page contents, up to the maximum height of 10800 pixels. Note: Infinite scrolling pages will always be cut off.
delay no 0 The number of seconds to wait, after the page has loaded, before taking the screenshot. This can help with certain pages that dynamically load content after the page structure has already loaded. The maximum value is 10 seconds.