crewAI-tools
crewAI-tools copied to clipboard
feat: add SteelScrapeWebsiteTool for scraping websites
Description
Adds SteelScrapeWebsiteTool, a web scraping tool that integrates the Steel to fetch webpage contents for AI agents. It supports captcha solving and proxy-based stealth to enable more reliable, effective scraping.
Usage
Basic:
from crewai_tools import SteelScrapeWebsiteTool
tool = SteelScrapeWebsiteTool(api_key="your_key", formats=["markdown"], proxy=True)
result = tool.run("https://example.com")
CrewAI agent:
from crewai import Agent
from crewai_tools import SteelScrapeWebsiteTool
scraper = SteelScrapeWebsiteTool(api_key="your_key", formats=["markdown"], proxy=True)
agent = Agent(role="Researcher", goal="Extract and analyze web content", tools=[scraper])
Testing
- Location:
tests/tools/test_steel_scrape_website_tool.py - Coverage areas:
- Prefers constructor
api_keyover env - Raises without API key when neither provided
- Happy-path
_runand Steel client interaction - Guard when client is not initialized
- Defaults for
formatsandproxy
- Prefers constructor
Dependencies
- Adds runtime dependency:
steel-sdk>=0.9.2 - Adds optional extra group
steel-sdkwith the same pin - Environment:
STEEL_API_KEYrequired for execution
Thanks for creating such an awesome project and reviewing this PR! 🙂 I’m looking forward to using Steel within the CrewAI ecosystem.