Skip to main content
Glama

Web Scraper MCP

x402 Payment-Protected Web Scraping & Content Extraction API

Universal web scraper for AI agents to extract content, parse HTML, and get structured data from any publicly accessible webpage.

πŸš€ Features

  • 🌐 Universal Scraping - Extract content from any public webpage

  • πŸ“ Multiple Formats - Output as text, markdown, HTML, or JSON

  • 🎯 CSS Selectors - Target specific elements with precision

  • πŸ”— Metadata Extraction - Get title, description, OG tags, and more

  • πŸ“Š Structured Data - Extract links, images, headings in JSON format

  • πŸ’³ x402 Micropayments - Pay $0.004 USDC per scrape on Base Mainnet

  • πŸ€– MCP Compatible - Works with Claude and other AI agents

Related MCP server: Website Scraper MCP Server

πŸ“‘ Live Endpoint

Base URL: https://web-scraper-mcp.vercel.app (will be updated after deployment)

Scrape Webpage

GET /api/scrape?url={URL}&format={FORMAT}

Parameters:

  • url (required): URL of the webpage to scrape

  • format (optional): Output format - text, markdown, html, json (default: markdown)

Example:

curl "https://web-scraper-mcp.vercel.app/api/scrape?url=https://example.com&format=markdown"

Extract Elements

GET /api/extract?url={URL}&selector={SELECTOR}

