Scraping Best Practices

Guide ethical web scraping with robots.txt, rate limits, and browser automation.

2|Updated Oct 15, 2025
One-click install
npx skills add https://github.com/cyperx84/claude-code-plugin-examples --skill scraping-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Scraping Best Practices
Source: https://github.com/cyperx84/claude-code-plugin-examples/tree/main/examples/04-real-world/web-scraping-plugin/skills/scraping-best-practices
Command: npx skills add https://github.com/cyperx84/claude-code-plugin-examples --skill scraping-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides teams to perform web data extraction ethically and efficiently, providing best-practice guidance and ready-to-use patterns to avoid legal and operational pitfalls.

Core Features & Use Cases

  • Legal & Ethical Compliance: Check robots.txt, ToS, and consider API alternatives to ensure compliant scraping.
  • Rate Limiting & Politeness: Implement respectful delays, exponential backoff, and retry strategies to minimize server load.
  • Dynamic Content & Extraction: Use browser automation and robust selectors to reliably fetch data from JavaScript-rendered pages.
  • Data Validation & Storage: Clean, validate, and store extracted data with metadata for auditing and reuse.

Quick Start

Run the scraping workflow against a target URL using the provided Python utilities and browser automation setup. Example: python scrape.py https://example.com

Frequently Asked Questions about Scraping Best Practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scrape JavaScript-rendered web pages without getting blocked?

To scrape JavaScript-rendered web pages without getting blocked, use browser automation tools like Playwright to handle dynamic content while implementing rate limiting, respectful delays, and exponential backoff to minimize server load.

What is the best way to extract public web data ethically at scale?

The best way to extract public web data ethically at scale is to check robots.txt and Terms of Service first, apply polite scraping delays, and consider using official APIs as alternatives to ensure full legal and operational compliance.

How do I handle rate limiting when web scraping product prices and headlines?

To handle rate limiting when web scraping, implement polite scraping behaviors such as respectful delays, exponential backoff, and retry strategies to minimize server load and avoid triggering anti-bot blocks during data extraction.

Do I need to check robots.txt before extracting public data from websites?

Yes, you need to check robots.txt before extracting public data from websites to ensure legal compliance. Reviewing Terms of Service and evaluating API alternatives are also required to enforce ethical scraping behavior.

How do I validate and store extracted data for auditing and reuse?

To validate and store extracted data for auditing and reuse, apply data validation rules to clean the structured information, then store the extracted content alongside relevant metadata to maintain tracking and operational integrity.