Generate Webpage Screenshot API
75 atoms
Base tier
About
This Utility API lets you dynamically capture screenshots of websites that are accessible.
It lets you capture screenshots that can serve as a form of documentation, allowing users to capture a moment in time and refer back to it later for reference or analysis. This can save time by allowing users to quickly capture important information without having to manually copy and paste text or data. These can be used for marketing purposes, such as showcasing a product or service on a website or social media platform.
Select API Endpoints
Output
API Playground
API Documentation
submit url: download file
GET
https://api.apyhub.com/generate/screenshot/webpage/image-file
Request example
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)
Attribute | Type | Mandatory | Description |
---|---|---|---|
url | String | Yes | The URL for the webpage you want to generate the screenshot |
output | String | No | The file name for the generated image. If no output attribute is provided, the default file name will be output.png |
delay | Integer | No | Time (in seconds) to wait before taking a screenshot of the webpage, especially useful when taking screenshots of Single Page Applications (SPA), default 3 seconds |
quality | Integer | No | Quality 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 code | Description |
---|---|
200 | The request was successful. |
400 | Request is invalid or mandatory parameters are missing in the request. |
401 | Required authentication information is either missing or not valid for the resource. |
500 | There 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
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.