Parameters:

  • url (required): URL of the webpage

  • selector (required): CSS selector (e.g., article, .content, #main)

Example:

curl "https://web-scraper-mcp.vercel.app/api/extract?url=https://example.com&selector=article"

Get Metadata

GET /api/metadata?url={URL}

Parameters:

  • url (required): URL to analyze

Example:

curl "https://web-scraper-mcp.vercel.app/api/metadata?url=https://example.com"

Response (402 Payment Required):

{
  "error": "Payment Required",
  "message": "This endpoint requires x402 payment",
  "payment": {
    "scheme": "exact",
    "network": "eip155:8453",
    "price": "$0.004",
    "currency": "USDC",
    "payTo": "0xf081ee84c0d85278a6242bc265f0b312021ebeb1"
  },
  "instructions": "Include payment proof in X-Payment-Proof header"
}

πŸ” Discovery Endpoints

  • Bazaar Discovery: /.well-known/x402

  • MCP Metadata: /mcp/tools

  • Health Check: /health

πŸ’° Payment Details

  • Network: Base Mainnet (Chain ID: eip155:8453)

  • Currency: USDC

  • Price: $0.004 per scrape

  • Protocol: x402 "exact" scheme

  • Payment Address: 0xf081ee84c0d85278a6242bc265f0b312021ebeb1

πŸ€– Use with AI Agents

This MCP server is designed to work with Claude Code and other AI agents that support the Model Context Protocol (MCP) and x402 payments.

AI agents can:

  1. Discover the service on x402 Bazaar

  2. Pay via CDP Facilitator

  3. Scrape any public webpage

  4. Extract specific content with CSS selectors

  5. Get clean markdown or structured JSON

  6. Monitor websites for changes

  7. Aggregate content from multiple sources

πŸ“¦ Response Format

Scrape Response (Markdown)

{
  "success": true,
  "url": "https://example.com",
  "format": "markdown",
  "title": "Example Domain",
  "content": "# Example Domain\n\nThis domain is for use in illustrative examples...",
  "scrapedAt": "2026-09-04T20:00:00.000Z",
  "payment": {
    "verified": true,
    "amount": "0.004",
    "currency": "USDC"
  }
}

Scrape Response (JSON)

{
  "success": true,
  "url": "https://example.com",
  "format": "json",
  "title": "Example Domain",
  "content": {
    "title": "Example Domain",
    "headings": ["Example Domain", "More Information"],
    "paragraphs": [
      "This domain is for use in illustrative examples in documents.",
      "You may use this domain in literature without prior coordination."
    ],
    "links": [
      {
        "text": "More information...",
        "href": "https://www.iana.org/domains/example"
      }
    ],
    "images": []
  },
  "scrapedAt": "2026-09-04T20:00:00.000Z"
}

Extract Response

{
  "success": true,
  "url": "https://example.com",
  "selector": "article",
  "count": 2,
  "elements": [
    {
      "html": "<article><h2>Title</h2><p>Content...</p></article>",
      "text": "Title Content...",
      "attributes": {
        "class": "post",
        "id": "post-123"
      }
    }
  ],
  "scrapedAt": "2026-09-04T20:00:00.000Z"
}

Metadata Response

{
  "success": true,
  "url": "https://example.com",
  "metadata": {
    "title": "Example Domain",
    "description": "Example domain for illustrative purposes",
    "keywords": "example, domain, documentation",
    "author": "IANA",
    "ogTitle": "Example Domain",
    "ogDescription": "Example domain for illustrative purposes",
    "ogImage": "https://example.com/image.jpg",
    "ogUrl": "https://example.com",
    "twitterCard": "summary_large_image",
    "canonical": "https://example.com",
    "favicon": "/favicon.ico",
    "language": "en"
  },
  "scrapedAt": "2026-09-04T20:00:00.000Z"
}

πŸ› οΈ Local Development

# Install dependencies
npm install

# Copy environment file
cp .env.example .env

# Run locally
npm start

# Development mode with auto-reload
npm run dev

Server will start on http://localhost:3000

πŸš€ Deployment

Deploy to Vercel

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

# Deploy to production
vercel --prod

The vercel.json configuration is already set up for Express.

🎯 Output Formats

Text Format

Clean text content with whitespace normalized:

Example Domain This domain is for use in illustrative examples...

Markdown Format

HTML converted to clean markdown:

# Example Domain

This domain is for use in illustrative examples in documents.

[More information...](https://www.iana.org/domains/example)

HTML Format

Full HTML source code:

<!DOCTYPE html>
<html>
<head><title>Example Domain</title></head>
<body>...</body>
</html>

JSON Format

Structured data with headings, paragraphs, links, and images:

{
  "title": "Example Domain",
  "headings": ["Example Domain"],
  "paragraphs": ["This domain is..."],
  "links": [{"text": "More info", "href": "..."}],
  "images": [{"alt": "Logo", "src": "..."}]
}

🎯 CSS Selector Examples

Extract specific content using CSS selectors:

  • Article content: article, article.post, .article-content

  • Main content: main, #main, .main-content

  • Headings: h1, h2, h3, h4, h5, h6

  • Paragraphs: p, .content p

  • Lists: ul, ol, li

  • Links: a[href], .nav a

  • Images: img[src], .gallery img

  • Tables: table, tbody tr, td

  • Specific IDs: #header, #footer

  • Specific classes: .post, .comment, .author

πŸ“Š Use Cases

  • Content Aggregation - Collect articles, blog posts, news from multiple sites

  • Price Monitoring - Track product prices across e-commerce sites

  • Research - Extract data for analysis and reports

  • SEO Analysis - Get meta tags, headings, and structured data

  • Competitor Monitoring - Track changes on competitor websites

  • Data Mining - Extract structured data from web pages

  • News Monitoring - Track headlines and articles

  • Social Media - Scrape public posts and profiles

  • Real Estate - Collect property listings

  • Job Boards - Aggregate job postings

⚠️ Important Notes

Limitations

  • Only works with publicly accessible webpages

  • Does not execute JavaScript (static HTML scraping only)

  • Respects robots.txt and rate limiting

  • Maximum response time: 10 seconds per request

Best Practices

  • Always check if a site offers an official API first

  • Respect website terms of service

  • Don't scrape personal or sensitive data

  • Use appropriate rate limiting

  • Cache results when possible

  • Only scrape publicly accessible information

  • Respect copyright and intellectual property

  • Follow robots.txt guidelines

  • Don't overload servers with requests

  • Use data responsibly

πŸ”— Integration Example

With Claude Code

// AI agent automatically handles x402 payment
const response = await fetch('https://web-scraper-mcp.vercel.app/api/scrape?url=https://example.com&format=markdown', {
  headers: {
    'X-Payment-Proof': '<payment_proof>'
  }
});

const data = await response.json();
console.log(data.content); // Markdown content

MCP Tool Schema

{
  "name": "scrape_webpage",
  "description": "Scrape and extract content from any publicly accessible webpage",
  "inputSchema": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "URL of the webpage to scrape",
        "format": "uri"
      },
      "format": {
        "type": "string",
        "description": "Output format",
        "enum": ["text", "markdown", "html", "json"],
        "default": "markdown"
      }
    },
    "required": ["url"]
  }
}

πŸ” Security

  • All payments via x402 protocol on Base Mainnet

  • No user data stored

  • Payment verification on every request

  • Rate limiting and validation built-in

  • Secure HTTP requests with proper headers

πŸ“ License

MIT


Built with ❀️ for the AI agent ecosystem

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Extracts clean text content and metadata from website URLs using Beautiful Soup through a standardized interface for AI agents. It supports both Bearer token authentication and a blockchain-based pay-per-use protocol for flexible access.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables extracting clean Markdown from any webpage by paying $0.005 USDC per call via the x402 protocol, with automatic wallet-based payment settlement.
    11
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables extracting clean, structured markdown from any URLβ€”stripping nav, ads, and scriptsβ€”for RAG pipelines and AI research agents, with pay-per-call micropayments via x402.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/acceptancestronk01-sudo/web-scraper-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server