Skip to main content
Web scraper agents combine an LLM with the scrape_and_format_sync tool from swarms-tools. The agent decides what to scrape, the tool handles HTML parsing and formatting, and the LLM produces structured output — JSON, markdown, free text, or whatever the system prompt requests.

Step 1: Install

Step 2: Set up environment

Step 3: Build a single-site scraper agent

Step 4: Scale to multiple sites in parallel

batched_grid_agent_execution runs N agents on N tasks concurrently, pairing agents[i] with tasks[i]. Use it when you need to scrape several sites at once — for example, a competitive landscape report. Give each task its own Agent: one instance listed twice would run in two threads at once and share a single conversation.
Results come back in the same order as agents; if an agent fails, its slot holds the exception. Because every task has its own agent, each one can also use a different system prompt or model.

See also