Query CSS selector
query_selectorFind elements by CSS selector and get a compact listing of their tag, text, href, id, and class. Efficiently extract repeated page structures like search results or product tiles.
Instructions
Find elements by CSS selector; list their tag, text, href, id and class.
The efficient way to pull a repeated structure off a page — search results, product tiles, table rows — without paying for a full snapshot.
Returns a compact listing only. It yields no uids, so it cannot drive clicks: take a snapshot when you need to interact, or operate on the elements directly via evaluate_script.
Element text is truncated to 200 characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of matching elements to return. | |
| selector | Yes | A CSS selector, e.g. "a.result", "#nav li", "input[type=file]". Standard querySelectorAll syntax — no jQuery extensions such as :contains(). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |