1. Simple Page Scraping: No Actions Needed
When the content you want is fully visible on one page, you do not need actions at all. Just send the URL with a prompt and let the AI extract what you need. Use this when: the list is short, fits on one page, and does not require any clicking.The page has 10 quotes. A prompt handles all 10 easily without any forEach. If the same site had 200 quotes across 20 pages, that is when you would reach for forEach with pagination.
2. Dismiss a banner, then scrape
Some pages load a cookie banner or modal that blocks the content. Click it away before the scrape runs. Use this when: a consent banner or popup is covering the content.3. Search, wait for results, then scrape
Type a search query and scrape the results page. Use this when: the content only appears after submitting a search form.4. Inline forEach: Collect a List with itemPrompt
Process every card on a page without navigating away from it. Each card’s content is read directly and passed throughitemPrompt for AI extraction.
Use this when: all the data is visible on the listing page itself and you want a clean, structured result per item.
result.content):
5. Inline forEach with Pagination: Collect Across Multiple Pages
When a listing spans multiple pages, usepagination to keep collecting after the first page is exhausted.
Use this when: the catalogue has a “Next” button and you need more items than fit on one page.
result.content):
6. Navigate Mode: Follow Links to Detail Pages
Click into each product page to capture the rich detail that only exists there. This gives you descriptions, specifications, availability, and anything else that is not on the listing page. Use this when: the listing page only shows a preview and the full content is on the individual item page.result.content):
maxItems reasonable (6–10) unless you have a lot of time to spare.
7. Click a category first, then forEach navigate
Use an action to navigate to a specific section of the site before the forEach starts. The forEach runs on whatever page the browser is on after your pre-actions finish. Use this when: the items you want are behind a category link, tab, or filter on the homepage.result.content):
8. Click using plain English, then forEach with pagination
When you do not know the exact CSS selector for a navigation element, describe it in plain English using thevalue field on a click action. Spidra uses AI to locate the element and click it, then the forEach runs on the resulting page.
Use this when: the element you need to click does not have a stable CSS selector or is easier to describe in words.
9. Scrape multiple categories in one request
Pass up to 3 URLs in a single request. Spidra processes all of them in parallel and returns one result per URL. Use this when: you need data from several categories, brands, or pages at the same time.data array has three entries, one per URL, each with their own list of books. The whole thing runs in parallel, not sequentially.
10. Navigate + per-item scroll to reveal hidden content
After navigating to each item’s page, scroll down before capturing. Some pages lazy-load their content or hide a full description below the fold. Use this when: the destination page has content that only appears after scrolling, such as full product descriptions, reviews, and spec tables.- Opens the homepage
- Clicks the Poetry category link
- Finds all book title links
- For each book (up to 3): navigates to the book page, waits 1 second, scrolls to 50% to load the full description, captures the product area, runs AI extraction
- Combines all results into numbered items
result.content):
11. Click Mode: Expand Items and Capture Modal Content
For pages where clicking an item opens a modal, drawer, or expanded section (such as hotel room cards or FAQ accordions), useclick mode to open each one, capture its content, and move on.
Use this when: the detail content only appears after clicking an element on the page, inside the same page.
result.content):
12. Full Pipeline: Navigate, Paginate, and Extract
Combine forEach pagination with a top-level prompt to get a final clean output.itemPrompt handles per-item extraction during scraping. The top-level prompt does a final pass to restructure all items together.
Use this when: you want structured data from a multi-page catalogue in one clean API response.
itemPrompt runs on each book page as it is scraped. When all 20 are collected, the top-level prompt takes the combined output and sorts the final list.
Response:

