extract_by_selector
Extract specific data from any web page using CSS selectors. Returns text content or attribute values like href for matching elements.
Instructions
Extract specific data from a page using a CSS selector. Returns each matching element's text, or an attribute value when attribute is given (e.g. selector='a.product', attribute='href').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Page URL (http/https). Scheme-less input like `example.com` is allowed. | |
| selector | Yes | CSS selector, e.g. 'h2', '.price', 'table tr td', 'a.result-link'. | |
| attribute | No | Return this attribute instead of text (e.g. 'href', 'src', 'data-id'). | |
| limit | No | Maximum number of matches to return. | |
| render | No | auto=fast static fetch, fall back to headless browser if the page needs JS; static=never use a browser; browser=always render with Playwright (handles SPAs). | auto |