Skip to main content
AI agent that crawls web pages and extracts structured data.

Code

Create web-scraping-agent.py with the code below, or save it directly from your editor.

Skill Configuration

Create skills/web-scraping-skill/skill.yaml:

How It Works

Web Scraping
  • ScrapeGraphTools: AI-powered structured data extraction
  • Intelligent web page crawling and parsing
  • JSON output formatting and cleaning
  • Custom extraction prompt support
Memory Management
  • Mem0Tools: Persistent memory for deduplication
  • Extraction profile storage and retrieval
  • Avoids re-scraping previously processed URLs
  • Remembers user extraction preferences
Data Processing
  • OpenRouter with GPT-OSS-120b for synthesis
  • Advanced data structuring and formatting
  • Content cleaning and normalization
  • JSON output preparation
Agent Capabilities
  • Web scraping assistant with AI extraction
  • Structured data output in JSON format
  • Memory-based optimization and caching
  • Multi-format data preparation

Dependencies

Environment Setup

Create .env file:

Run

Examples:
  • “Extract product information from https://example-shop.com including prices, names, and descriptions”
  • “Scrape news headlines from multiple news websites”
  • “Get pricing data from e-commerce product pages”

Example API Calls

Frontend Setup

Open http://localhost:5173 and try to chat with the web scraping agent