Extract structured data from a page
extract_dataRead-only
Fetch a URL and return JSON built from CSS or XPath selectors, so the model receives structured fields instead of a whole page.
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": {
"url": "<url>",
"extract_rules": "<extract_rules>"
},
"name": "extract_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The absolute http or https URL to fetch. | |
| render_js | No | Render in a browser before extracting. | |
| extract_rules | Yes | Map a name to a selector. A string is shorthand for the text of the first match, and "a@href" takes an attribute. An object may set selector, selector_type (auto, css, xpath), type (item or list), and output (text, html, @attr, table_json, table_array, or a nested object of further rules). Example: {"titles": {"selector": "h2", "type": "list"}} |