Overview
The API is a simple endpoint that allows you to convert any URL into a PNG or PDF screenshot. It uses the Google Chrome browser to render the web page, ensuring accurate and reliable screenshots. The API can handle JavaScript-rendered pages, capturing the content as it would appear in a web browser.
Features
- Render using Google Chrome: The API uses the Google Chrome browser to render the web pages, ensuring high-quality and consistent screenshots.
- Renders JavaScript contents: Screenshot API can capture screenshots of web pages that use JavaScript to load and display content.
- Follows redirects: The API will follow any redirects that occur when accessing a URL, ensuring that the final page is captured correctly.
- Works with SSL/HTTPS: Web screenshot API supports taking screenshots of websites that use the HTTPS protocol, allowing users to capture content from secure web pages.
Getting Started
To access the Web Scraping API , you need to obtain an API key from AnyAPI.io. The API key is used for authentication and should be included in the request URL as a query parameter.
Let’s Try Sign In.
Take screenshot of a URL endpoint
Send a GET request to the following URL to Take screenshot of a URL
curl --request GET \
--url 'https://anyapi.io/api/v1/screenshot?url=https%3A%2F%2Fexample.com&format=SOME_STRING_VALUE&width=SOME_INTEGER_VALUE&height=SOME_INTEGER_VALUE&quality=SOME_INTEGER_VALUE&fullPage=SOME_BOOLEAN_VALUE&apiKey=YOUR_API_KEY'
"The screenshot of the specified URL in JPEG format."
Request parameters
Use the parameters listed below to customize your request. Mandatory parameters are indicated
Response parameters
The API returns its response in a simple, lightweight JSON format.
Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
Status Code | Type | Details |
---|---|---|
200 | OK | The request was successful. |
400 | Bad Request | The request was invalid or cannot be otherwise served. |
401 | Unauthorized | Authentication credentials were missing or incorrect. |
422 | Quota reached | The request cannot be served due to the application's rate limit having been exhausted for the resource. |
404 | Not Found | The requested resource could not be found. |
429 | Too Many Requests | The request cannot be served due to the application's rate limit having been exhausted for the resource. |
500 | Internal Server Error | Something went wrong on the server. |
503 | Service Unavailable | The service is temporarily unavailable. |