extract
Fetch a web page and extract structured data by mapping field names to CSS or XPath selectors. Returns first matches or lists for multiple results.
Instructions
Fetch a page and pull structured fields out of it with CSS or XPath selectors.
selectors maps an output field name to a selector. Each value is either:
a CSS string, e.g. "h1::text" or "a.product::attr(href)" (returns the first match), or
an object: {"css": "...", "all": true} / {"xpath": "//h1/text()", "all": true} ("all": true returns every match as a list; default returns the first match).
Example: {"title": "h1::text", "prices": {"css": ".price::text", "all": true}} Returns {"data": {field: value | [values]}}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| selectors | Yes | ||
| obey_robots | No |