find_selectors_by_text
Find the smallest HTML elements matching text and retrieve CSS/XPath selector candidates for targeted scraping.
Instructions
Find CSS/XPath selector candidates for the smallest matching elements by text.
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": {
"text_query": "<text_query>"
},
"name": "find_selectors_by_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | ||
| limit | No | ||
| match_type | No | exact | |
| source_url | No | ||
| text_chars | No | ||
| text_query | Yes | ||
| case_sensitive | No | ||
| max_size_bytes | No | ||
| document_handle | No | ||
| truncate_on_limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | No | ||
| match_type | Yes | ||
| source_url | No | ||
| text_query | Yes | ||
| total_matches | Yes | ||
| case_sensitive | Yes | ||
| document_handle | No | ||
| omitted_matches | Yes | ||
| returned_matches | Yes |