Give any crew member the ability to browse, scrape, and extract data from any website. WebPerception API works as a native CrewAI tool.
from crewai.tools import tool
import requests
@tool("Web Scraper")
def scrape_website(url: str) -> str:
"""Scrape a website and extract structured content.
Use this to gather information from any URL.
Input should be a valid URL."""
response = requests.post(
"https://api.mantisapi.com/v1/scrape",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"url": url,
"extract": {
"schema": {
"title": "string",
"main_content": "string",
"key_points": ["string"]
}
}
}
)
return str(response.json())
from crewai import Agent, Task, Crew
# Researcher agent with web access
researcher = Agent(
role="Senior Research Analyst",
goal="Find and analyze information from the web",
backstory="Expert at gathering intelligence from web sources",
tools=[scrape_website],
verbose=True
)
# Writer agent that uses research
writer = Agent(
role="Content Strategist",
goal="Create compelling reports from research",
backstory="Skilled at synthesizing data into actionable insights",
verbose=True
)
# Define tasks
research_task = Task(
description="Research the top AI agent frameworks in 2026. Visit their websites and gather feature comparisons.",
agent=researcher,
expected_output="Detailed comparison of top 5 frameworks"
)
report_task = Task(
description="Write a competitive analysis report based on the research.",
agent=writer,
expected_output="Professional competitive analysis report"
)
# Assemble and run
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, report_task],
verbose=True
)
result = crew.kickoff()
print(result)
Any agent in your crew can use the scraping tool. Assign web access to researchers, analysts, or monitors.
Schema-based extraction returns clean JSON. No parsing code. No broken selectors. Just structured data.
Works in both sequential and hierarchical crew configurations. Multiple agents can scrape simultaneously.
Take visual snapshots for vision-enabled agents. Combine with GPT-4V for visual webpage understanding.
Full browser rendering. SPAs, dynamic content, infinite scroll — all handled automatically.
Built-in anti-detection. Your crew agents never get blocked or rate-limited.
A 3-agent crew: Web Researcher scrapes competitor sites, Data Analyst identifies trends, Report Writer creates executive summaries.
Scout Agent monitors 20+ sources for relevant content, Editor Agent filters and ranks by relevance, Publisher Agent formats for distribution.
Prospector Agent scrapes company websites for tech stacks and hiring signals, Qualifier Agent scores leads, Outreach Agent drafts personalized emails.
Free tier. 100 requests/month. No credit card required.
Get Free API Key → Read the Docs