# OnPage API Page Screenshot

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/on_page/page_screenshot`

**Tags:** DataForSEO

Renders any `url` and returns a screenshot, with `full_page_screenshot` for the whole scroll height and `browser_screen_width` and `browser_screen_height` setting the viewport. Standalone - no crawl needed. Wrapped in DataForSEO's envelope: data in `tasks[0].result`, outcome in `tasks[0].status_code` - a rejected request still returns HTTP 200. ⚠️ An image is a large tool result even before an agent can do anything with it; ask for a screenshot only when the visual is the point, and use `post_dataforseo_on_page_content_parsing_live` when the text is.

### Pricing reference

- Metering: Reported response cost.
- Reference request estimate: USD 0.0051.
- Reference customer multiplier: 1.0. Do not apply it again to a settled customer amount.

Reference metadata only, not an account quote, a guaranteed price or a spending cap. Resource credits are not Felo credits. Final charges follow Felo billing records.

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "<em>page url</em><br><strong>required field</strong><br>absolute URL of the page to snap<br><strong>note:</strong> if the URL you indicate here returns a 404 status code or the indicated value is not a valid URL, you will obtain <code>\"error_message\":\"Screenshot is empty\"</code> in the response array"
          },
          "accept_language": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>language header for accessing the website</em><br>optional field<br>all locale formats are supported (xx, xx-XX, xxx-XX, etc.)<br><strong>note:</strong> if you do not specify this parameter, some websites may deny access; in this case, you will obtain <code>\"error_message\":\"Screenshot is empty\"</code> in the response array"
          },
          "custom_user_agent": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>custom user agent</em><br>optional field<br>custom user agent for crawling a website<br>example: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36<br></code><br>default value: <code>Mozilla/5.0 (compatible; RSiteAuditor)</code>"
          },
          "browser_preset": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>preset for browser screen parameters</em><br>optional field<br>if you use this field, you don't need to indicate <code>browser_screen_width</code>, <code>browser_screen_height</code>, <code>browser_screen_scale_factor</code><p>possible values:<br><code>desktop</code>, <code>mobile</code>, <code>tablet</code><p><code>desktop</code> preset will apply the following values:<p><code>browser_screen_width: 1920</code><br><code>browser_screen_height: 1080</code><br><code>browser_screen_scale_factor: 1</code><p><code>mobile</code> preset will apply the following values:<p><code>browser_screen_width: 390</code><br><code>browser_screen_height: 844</code><br><code>browser_screen_scale_factor: 3</code><p><code>tablet</code> preset will apply the following values:<p><code>browser_screen_width: 1024</code><br><code>browser_screen_height: 1366</code><br><code>browser_screen_scale_factor: 2</code><p><strong>Note:</strong> in this endpoint, the <code>enable_browser_rendering</code>, <code>enable_javascript</code>, <code>load_resources</code>, and <code>enable_xhr</code> parameters are always enabled."
          },
          "browser_screen_width": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>browser screen width</em><br>optional field<br>you can set a custom browser screen width to perform audit for a particular device;<br>if you use this field, you don't need to indicate <code>browser_preset</code> as it will be ignored;<p>minimum value, in pixels: <code>240</code> <br>maximum value, in pixels: <code>9999</code>",
            "format": "int64"
          },
          "browser_screen_height": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>browser screen height</em><br>optional field<br>you can set a custom browser screen height to perform audit for a particular device;<br>if you use this field, you don't need to indicate <code>browser_preset</code> as it will be ignored;<p>minimum value, in pixels: <code>240</code> <br>maximum value, in pixels: <code>9999</code>"
          },
          "browser_screen_scale_factor": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>browser screen scale factor</em><br>optional field<br>you can set a custom browser screen resolution ratio to perform audit for a particular device;<br>if you use this field, you don't need to indicate <code>browser_preset</code> as it will be ignored;<p>minimum value: <code>0.5</code> <br>maximum value: <code>3</code>"
          },
          "full_page_screenshot": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>take a screenshot of the full page</em><br>optional field<br>set to <code>false</code> if you want to capture only the part of the page displayed before scrolling<br>default value: <code>true</code>"
          },
          "disable_cookie_popup": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>disable the cookie popup </em><br>optional field<br>set to <code>true</code> if you want to disable the popup requesting cookie consent from the user;<br>default value: <br><code>false</code>"
          },
          "switch_pool": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>switch proxy pool</em><br>optional field<br>if <code>true</code>, additional proxy pools will be used to obtain the requested data;<br>the parameter can be used if a multitude of tasks is set simultaneously, resulting in occasional <code>rate-limit</code> and/or <code>site_unreachable</code> errors"
          },
          "ip_pool_for_scan": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>proxy pool</em><br>optional field<br>you can choose a location of the proxy pool that will be used to obtain the requested data;<br>the parameter can be used if page content is inaccessible in one of the locations, resulting in occasional <code>site_unreachable</code> errors<br>possible values: <code>us</code>, <code>de</code>"
          }
        },
        "example": [
          {
            "url": "https://dataforseo.com/apis"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "url": "https://dataforseo.com/apis"
    }
  ]
}
```

