Capture Screenshot

Image / PDF Screenshot Endpoint:
https://api.gopdf.pro/v1/screenshot/capture
Video Screenshot Endpoint:
https://api.gopdf.pro/v1/screenshot/video

This HTTP POST request is used to capture a screenshot using the GoPDF API. The request should include a JSON payload with the following parameters:

url (string) The URL of the website to capture the screenshot from.
apiKey (string) The API key for authentication.
type (string)

The type of screenshot to capture, Ex- png/jpeg.

quality (string)

The quality of the screenshot. Ex: low/medium/normal/retina

delay (number) The delay in capturing the screenshot.
device (string)

The device type for which the screenshot should be captured. Ex- mobile/tab/laptop/desktop

noSticky (boolean) This will remove any sticky (fixed) content from page.
noCookieBanners (boolean) This will detect and accept or remove most GDPR cookie banners from the page.
style (string) Your custom CSS which can be applied on page to override existing css.

Examples: 

Taking a image screenshot:

{
    "url": "[Webpage_Address]",
    "apiKey": "[apiKey]",
    "type": "png",
    "quality": "normal",
    "delay": 2500,
    "device": "laptop",
    "sticky": false,
    "style": "h1 {color: 'red'}"
}

Desktop: Demo, Laptop: Demo , Tab: Demo, Mobile: Demo

Taking a MP4 screenshot:

{
    "url": "[Webpage_Address]",
    "apiKey": "[apiKey]",
    "duration": 12,
    "quality": "normal",
    "delay": 2500,
    "device": "laptop",
    "sticky": false,
    "style": "h1 {color: 'red'} [custom_css]"
}

Demo: Link

Taking a PDF screenshot:

{
    "url": "[Webpage_Address]",
    "apiKey": "[apiKey]",
    "type": "pdf",
    "quality": "normal",
    "delay": 2500,
    "sticky": false,
    "style": "h1 {color: 'red'} [custom_css]"
}

You can have a live demo of feature here: Click here!


Was this article helpful?