Overview
CrewAI orchestrates role-playing agents around tasks. Every ScrapeGraph v2 endpoint is one method on the officialscrapegraph-py SDK — wrap each one with CrewAI’s @tool decorator and you get a full ScrapeGraph toolkit for your crew, no extra dependency required.
The legacy
ScrapegraphScrapeTool in crewai-tools still targets ScrapeGraph v1 (smartscraper / website_url / user_prompt) and its repository was archived on 2025-11-10. The wrappers below hit v2 directly through scrapegraph-py and cover every endpoint — scrape, extract, search, crawl, monitor, history, credits.CrewAI tool docs
How CrewAI’s
@tool decorator and BaseTool workscrapegraph-py on PyPI
The official Python SDK for ScrapeGraph v2
Installation
Get your ScrapeGraph API key from the dashboard. CrewAI uses OpenAI models by default — swap in any supported provider by passing
llm= to Agent.Build the toolkit
Save this once assgai_tools.py — every example below imports from it.
sgai_tools.py
Endpoint → tool reference
Direct invocation
CrewAI tools are callable outside an agent via.run(**kwargs) — useful for scripts, tests, or as a building block inside a custom task.
Crew pattern
Give an agent the whole toolkit and let it pick the right tool per task. CrewAI drives execution throughCrew.kickoff().
Prefer a focused toolset: if the agent only needs
extract and search, pass tools=[extract, search] instead of ALL_TOOLS. A tighter surface gives the model a smaller decision space and better routing.Structured output with Pydantic
extract already returns structured JSON under the json_data key. Ask CrewAI to validate the task output against a Pydantic model with output_pydantic.
Multi-agent pipeline
A classic CrewAI pattern: one agent searches, a second extracts structured data from the top hit. Tasks run sequentially and the second task receives the first’s output as context.Support
Python SDK
Source and issues for scrapegraph-py
Discord
Get help from our community