All How-To Guides

4 Ways to Scrape Websites with Claude Code

How to scrape websites with Claude Code?

4 MCP servers featured

Web scraping is essential for data collection, competitive analysis, and content aggregation. While Claude Code can't directly access websites, MCP servers provide powerful scraping capabilities that let you extract data, render JavaScript, and convert pages to structured formats. Here are the best options available.

Recommended MCP Servers

Apify Actors MCP

apify/actors-mcp-server

>500

Access 3,000+ pre-built cloud tools (Actors) to extract data from websites, e-commerce, social media, search engines, and maps.

Key Features

  • 3,000+ pre-built scrapers for common sites
  • E-commerce, social media, search engines covered
  • Cloud-based execution
  • Handles JavaScript-heavy sites

Installation

npx @apify/actors-mcp-server

Apify's MCP server gives you instant access to thousands of battle-tested scrapers. Instead of building your own, just pick an Actor for Amazon, Twitter, Google, or almost any major platform. Perfect for quick data extraction without writing custom code.

Best for: Scraping popular platforms without coding View on GitHub

Fetcher MCP

jae-jae/fetcher-mcp

>400

Fetch web page content using Playwright headless browser with JavaScript rendering and intelligent content extraction.

Key Features

  • JavaScript rendering via Playwright
  • Intelligent content extraction
  • Outputs Markdown or HTML format
  • Handles dynamic content

Installation

npx fetcher-mcp

Fetcher MCP excels at scraping modern JavaScript-heavy websites. It uses Playwright to fully render pages before extraction, ensuring you get the actual content users see rather than empty HTML shells. The Markdown output is particularly useful for LLM consumption.

Best for: Dynamic content extraction View on GitHub

Playwright MCP Server

executeautomation/mcp-playwright

>5k

Full Playwright automation for browser-based scraping with screenshot and PDF generation support.

Key Features

  • Full Playwright feature set
  • Screenshot and PDF generation
  • Form automation support
  • Web scraping optimized

Installation

npx @executeautomation/mcp-playwright

When you need more than simple page fetching, this Playwright server provides full browser control. Navigate through authentication flows, fill forms, paginate through results, and capture screenshots. Ideal for complex scraping that requires interaction.

Best for: Complex multi-step scraping workflows View on GitHub

Fetch MCP

zcaceres/fetch-mcp

>300

Flexible fetching of JSON, text, and HTML data from any URL.

Key Features

  • Fetch JSON, text, and HTML
  • Simple and lightweight
  • No browser overhead
  • Fast for static content

Installation

npx fetch-mcp

Fetch MCP is the lightweight choice when you don't need JavaScript rendering. It's fast, simple, and perfect for scraping APIs or static HTML pages. Use this when speed matters more than handling dynamic content.

Best for: APIs and static HTML pages View on GitHub

Quick Comparison

MCPStarsBest ForProsCons
Apify Actors>500Popular platforms3000+ ready scrapersCloud dependency
Fetcher MCP>400JS-heavy sitesSmart extractionSlower than fetch
Playwright MCP>5kComplex workflowsFull browser controlHigher resource use
Fetch MCP>300Static contentFast and simpleNo JS rendering

Getting Started

To get started with web scraping in Claude Code:

  1. For popular platforms (Amazon, Twitter, etc.), use Apify Actors:

    npx @apify/actors-mcp-server
    
  2. For JavaScript-heavy sites, use Fetcher MCP:

    npx fetcher-mcp
    
  3. For static content or APIs, use Fetch MCP for speed.

Example prompt: "Scrape the product titles and prices from this e-commerce page and output as JSON."

Related Guides