Welcome to the WebShot API, the quintessential tool for capturing crisp and versatile screenshots of websites programmatically. Our API is engineered for developers who need to integrate website screenshot functionality into their applications with precision and customization.
With WebShot, you can easily specify browser rendering, output format, resolution, and advanced display options. The API returns screenshots as data URI values in a JSON response, ready to be embedded or processed further as needed.
{
"url": "required | valid URI or domain name",
"browser": "optional | one of ['chrome', 'edge', 'opera', 'firefox'] | default: 'chrome'",
"pixelRatio": "optional | number: 1-5 | default: 1",
"format": "optional | one of ['png', 'webp', 'avif'] | default: 'png'",
"width": "optional | number: 320-2020 | default: 1920",
"height": "optional | number: 566-1180 | default: 1080",
"locale": "optional | IETF locale string | default: 'en-US'",
"darkMode": "optional | boolean | default: false",
"reducedMotion": "optional | boolean | default: false",
"userAgent": "optional | user agent string",
"mode": "optional | one of ['quality', 'standard', 'performance', 'extremeDataHoarder'] | default: 'standard'"
}
To utilize the WebShot API, send a POST
request to the API endpoint with the parameters specified in above schema. Hereโs a brief example:
curl -X POST https://api.webshot.example.com/capture \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"browser": "chrome",
"pixelRatio": 2,
"format": "png",
"width": 1920,
"height": 1080,
"locale": "en-US",
"darkMode": false,
"reducedMotion": true,
"userAgent": "Custom User Agent String",
"mode": "standard"
}'
Please ensure your request payload validates against the given Joi schema for a successful response.
darkMode
and reducedMotion
to respect user preferences which can significantly alter how a website is rendered.Capture the web with ease, precision, and speed.
WebShot is your partner in seamless website screenshot automation.