All Categories Integrations & API How to take custom viewport screenshot

How to take custom viewport screenshot

By default, Geekflare API generates screenshots in 1920x1080 viewport size. However, you can take screenshots in the custom viewport by supplying the viewport parameter in the payload as below.

"viewport": {
            "width": 1920,
            "height": 1080
        },

Example

Let's take an example if you need to take a screenshot of geekflare.com in a viewport size as 2500x1200. You would use the below payload.

{
    "url": "geekflare.com",
      "viewport": {
            "width": 2500,
            "height": 1200
        }
}

Was this article helpful?

Thanks for your feedback!