Get a Free Trial

Take Website Screenshots with our RESTful Screenshot API

REST 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
  • - Do not use this API on the client side, it will expose your Application Key! Instead use the JavaScript API
  • - To limit which servers can access your API, authorize the IP Addresses you want to grant access to

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.

Below is the API URL, that is used for all REST API calls. When making requests please ensure all parameter values are URL encoded.

https://api.grabz.it/convert?key=Sign in to view your Application Key&format=&url=https%3A%2F%2Fwww.bbc.com%2F

Below is the API URL, that is used for all REST API calls. When converting HTML all parameters must be posted in the request body as key-value pairs. Ensure all parameter values are URL encoded, and the content type is application/x-www-form-urlencoded.

curl 
    -d key=Sign in to view your Application Key 
    -d format= 
    -d html=%3Ch1%3EConvert%20Me%21%3C%2Fh1%3E 
    https://api.grabz.it/convert

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.

User Details

Get your current account package, and remaining allowance with this simple call.

https://api.grabz.it/user?key=Sign in to view your Application Key

Header and Footer Templates

Get the list of header and footer templates for PDF and DOCX files associated with your account, like so.

https://api.grabz.it/templates?key=Sign in to view your Application Key

Web Monitors

Add Monitor

Add a URL to monitor from your app with this easy call. This will return a JSON object of the web monitor including its identifier.

https://api.grabz.it/monitor?key=Sign in to view your Application Key&url=https://www.astropioneer.blog&email=hello@example.com&repeat=60&cssselector=%23id1

Delete Monitor

To delete a web monitor just specify its ID, along with your application key. You get the ID when creating the monitor from the Add Monitor web method above. On success it will return true in the result attribute.

https://api.grabz.it/monitor/[Monitor ID]/delete?key=Sign in to view your Application Key

Error Handling

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.

{
    "Result": false,
    "Code":"URL is missing",
    "Message":100
}