get_list
Extract structured records from repeating elements on a webpage by specifying a container selector and field selectors, aligning data from each card or div reliably.
Instructions
Extract one record per element matching container_selector (e.g. a
product card in a grid), pulling fields out of each one. This is the
div/card equivalent of get_table for sites that don't use markup.
fields maps an output field name to a CSS selector relative to each
container, e.g. {"title": ".product-title a", "price": "[data-a-color='base']"}.
Use "" to target the container itself, or append "@attr" to read an
attribute instead of text, e.g. "link": "a@href" or "image": "img@src".
Because each field is looked up independently within its own container, results never get misaligned the way separate get_page_content calls + manual zipping do when some cards are missing a field (e.g. a strikethrough "was" price only some products have). Not sure of the right selectors? Call find_repeating_elements first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | ||
| container_selector | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |