Skip to main content

Render Page

POST /v1/browser/render

Render a webpage using the browser API

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

application/json

Resolved schema:

{
"properties": {
"api_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Api Key"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Url"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Html"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width",
"default": 1920
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height",
"default": 1080
},
"wait_for_selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Wait For Selector"
},
"wait_timeout": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Wait Timeout",
"default": 30000
},
"full_page": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Full Page",
"default": true
},
"clip": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Clip"
},
"format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Format",
"default": "png"
},
"quality": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Quality"
},
"actions": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"title": "Actions"
},
"return_html": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Return Html",
"default": false
},
"return_screenshot": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Return Screenshot",
"default": true
}
},
"type": "object",
"title": "BrowserRenderRequest",
"description": "Request schema for browser rendering operations"
}

Field details:

FieldTypeRequiredDescriptionConstraints
api_keystring | nullNonullable
session_idstring | nullNonullable
urlstring | nullNonullable
htmlstring | nullNonullable
widthinteger | nullNonullable
heightinteger | nullNonullable
wait_for_selectorstring | nullNonullable
wait_timeoutinteger | nullNonullable
full_pageboolean | nullNonullable
clipobject | nullNonullable
formatstring | nullNonullable
qualityinteger | nullNonullable
actionsarray<object> | nullNonullable
actions[]objectNo
return_htmlboolean | nullNonullable
return_screenshotboolean | nullNonullable

Responses

200

Successful Response

application/json

Resolved schema:

{
"properties": {
"screenshot": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Screenshot"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Html"
},
"dom_elements": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"title": "Dom Elements"
},
"execution_time": {
"type": "number",
"title": "Execution Time"
},
"status": {
"type": "string",
"title": "Status"
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Message"
},
"usage_info": {
"properties": {
"total_requests": {
"type": "integer",
"title": "Total Requests"
},
"remaining_quota": {
"type": "integer",
"title": "Remaining Quota"
},
"quota_limit": {
"type": "integer",
"title": "Quota Limit"
},
"current_month_usage": {
"type": "integer",
"title": "Current Month Usage"
},
"credits_consumed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Credits Consumed"
},
"browser_credits_remaining": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Browser Credits Remaining"
}
},
"type": "object",
"required": [
"total_requests",
"remaining_quota",
"quota_limit",
"current_month_usage"
],
"title": "BrowserUsageResponse",
"description": "Response schema showing user's browser API usage"
}
},
"type": "object",
"required": [
"execution_time",
"status",
"usage_info"
],
"title": "BrowserRenderResponse",
"description": "Response schema for browser render operations"
}

Field details:

FieldTypeRequiredDescriptionConstraints
screenshotstring | nullNonullable
htmlstring | nullNonullable
dom_elementsarray<object> | nullNonullable
dom_elements[]objectNo
execution_timenumberYes
statusstringYes
messagestring | nullNonullable
usage_infoobjectYesResponse schema showing user's browser API usage
usage_info.total_requestsintegerYes
usage_info.remaining_quotaintegerYes
usage_info.quota_limitintegerYes
usage_info.current_month_usageintegerYes
usage_info.credits_consumednumber | nullNonullable
usage_info.browser_credits_remainingnumber | nullNonullable

422

Validation Error

application/json

Resolved schema:

{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}

Field details:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo