scrape_structured
Extract structured data from web pages using CSS selectors. Specify fields and selectors to get JSON output from consistent markup, like pricing tables or product lists.
Instructions
Use this when you know the exact CSS selectors for the data you want — e.g. scraping a pricing table or product list with consistent markup. More reliable than LLM extraction for well-structured pages. Example: scrape_structured({url: "https://shop.com/products", selectors: {price: ".price", name: ".product-title"}})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to scrape | |
| selectors | Yes | CSS selectors mapping field names to selectors. Append @attr to extract an attribute instead of text (e.g. "a.link@href", "img@src") | |
| max_results | No | Maximum number of matches to return per field when a selector matches multiple elements |