Docs
Screenshot API
Screenshot API
Capture website screenshots
Usage
API URL:
https://pkbmail.com/api/v1/scraping/screenshot?url=https://vmail.dev&key=your_api_keyQuery Parameters
- url(required): The valid URL to be captured.
- width(optional): The width of the output screenshot. Default is- 250.
- height(optional): The height of the output screenshot. Default is- 250.
- viewportWidth(optional): The width of the render viewport. Default is- 1080.
- viewportHeight(optional): The height of the render viewport. Default is- 1080.
- forceReload(optional): Forces a reload of the cached image. Default is- false.
- isMobile(optional): Adds a mobile flag to the user agent. Default is- false.
- isFullPage(optional): Renders the full page instead of the viewport crop. Default is- false.
- isDarkMode(optional): Prefers the dark color scheme. Default is- false.
- deviceScaleFactor(optional): Specifies the device scale factor (can be thought of as DPR). Default is- 1.
Example:
https://pkbmail.com/api/v1/scraping/screenshot?url=https://vmail.dev&key=example_key
Here are some example combinations of query parameters:
https://pkbmail.com/api/v1/scraping/screenshot?url=https://vmail.dev&key=example_key
https://pkbmail.com/api/v1/scraping/screenshot?url=https://vmail.dev&key=example_key&width=500&height=500
https://pkbmail.com/api/v1/scraping/screenshot?url=https://vmail.dev&key=example_key&viewportWidth=1920&viewportHeight=1080&isFullPage=true
https://pkbmail.com/api/v1/scraping/screenshot?url=https://vmail.dev&key=example_key&viewportWidth=1920&viewportHeight=1080&isFullPage=true&isDarkMode=trueUse in your HTML
<img
  src="https://pkbmail.com/api/v1/scraping/screenshot?url=https://oiov.dev&key=example_key"
  alt="Oiov's personal home page screenshot"
/>