Overview
The agent has three components:- Agent β LLM-driven agent that orchestrates scraping and data extraction
- FirecrawlTools β Built-in Upsonic toolkit wrapping the Firecrawl API; only
scrape_urlis enabled to keep the tool surface minimal - Task β Defines the target URL and the exact output format
Project Structure
Environment Variables
Installation
Complete Implementation
main.py
requirements.txt
How It Works
Sample Output
Extending the Example
Crawl multiple pages
Switch fromscrape_url to crawl_website to follow pagination automatically:
Structured JSON extraction
Useextract_data for schema-driven, LLM-powered extraction directly inside Firecrawl:
Point at a different shop
Replace the URL in the task description with any publicly accessible store:Key Features
Security Notes
- The agent only has access to
scrape_urlβ it cannot read local files, execute code, or access other systems. - Only point the agent at publicly accessible URLs. Firecrawl respects
robots.txtby default. - Store
FIRECRAWL_API_KEYandANTHROPIC_API_KEYin.envβ never hardcode keys in source files.

