> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snapopa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Full Page Capture

> Capture entire scrollable pages

Capture the entire scrollable page, not just the visible viewport.

## Request

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://api.snapopa.com/capture \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "url": "https://example.com",
        "isFullPage": true
      }'
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    const response = await fetch('https://api.snapopa.com/capture', {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        url: 'https://example.com',
        isFullPage: true,
      }),
    });

    const data = await response.json();
    console.log(data.data.fileUrl);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.post(
        'https://api.snapopa.com/capture',
        headers={
            'Authorization': 'Bearer YOUR_API_KEY',
            'Content-Type': 'application/json',
        },
        json={
            'url': 'https://example.com',
            'isFullPage': True,
        }
    )

    data = response.json()
    print(data['data']['fileUrl'])
    ```
  </Tab>
</Tabs>

## With Custom Viewport Width

Control the width while capturing full height:

```json theme={null}
{
  "url": "https://example.com",
  "isFullPage": true,
  "viewport": {
    "width": 1280,
    "height": 800
  }
}
```

<Note>
  With `isFullPage: true`, the height is automatically determined by the page content.
</Note>

## Use Cases

* **Archiving** - Capture complete page content
* **Documentation** - Screenshot entire articles or docs
* **Testing** - Visual regression testing
* **PDFs** - Generate complete page PDFs

## With Wait for Content

For pages with lazy-loaded content:

```json theme={null}
{
  "url": "https://example.com",
  "isFullPage": true,
  "waitUntil": "networkidle",
  "timeout": 60000
}
```

## Performance Tips

Full page captures can be resource-intensive:

1. **Increase timeout** - Long pages need more time
2. **Use `networkidle`** - Ensures lazy content loads
3. **Consider WebP** - Better compression for large images
4. **Enable caching** - Avoid redundant captures

```json theme={null}
{
  "url": "https://example.com",
  "isFullPage": true,
  "format": "webp",
  "quality": 85,
  "waitUntil": "networkidle",
  "responseCache": {
    "enabled": true,
    "ttl": 86400
  }
}
```
