quiet robot

Agent Playground

Recipe: Scraper with retries

Fetches a page from a flaky site, waits and retries when it's busy, then parses the table and saves it. What it does, when to use it, how to make it yours, and what a run costs.

View as Markdown

Fetches a page from a website that's often busy, waits and tries again when it is, then reads the price table out of the page and saves it as a spreadsheet file.

At a glanceNotes
CategoryData
ShapeA retry loop with a pause
PlanFree and up
Needs a Claude keyNo
Limits it comes with5 loops, 240 seconds, $0.05
Scraper with retries, as it is on the canvas.Start test site (Run command), Fetch page (Run code), Wait 3 s (Wait), Parse table (Run code), Save (Run command). Arrows: Start test site to Fetch page; Fetch page to Wait 3 s on Failed; Wait 3 s to Fetch page; Fetch page to Parse table on Passed; Parse table to Save.FailedPassed>_ RUN COMMANDStart test site{ } RUN CODEFetch page◷ WAITWait 3 s3 s{ } RUN CODEParse table>_ RUN COMMANDSave
Scraper with retries, as it is on the canvas.
The Scraper with retries recipe in the builder after a run, with each step's result on the canvas and the run's steps listed on the right.
A real run of the recipe. The panel on the right lists every step with what it printed.

When to use it

  • Collecting prices, stock levels, listings or schedules from a website that has no download button.
  • Calling any service that sometimes answers "busy, try again".
  • A daily schedule that saves a fresh copy of a page's data.

Run it

  1. Open Agent Playground in the dashboard and find Scraper with retries under Start from a recipe. In the builder, Recipes in the toolbar lists them too.
  2. Choose Use this recipe. It becomes a flow of your own, so changing it never changes the recipe.
  3. Choose Simulate to see the forecast, then Run.

What you'll see: Fetch page fails twice ("The site answered 503: will wait and try again"), Wait 3 s waits between tries, and the third try works. Parse table saves three prices to prices.csv, and Save shows the first row.

Make it yours

  1. Delete Start test site: it's a stand-in website that's busy on purpose.
  2. Point Fetch page at the real page.
  3. Change Parse table to read the table or fields you need from that page.
  4. Set the flow's Policy to Only these sites, with just that website, so the flow can't reach anything else.
  5. Raise Wait for sites that ask you to slow down, and keep Loops low so a site that's down for the day doesn't keep you trying. Then add a daily Schedule trigger.

Note

Only collect data you're allowed to. Check the website's terms, and prefer an official download or API when there is one.

What a run costs

These are the builder's own forecast for the recipe as it comes, with its limits, rounded. Simulate shows the same numbers for your version, and they change as you change the flow.

NotesTypical1 in 10 runsAt most
Sandbox time$0.0002$0.0003$0.0031
How long it takes14 seconds27 seconds240 seconds

A typical run uses $0.0002 of sandbox time, so about 5,500 runs cost $1, and every plan includes $5 of usage a month. At most is the most a run could cost with these limits: it stops at $0.05 or 240 seconds, whichever comes first.

  • Agent PlaygroundQuickstart: build and run your first flow
  • Agent PlaygroundBlocks
  • Agent PlaygroundRecipes
  • SandboxesQuickstart: your first sandbox
  • SandboxesMCP server
  • SandboxesAPI reference