Skip to main content

Extract Elements

POST /v1/browser/interactions/extract

Extract DOM elements from the browser session

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

application/json

Resolved schema:

{
"properties": {
"selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Selector"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"attributes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Attributes"
}
},
"type": "object",
"title": "BrowserExtractRequest",
"description": "Request schema for extracting DOM elements"
}

Field details:

FieldTypeRequiredDescriptionConstraints
selectorstring | nullNonullable
session_idstring | nullNonullable
attributesarray<string> | nullNonullable
attributes[]stringNo

Responses

200

Successful Response

application/json

Resolved schema:

{
"properties": {
"elements": {
"items": {
"type": "object"
},
"type": "array",
"title": "Elements"
},
"count": {
"type": "integer",
"title": "Count"
},
"execution_time": {
"type": "number",
"title": "Execution Time"
},
"session_id": {
"type": "string",
"title": "Session Id"
}
},
"type": "object",
"required": [
"elements",
"count",
"execution_time",
"session_id"
],
"title": "BrowserExtractResponse",
"description": "Response schema for DOM extraction"
}

Field details:

FieldTypeRequiredDescriptionConstraints
elementsarray<object>Yes
elements[]objectYes
countintegerYes
execution_timenumberYes
session_idstringYes

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