Spider as a CrewAI agent tool.
Agents in a crew can crawl sites, scrape specific pages, and search the web autonomously. The crew decides when and how to use the web.
- 01
Researcher
Search and gather sources
SpiderTool (search)
- 02
Analyst
Extract structured data
SpiderTool (scrape)
- 03
Writer
Synthesize findings
Context from crew
Pass SpiderTool to any agent.
Import SpiderTool from crewai_tools, attach it to one or more agents, and the crew can read the live web.
from crewai import Agent, Task, Crew
from crewai_tools import SpiderTool
# Create the Spider tool
spider_tool = SpiderTool()
# Define agents with web access
researcher = Agent(
role="Senior Researcher",
goal="Find accurate, up-to-date information from the web",
tools=[spider_tool],
verbose=True,
)
analyst = Agent(
role="Data Analyst",
goal="Extract structured insights from raw web content",
tools=[spider_tool],
)
# Define tasks
research_task = Task(
description="Research the top 5 competitors in the AI search space. Crawl their websites and summarize their offerings.",
agent=researcher,
expected_output="A list of competitors with key features and pricing",
)
analysis_task = Task(
description="Analyze the research and identify market gaps.",
agent=analyst,
expected_output="A strategic analysis with actionable recommendations",
)
# Run the crew
crew = Crew(agents=[researcher, analyst], tasks=[research_task, analysis_task])
result = crew.kickoff()
print(result)Web access without wrapper code.
One-line install
Import SpiderTool, pass it to your agent. The tool handles authentication, rate limiting, and retries. Your agent asks for web data.
Agent-driven discovery
The crew decides what to crawl and when. A researcher agent can follow links across sites, pivot searches, and deep-dive autonomously.
Scrape, search, crawl
Spider exposes all three modes through the tool interface. Agents pick a single page, a web search, or a full domain crawl per task.
Structured markdown
Spider returns clean markdown that LLMs parse reliably. No HTML soup for the agents to fight through.
Parallel crews
Spider handles concurrency server-side. Multiple agents make requests simultaneously without conflicting or hitting local resource limits.
Combine with any tool
Mix SpiderTool with file writers, database tools, or API callers. Research the web, then act on findings in one workflow.
Wrap Spider as your own functions.
If you need search and crawl as separate tools, expose them through the Spider SDK. Use alongside SpiderTool for full control over what agents can call.
from crewai import Agent, Task, Crew
from spider import Spider
spider = Spider()
def search_web(query: str) -> str:
"""Search the web and return relevant content."""
results = spider.search(query, params={
"search_limit": 5,
"fetch_page_content": True,
"return_format": "markdown",
})
return "\n\n".join(
f"## {r['url']}\n{r['content'][:2000]}"
for r in results if r.get("content")
)
def crawl_site(url: str) -> str:
"""Crawl a website and return its contents."""
pages = spider.crawl_url(url, params={
"return_format": "markdown",
"limit": 20,
})
return "\n\n".join(
p["content"][:3000] for p in pages if p.get("content")
)
# Agents can call search_web() and crawl_site()
# as custom tools alongside SpiderTool for full flexibilityBuild a crew that reads the live web.
Free balance on sign-up. No subscription required.