{
  "schema_version": 1,
  "name": "Scrape a list, de-duplicate, count",
  "version": 1,
  "description": "Read the actionable elements on a page, drop duplicates, keep the first ten, and count them — a starting point for any scrape that needs cleaning before export. Extend with your own selectors and a write step (for example, a request to your own webhook).",
  "tags": ["scrape", "data"],
  "vars": { "url": "https://example.com/list" },
  "on_error": "screenshot_and_stop",
  "steps": [
    { "open": {} },
    { "goto": { "url": "{{url}}" } },
    { "scroll_until": { "text": "Load more", "max_gestures": 10 } },
    { "elements": { "into": "items" } },
    { "transform": { "op": "unique", "from": "items", "into": "unique_items" } },
    { "transform": { "op": "slice", "from": "unique_items", "start": 0, "end": 10, "into": "top_items" } },
    { "transform": { "op": "length", "from": "top_items", "into": "count" } },
    { "screenshot": { "path": "scraped.png" } },
    { "close": {} }
  ]
}
