Site-Shot API

Site-Shot API

Web page screenshot service provides powerful API to automate website screenshot generation.
Free Plan $0.00 Monthly Subscribe
20 Requests / Monthly
Free for Lifetime
No Credit Card Required
MOST POPULAR
Starter Plan $14.99 Monthly Subscribe
5,000 Requests / Monthly
Standard Support
Full Web-page Screenshot
High Availability
Pro Plan $49.99 Monthly Subscribe
25,000 Requests / Monthly
Standard Support
Full Web-page Screenshot
High Availability
Enterprise Plan $499.99 Monthly Subscribe
500,000 Requests / Monthly
Standard Support
Full Web-page Screenshot
High Availability
Custom Plan Volume Monthly Contact Us
Any requests volume you need
Full Web-page Screenshot
High Availability
Web page screenshot service, that provides powerful API to automate website screenshot generation. The simplest way to take a full page screenshot, we support a long pages up to 20000 pixels. Rich parametrization of the request allows to generate any type of screenshots including High definition screenshots. Service includes proxy rotation service in case if needed.

Site-Shot API Reference

This API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Just Getting Started?

Check out our development quickstart guide.

Authentication

Site-Shot API uses API keys to authenticate requests. You can view and manage your API keys in the Accounts page.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All requests made to the API must hold a custom HTTP header named "apikey". Implementation differs with each programming language. Below are some samples.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Endpoints

Generate a full web-page screenshot with our service.

Parameters

url (required)

Specify API key and a web-site URL to create screenshot, remember that all parameters needs to be url encoded.

Location: Query, Data Type: string

delay_time (optional)

Delay the screenshot capture, default value: 1500. Have to be specified in milliseconds, Values range: 0 - 60000.

Location: Query, Data Type: string

format (optional)

Image format, default value: PNG, Possible values: PNG, JPEG.

Location: Query, Data Type: string

full_size (optional)

Capture entire document canvas, default value: 0, Document maximum height is limited by max_height parameter.

Location: Query, Data Type: string

height (optional)

Set webview height in pixels, default value: 768px, Values range: 100 - 20000.

Location: Query, Data Type: string

http_proxy (optional)

Specify a http proxy server.

Location: Query, Data Type: string

javascript_code (optional)

Ingest custom JavaScript code into the web page.

Location: Query, Data Type: string

max_height (optional)

Set webview maximum height in pixels, default value: 15000px, The max-height parameter is only relevant if full_size is set to 1, Values range: 100 - 20000.

Location: Query, Data Type: string

proxy_password (optional)

Specify a password for proxy server.

Location: Query, Data Type: string

proxy_rotation (optional)

High quality proxy would be automatically rotated, default value: 0, Proxy rotation is a beta functionality, please let us know if you see any issues.

Location: Query, Data Type: string

proxy_username (optional)

Specify an username for proxy server.

Location: Query, Data Type: string

request_header (optional)

Specify a custom request headers fields, Allowed multiple request_header parameters, Provided examples below, specified Cookie and Referer http headers.

Location: Query, Data Type: string

response_type (optional)

API response content-type, default value: image, In case of JSON response, API provide image encoded in base64 and extra information: http response code, http response headers, error in case of unsuccessful response, Possible values: IMAGE, JSON.

Location: Query, Data Type: string

scaled_width (optional)

Scale result image to specified width, The value can not be smaller than height, Values range: 50 - 10000.

Location: Query, Data Type: string

source_code (optional)

Get the rendered source code of the web page, default value: 0, Applicable only together with response_type=json.

Location: Query, Data Type: string

timeout (optional)

Limit the maximum time for screenshot creation, default value: 60000, If screenshot is not created in time API return timeout error, Have to be specified in milliseconds, Values range: 0 - 120000.

Location: Query, Data Type: string

user_agent (optional)

Specify a custom user agent string, The value have to be url encoded, provided example below contains user agent string for browser Chromium.

Location: Query, Data Type: string

width (optional)

Set webview width in pixels, default value: 1024px, Values range: 100 - 8000.

Location: Query, Data Type: string

zoom (optional)

Set webview percentage zoom, default value: 100, Values range: 5 - 1000.

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Rate Limiting

Each subscription has its own rate limit. When you become a member, you start by choosing a rate limit that suits your usage needs. Do not worry; You can upgrade or downgrade your plan at any time. For this reason, instead of starting with a larger plan that you do not need, we can offer you to upgrade your plan after you start with "free" or "gold plan" options and start using the API.

When you reach a rate limit (both daily and monthly), the service will stop responding and returning the HTTP 429 response status code (Too many requests) for each request with the following JSON string body text.

{
"message":"You have exceeded your daily\/monthly API rate limit. Please review and upgrade your subscription plan at https:\/\/apilayer.com\/subscriptions to continue."
}

A reminder email will be sent to you when your API usage reaches both 80% and 90%, so that you can take immediate actions such as upgrading your plan in order to prevent your application using the API from being interrupted.

You can also programmatically check your rate limit yourself. As a result of each request made to the APILayer, the following 4 fields provide you with all the necessary information within the HTTP Headers.

x-ratelimit-limit-month: Request limit per month
x-ratelimit-remaining-month: Request limit remaining this month
x-ratelimit-limit-day: Request limit per day
x-ratelimit-remaining-day: Request limit remaining today

You can contact our support unit if you need any assistance with your application regarding to handle the returned result by looking at the header information.

Error Codes

APILayer uses standard HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate a clientside error, which means that failed given the information provided (e.g., a missing parameter, unauthorized access etc.). Codes in the 5xx range indicate an error with APILayer's servers (normally this should'nt happen at all).

If the response code is not 200, it means the operation failed somehow and you may need to take an action accordingly. You can check the response (which will be in JSON format) for a field called 'message' that briefly explains the error reported.

Status Code Explanation
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
404 - Not Found The requested resource doesn't exist.
429 - Too many requests API request limit exceeded. See section Rate Limiting for more info.
5xx - Server Error We have failed to process your request. (You can contact us anytime)

You can always contact for support and ask for more assistance. We'll be glad to assist you with building your product.