Getting Started
API Access Key & Authentication
After signing up, every user is assigned a personal API Access Key - a unique "password" used to authenticate with the API.
To call the screenshotlayer API, simply append your access_key as a parameter to the base URL:
You can sign up for a free Access Key here. Our Free Plan offers up to 100 monthly snapshots. Paid plans provide larger request volumes and a full stack of advanced features.
HTTPS - Secure Datastreams
All Customers may establish a secure connection via 256-bit HTTPS (industry-standard SSL) to the screenshotlayer API, ensuring encrypted datastreams between server and client. To connect securely, simply append an s to the HTTP Protocol.
Rate Limits
Requests to the API are rate-limited based on your current subscription plan:
| Subscription Plan | Rate Limit |
|---|---|
| Free | 2 Requests / Minute |
| Basic | 30 Requests / Minute |
| Professional | 45 Requests / Minute |
| Enterprise | 45 Requests / Minute |
Important: In order to ensure maximum API performance, we recommend Basic, Professional and Enterprise Plan users to limit their usage to a maximum of 1 API request per 2 seconds.
If your rate limit for a given minute has been exceeded, the API will return an error carrying the type rate_limit_reached. This error is listed in the API Error Codes section below.
API Error Codes
If your query fails, the screenshotlayer API will return a 3-digit error code, an internal error type, and a plain text "info" object containing suggestions for the user.
Find below an example error - triggered when the user did not provide a valid API Access Key:
Common API errors:
| Type | Message | Description |
|---|---|---|
| 404 | "404_not_found" | User requested a resource which does not exist. |
| 101 | "missing_access_key" | User did not supply an Access Key. |
| 101 | "invalid_access_key" | User entered an invalid Access Key. |
| 103 | "invalid_api_function" | User requested a non-existent API Function. |
| 104 | "usage_limit_reached" | User has reached or exceeded his Subscription Plan's monthly API Request Allowance. |
| 210 | "invalid_url" | User provided an invalid website URL. |
| 105 | "invalid_quality_value" | User subscription plan does not support the requested value. |
| 102 | "inactive_user" | The user's account is not active. User will be prompted to get in touch with Customer Support. |
| 310 | "secret_key_required" | User has to provide a secret key in order to access the requested resource. |
| 311 | "invalid_secret_key" | User provided an invalid secret key. |
| 410 | "invalid_viewport_size" | User provided invalid viewport dimensions (required format: width x height, e.g. 1440x900). |
| 411 | "viewport_too_large" | The provided viewport is too large (max. viewport dimensions: 5000x5000). |
| 420 | "invalid_thumbnail_width" | User provided an invalid thumbnail width (required format: integer). |
| 510 | "invalid_css_url" | User provided an invalid CSS file URL. |
| 511 | "css_download_failed" | System failed downloading the provided CSS file. |
| 512 | "css_too_large" | The provided CSS file is too large in size. (max-size: 100kB) |
| 610 | "invalid_delay_time" | User provided an invalid delay time. (required format: integer) |
| 611 | "delay_time_too_long" | The provided delay time is too long. (max. length: 20 seconds) |
| 620 | "invalid_ttl" | User provided an invalid TTL (required format: integer). |
| 621 | "ttl_too_short" | The provided TTL is too short (mininum: 300 seconds) |
| 622 | "ttl_too_long" | The provided TTL is too long (maximum: 2592000 seconds) |
| 710 | "failed_loading_placeholder_img" | System failed downloading the provided placeholder image. |
| 810 | "invalid_export_path" | User provided an invalid export path. (See AWS S3 & FTP Export) |
| 820 | "invalid_output_format" | The provided output format is invalid (available formats: PNG, JPG, GIF). |
| 910 | "failed_showing_screenshot" | System failed displaying the requested screenshot. |
| 102 | "inactive_user" | The user's account is not active. User will be prompted to get in touch with Customer Support. |
| 106 | "rate_limit_reached" | User has exceeded the maximum allowed rate limitation and is referred to the "Rate Limits" section of the API Documentation. |
| 999 | "unexpected_error" | An unexpected error ocurred. |