Skip to main content

Extract Content

POST /v1/browser/interactions/content

Extract LLM-friendly content from the current page

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

application/json

Resolved schema:

{
"properties": {
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"include_interactive": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Include Interactive",
"default": true
},
"include_anchors": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Include Anchors",
"default": true
},
"max_anchors": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Max Anchors",
"default": 50
}
},
"type": "object",
"title": "BrowserContentRequest",
"description": "Request schema for extracting LLM-friendly content"
}

Field details:

FieldTypeRequiredDescriptionConstraints
session_idstring | nullNonullable
include_interactiveboolean | nullNonullable
include_anchorsboolean | nullNonullable
max_anchorsinteger | nullNonullable

Responses

200

Successful Response

application/json

Resolved schema:

{
"properties": {
"readable_content": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Readable Content"
},
"interactive_elements": {
"anyOf": [
{
"items": {
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Interactive Elements"
},
"content_anchors": {
"anyOf": [
{
"items": {
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Content Anchors"
},
"execution_time": {
"type": "number",
"title": "Execution Time"
},
"session_id": {
"type": "string",
"title": "Session Id"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Url"
},
"usage_info": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Usage Info"
}
},
"type": "object",
"required": [
"execution_time",
"session_id"
],
"title": "BrowserContentResponse",
"description": "Response schema for content extraction"
}

Field details:

FieldTypeRequiredDescriptionConstraints
readable_contentobject | nullNonullable
interactive_elementsarray<object> | nullNonullable
interactive_elements[]objectNo
content_anchorsarray<object> | nullNonullable
content_anchors[]objectNo
execution_timenumberYes
session_idstringYes
urlstring | nullNonullable
usage_infoobject | 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