# Compliant Web Scraper

> Automated web scraping with mandatory robots.txt compliance, rate limiting, and PII filtering.

Compliant Web Scraper is a free AI agent skill on Agensi by 糟糕西瓜, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [糟糕西瓜](https://www.agensi.io/creators/awfulwatermelon)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.2.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/compliant-web-scraper
- Tags: automation, python, data-collection, web-scraping, compliance

## About this skill

Web scraping often leads to legal risks or IP bans due to aggressive fetching and lack of compliance checks. This skill enforces a "safety-first" workflow to collect public data without violating site policies or privacy laws.

### What it does
- **Compliance audit** runs an automated check against `robots.txt` and site terms to verify path accessibility.
- **Data triage** filters out personal identifiable information (PII) like phone numbers or addresses before extraction.
- **Polite fetching** executes requests with mandatory rate limiting, exponential backoff, and local caching.
- **Structured extraction** parses public HTML into clean JSON or CSV formats tailored to the target site structure.
- **Evidence logging** generates a compliance report including crawl delays and `robots.txt` snapshots for audit trails.

### How it works
1. **Run Check**: Execute `compliance_check.py` on the target URL to verify permissions and identify official APIs.
2. **Define Schema**: Specify which public fields to extract, such as product prices, news titles, or dates.
3. **Fetch Data**: Use `polite_fetch.py` with defined delay and jitter parameters to retrieve raw content safely.
4. **Parse and Save**: The agent extracts the defined fields and saves them to a structured file with timestamps.

### Frameworks & tools
Built with Python using standard libraries to minimize dependencies. Utilizes `WebFetch` for initial reconnaissance and local file operations for caching and logging.

### Why this beats prompting it yourself
Generic prompts often ignore `robots.txt` or lack exponential backoff, leading to blocked IPs. This skill enforces a hard-coded compliance gate that refuses to scrape PII or restricted paths, protecting your infrastructure and reputation.

### Use cases
- **Market research** to track competitor pricing on public e-commerce pages.
- **Content aggregation** for pulling headlines and links from public news portals.
- **Audit preparation** by generating data provenance logs for scraped datasets.
- **Site monitoring** to detect changes in public information without triggering security alerts.

### Known limitations
Does not support sites requiring login, CAPTCHA solving, or session management. Explicitly skips any path forbidden by robots.txt or containing PII.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Compliant Web Scraper skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does the skill ensure it doesn't violate a website's terms of service?

The skill runs a mandatory check against the target site's robots.txt file and automatically skips any paths or directories marked as 'Disallow' to ensure your data collection remains ethical and legal.

### Can I use this skill to scrape data from sites that require a login?

No, this skill is strictly for public data; it does not support bypassing CAPTCHAs, handling session cookies, or logging into password-protected areas.

### What happens if a public page accidentally contains personal identifiable information (PII)?

The skill includes a built-in 'Data Triage' layer that uses pattern matching to identify and redact sensitive information like phone numbers and physical addresses before the data is saved.

### What files and documentation are included in the purchase?

You will receive the core Python-based automation scripts (compliance_check.py and polite_fetch.py), a README guide for configuration, and a sample schema for structured data extraction.

### Which AI agent platforms are compatible with this web scraping skill?

The skill is designed to be framework-agnostic and can be integrated into any AI agent capable of executing Python scripts or making system calls to local files.

### How does this prevent my IP address from getting blocked during high-volume scraping?

The skill uses a 'Polite Fetching' protocol which includes mandatory delays between requests and exponential backoff, preventing your IP from being flagged or banned by site security.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
