Extract Data
extractExtract visible text, HTML markup, page title, URL, or evaluate JavaScript from a webpage using CSS selectors or element references. Target specific elements or get page-level data with configurable character limit.
Instructions
Extract data from the page without a full snapshot. Types: text (visible text), html (markup), title, url, js (evaluate JavaScript). Use target with @eN or CSS selector for element-specific extraction.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "extract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID. | |
| type | No | What to extract. | text |
| target | No | @eN ref or CSS selector. Omit for page-level. | |
| js | No | JavaScript expression for type='js'. | |
| maxChars | No | Max output characters. |