# Capture Screenshot

Source: https://docs.gopdf.pro/methods-to-screenshot/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:

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

**Desktop:** [Demo](https://cdn.eniston.com/bases/6515e495-55fb-49cb-8eca-86c899df02a2/attachments/desktop-demo_1707336195.png)**, Laptop**: [Demo](https://cdn.eniston.com/bases/6515e495-55fb-49cb-8eca-86c899df02a2/attachments/laptop-screen-demo_1707336256.png) , **Tab**: [Demo](https://cdn.eniston.com/bases/6515e495-55fb-49cb-8eca-86c899df02a2/attachments/screenshot-tab_1707122945.png), **Mobile**: [Demo](https://cdn.eniston.com/bases/6515e495-55fb-49cb-8eca-86c899df02a2/attachments/screenshot-mob_1707122908.png)

Taking a MP4 screenshot:

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

**Demo:** [Link](https://media.cyberin.in/file/gopdf/videos/9ddeebea9cff-1706132327103.mp4)

Taking a PDF screenshot:

```json
{
    "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!](https://gopdf.pro/screenshot)
