Take Website Screenshots with our RESTful Screenshot API
GrabzIt's REST API allows you to captures URL's or HTML entirely using RESTful techniques. Before you start please read the following caveats carefully depending on your use case one of our other API solutions maybe more suitable.
- Some features such as merging and encrypting captures are not available through this REST API. To use these features you will need to use another API Library
To get started just select what you want to do from the filter below and the available parameters will be displayed along with a basic example.
When making requests please ensure all parameter values are URL encoded.
The capture will then be returned in the HTTP response. The following additional options are also available with this type of capture, all of which are optional except for those marked as required. When testing the API functionality we recommend using Postman to simplify the process.
height - the height of the resulting thumbnail in pixels
Default: if both the output width and output height are not specified or 0 then the output width and height will match the final image width and height, if the output width is specified the output height will be proportional to the output width
Maximum: Maximum height for package
Full Height: -1 (passing -1 means that the height of the thumbnail is not reduced)
2 = indicates the search engine view of a website should be returned
speed - the speed of the animated GIF.
start - the starting position of the video that should be converted into a animated GIF.
Default: 0 seconds
tabletoinclude - the index of the table to be converted, were all tables in a web page are ordered from the top of the web page to bottom
target - this parameter specifies the CSS selector of the only HTML element on the target web page that is to be turned into a document, all other parts of the web page are ignored. If there are multiple matching HTML elements the first one is chosen.
target - this parameter specifies the CSS selector of the only HTML element on the target web page that is to be turned into a image, all other parts of the web page are ignored. If there are multiple matching HTML elements the first one is chosen.
target - the id of the only HTML element in the web page that should be used to extract tables from
templateid - add a template ID that specifies the header and footer of the document
title - provide a title to the PDF document
waitfor - this specifies the HTML element, using a CSS selector. Once the element is visible the capture is executed. If there are multiple matching HTML elements the first one is chosen. When this parameter is used it will wait for a maximum of 25 seconds before the capture is performed.
width - the width of the resulting thumbnail in pixels
Default: if both the output width and output height are not specified or 0 then the output width and height will match the final image width and height, if the output height is specified the output width will be proportional to the output height
Maximum: Maximum width for package
Full Width: -1 (passing -1 means that the width of the thumbnail is not reduced)
width - the width of the resulting animated GIF in pixels.
Maximum: Maximum width for package
Auto-size: -1 (passing -1 means that the width of the animated GIF is scaled in relation to its height, if the width is being auto-sized the height cannot)
If there is some issue with the request you have made to the API, a JSON object will be returned explaining the error. The best way to determine this is to check the content type of the response before
processing, if its application/json an error has occurred. The error code found in the JSON follows the standard list of codes.
"Code":"URL is missing",