## Responses

### 200 — Successful operation

Headers:
- `X-Request-Id` (string) — Request identifier to include when contacting Felo support.

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_OnPagePageScreenshotResponseInfo"
    }
  ]
}
```

### 400 — The request could not be processed. Check the request parameters.

### 401 — A valid Felo API key is required.

### 402 — The request cannot proceed because a billing requirement is not met.

### 403 — The account is not permitted to perform this operation.

### 429 — A request or spending limit has been reached.

### 502 — The service could not complete the request.

### 503 — The API or billing service is temporarily unavailable.

### 504 — The service timed out while processing the request.

### default — Error response; upstream passthrough responses may use provider formats

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "the current version of the API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "general status code\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "general informational message\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "total execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array returned with an error",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "task identifier\nunique task identifier in our system in the UUID format"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "status code of the task\ngenerated by DataForSEO, can be within the following range: 10000-60000\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "informational message of the task\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "number of elements in the result array",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL path"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "contains the same parameters that you specified in the POST request"
    }
  }
}
```

### Response36Afe1097B20_OnPagePageScreenshotResponseInfo

`#/components/schemas/Response36Afe1097B20_OnPagePageScreenshotResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_OnPagePageScreenshotTaskInfo"
              }
            ]
          },
          "description": "<em>array of tasks</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_OnPagePageScreenshotResultInfo

`#/components/schemas/Response36Afe1097B20_OnPagePageScreenshotResultInfo`

```json
{
  "type": "object",
  "properties": {
    "crawl_progress": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>status of the crawling session</em><br>possible values: <code>in_progress</code>, <code>finished</code>"
    },
    "error_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>error message</em><br>if the <code>url</code> you indicated returns a 404 status code or is not a valid URL, you will obtain <code>\"error_message\":\"Screenshot is empty\"</code><br>if no error is encountered, the value will be <code>null</code>"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>number of items in the results array</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_ScreenshotItem"
          }
        ]
      },
      "description": "<em>items array</em>"
    }
  }
}
```

### Response36Afe1097B20_OnPagePageScreenshotTaskInfo

`#/components/schemas/Response36Afe1097B20_OnPagePageScreenshotTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_OnPagePageScreenshotResultInfo"
              }
            ]
          },
          "description": "<em>array of results</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_ScreenshotItem

`#/components/schemas/Response36Afe1097B20_ScreenshotItem`

```json
{
  "type": "object",
  "properties": {
    "image": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>screenshot of the requested page</em><br>URL of the page screenshot on the DataForSEO storage<br><strong>note: the page screenshot saved on the DataForSEO storage only remains accessible for one day after making the request</strong>"
    }
  }
}
```
