Generate Webpage Screenshot API

75 atoms
Base tier

About

This API lets you capture full-page screenshots of web pages. Render screenshots with one simple API call, and save time from managing browser clusters and handling all the annoying corner cases.
This API is ideal for creating website previews, monitoring changes, and capturing content for various reports. By using this API, you can save time by allowing users to quickly capture important information without having to manually copy and paste text or data.
Try out the API in the API playground and see how this free online webpage screenshot generator API can help you generate webpage screenshots easily, avoid browser clusters and reduce rendering errors with a simple API call.
Select API Endpoints
Output

API Playground

API Documentation

submit url: download file
GET
https://api.apyhub.com/generate/screenshot/webpage/image-file

Request example

1
curl --location --request GET 'https://api.apyhub.com/generate/screenshot/webpage/image-file?url=https://apyhub.com' \
2
--header 'apy-token: {{token}}'
The method lets you pass a url for a webpage and returns the generated image file as a parameter.
Method: GET
Content Type: application/json
Query Parameter(s)
AttributeTypeMandatoryDescription
urlStringYesThe URL for the webpage you want to generate the screenshot
outputStringNoThe file name for the generated image. If no output attribute is provided, the default file name will be output.png
delayIntegerNoTime (in seconds) to wait before taking a screenshot of the webpage, especially useful when taking screenshots of Single Page Applications (SPA), default 3 seconds
qualityIntegerNoQuality of the screenshot - should be between 1 - 5 (5 being the highest quality). Defaults to highest quality
Sample Response
A successful request returns the generated image file.

HTTP Response Codes

The method may return one of the following HTTP status codes:
Status codeDescription
200The request was successful.
400Request is invalid or mandatory parameters are missing in the request.
401Required authentication information is either missing or not valid for the resource.
500There was an error in processing this request.

Authentication

All API requests to ApyHub services need to be authenticated. Currently we support tokens or basic authentication mechanisms. You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".
Points to note:
  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error codes

1
{
2
"error": {
3
"code": 105,
4
"message": "Invalid URL"
5
}
6
}
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.