ScrapingBee

com.scrapingbee由 scrapingbee.com 发布官方发布者v2.2.1更新于 Oct 26, 2026

Scrape any web page, search Google/Amazon/Walmart/YouTube and extract data via the ScrapingBee API.

已验证Streamable HTTP可网页运行网页搜索与抓取商业与电商AI 与机器学习

概览

AI 生成的概览

由 ScrapingBee 托管的 MCP 服务器,让助手通过 ScrapingBee API 抓取网页、执行网页与电商搜索并获取结构化数据。

可以做什么
  • 抓取页面与文件:返回网址的文本或 Markdown、渲染后的 HTML、截图,或下载 PDF、图片等文件
  • 用 CSS 或 XPath 选择器从页面中提取指定数据
  • 网页搜索:快速通用搜索,以及新闻、地图、Lens、购物、图片或 AI 模式的 Google 结果
  • 查询电商与视频:Amazon 搜索、商品详情与价格;Walmart 搜索与商品详情;YouTube 搜索、视频元数据与字幕
  • 调用托管模型:向 ChatGPT 或 Gemini 发送提示并取回回答,可用时附带引用
  • 查看账户用量:读取剩余额度与当前并发数
适用场景
适合助手需要模型自身知识之外的实时网页数据时:读取或提取特定页面内容、通用或专门搜索、电商价格与商品调研、YouTube 字幕,或快速获取 ChatGPT、Gemini 的补充回答。它是托管服务,适合不想自建浏览器抓取基础设施的智能体。
运行要求
使用 ScrapingBee 运营的远程 Streamable HTTP 端点,无需本地安装。需要 ScrapingBee API 密钥,以 Authorization 的 bearer 头发送(README 也展示了通过 SCRAPINGBEE_API_KEY 环境变量传入的方式)。需要能访问该端点的网络。
安装前请注意
每次工具调用都会消耗 ScrapingBee API 额度,使用会产生实际费用,可用用量工具查看余额。API 密钥是可计费的机密,放在 Authorization 头中,避免写入共享配置或日志。发送给 ask_chatgpt 和 ask_gemini 的提示,以及提交抓取的网址,都会传给 ScrapingBee,并进一步传给目标网站和模型提供方。每次调用只处理一个页面或查询,结果直接返回对话中。

AI 概览如何生成和校验

安装

在 SourceWeft 中

  1. 打开 控制台中的 ScrapingBee,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/com.scrapingbee%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "scrapingbee": {
      "type": "http",
      "url": "https://mcp.scrapingbee.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

ScrapingBee MCP Server

[scrapingbee-mcp]

A production-ready Model Context Protocol (MCP) server that enables AI agents to access structured web data using ScrapingBee as a tool.

This project demonstrates how to transform ScrapingBee into an AI-native data layer. Instead of embedding scraping logic directly inside prompts, AI agents register ScrapingBee as a tool and request structured web data on demand.

If you are building:

• AI agents that require live web access
• Autonomous research systems
• Ecommerce intelligence bots
• Market monitoring agents
• LLM workflows with tool execution
• AI-powered web scraping infrastructure

This repository provides a complete MCP integration blueprint.

Quick start

The server is hosted by ScrapingBee at https://mcp.scrapingbee.com/mcp (Streamable HTTP) — there is nothing to install. You need a ScrapingBee API key (get one here; trial credits included), sent as the header Authorization: Bearer <key>. Registry name: com.scrapingbee/mcp.

Claude Code

claude mcp add --transport http scrapingbee https://mcp.scrapingbee.com/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Codex CLI

codex mcp add scrapingbee --url https://mcp.scrapingbee.com/mcp \
  --bearer-token-env-var SCRAPINGBEE_API_KEY

Cursor, VS Code and other clients with a JSON config

{
  "mcpServers": {
    "scrapingbee": {
      "url": "https://mcp.scrapingbee.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Also available through Glama, Smithery and the MCP Registry.

Tools

ToolWhat it does
get_page_textFetch a URL and return its content as text or markdown (JavaScript rendered, blocks handled)
get_page_htmlFetch a URL and return the rendered HTML
get_screenshotFetch a URL and return a screenshot
get_fileDownload a file (PDF, image, …) from a URL
extract_page_dataFetch a URL and extract specific data with CSS or XPath selectors
fast_searchFast web search returning clean organic results and top stories — the first choice for general searches
get_google_search_resultsGoogle SERP as JSON for specialised searches: news, maps, Lens, shopping, images, AI mode
get_amazon_search_resultsAmazon search results as JSON
get_amazon_product_detailsAmazon product details by ASIN
get_amazon_pricingCurrent Amazon price and seller offers by ASIN
get_walmart_search_resultsWalmart search results as JSON
get_walmart_product_detailsWalmart product details by ID
get_youtube_search_resultsYouTube search results
get_youtube_video_metadataTitle, description, stats and more for a video
get_youtube_video_subtitlesSubtitles / transcript for a video
ask_chatgptSend a prompt to ChatGPT, optionally with web search
ask_geminiSend a prompt to Gemini, with citations when available
get_scrapingbee_usageRemaining credits and concurrency for your account

Each call consumes API credits exactly as the equivalent ScrapingBee API request would (see pricing and the API documentation). The server handles one page or query per call; for hundreds of URLs, crawling a site, writing results to files or scheduling recurring jobs, use the ScrapingBee CLI.

Relevant keywords: scrapingbee mcp
model context protocol server
mcp scraping
ai agent web scraping
mcp web scraping tool

What Is Model Context Protocol (MCP)?

Model Context Protocol (MCP) defines how AI systems interact with external tools in a structured way.

Instead of letting a language model guess how to scrape or browse the web, MCP allows it to:

  1. Discover available tools
  2. Call a tool using structured parameters
  3. Receive normalized JSON responses
  4. Inject results back into the reasoning loop

The ScrapingBee MCP server exposes web scraping capabilities as a formally registered tool that AI systems can use safely and predictably.

Why Use ScrapingBee with MCP?

AI models cannot reliably:

• Bypass anti-bot protections
• Manage proxy rotation
• Render JavaScript-heavy pages
• Handle CAPTCHA challenges
• Maintain scraping infrastructure

ScrapingBee handles all of that.

The MCP server acts as a bridge between your AI agent and ScrapingBee’s managed scraping infrastructure.

This enables true AI agent web scraping without fragile prompt-based hacks.

Architecture Overview

AI Agent
→ MCP Client
→ ScrapingBee MCP Server
→ ScrapingBee API
→ Target Website
→ Structured JSON Response
→ Injected Back Into Agent Context

The AI agent never scrapes directly.
It calls tools.
The MCP server executes them.

Installation

There is nothing to install or run: the server is operated by ScrapingBee at https://mcp.scrapingbee.com/mcp. The only setup is your API key, which every client below sends as a Authorization: Bearer header:

export SCRAPINGBEE_API_KEY=your_api_key

Connecting to the ScrapingBee MCP Server

You can connect in two ways:

  1. Via Claude Desktop (remote MCP)
  2. Via a custom Python MCP client

Option 1: Connect to Claude Desktop

Add the ScrapingBee MCP server to your claude_desktop_config.json file:

{
  "mcpServers": {
    "scrapingbee": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.scrapingbee.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer YOUR_API_KEY"
      }
    }
  }
}

(The AUTH_HEADER variable works around mcp-remote's handling of spaces in arguments.)

This registers ScrapingBee as an MCP tool provider inside Claude Desktop.

After restarting Claude, the tools become available automatically.

Option 2: Custom Python MCP Client

For advanced AI workflows, you can build a minimal async MCP client using Python.

Below is a complete working example.

custom_mcp_client.py

import os
import re
import json
import asyncio
import httpx
import google.generativeai as genai
from typing import Dict, Any, List

MCP_SERVER_URL = "https://mcp.scrapingbee.com/mcp"
SCRAPINGBEE_API_KEY = os.environ.get("SCRAPINGBEE_API_KEY")
GEMINI_API_KEY = os.environ.get("GEMINI_API_KEY")

MCP Client Implementation

class MCPClient:
    def __init__(self, base_url: str, api_key: str):
        self.base_url = base_url
        self.session_id = None
        self.http_client = httpx.AsyncClient(timeout=300)
        self.headers = {
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
            "Accept": "application/json, text/event-stream",
            "User-Agent": "Minimal-MCP-Client/1.0",
        }

    async def _send_request(self, payload: Dict[str, Any]):
        headers = self.headers.copy()
        if self.session_id:
            headers["Mcp-Session-Id"] = self.session_id

        response = await self.http_client.post(self.base_url, json=payload, headers=headers)
        response.raise_for_status()

        text = (await response.aread()).decode("utf-8")

        if "data:" in text:
            match = re.search(r"data:\s*({.*})", text, re.DOTALL)
            if match:
                return json.loads(match.group(1))

        if response.status_code in [202, 204] or not text:
            return {"status": "ok"}

        return json.loads(text)

    async def initialize(self):
        init_payload = {
            "jsonrpc": "2.0",
            "id": "1",
            "method": "initialize",
            "params": {
                "protocolVersion": "2024-11-05",
                "capabilities": {},
                "clientInfo": {"name": "MinimalClient"},
            },
        }

        async with self.http_client.stream(
            "POST", self.base_url, json=init_payload, headers=self.headers
        ) as response:
            self.session_id = response.headers.get("Mcp-Session-Id")

        notify_payload = {
            "jsonrpc": "2.0",
            "method": "notifications/initialized",
            "params": {}
        }

        await self._send_request(notify_payload)

        list_payload = {
            "jsonrpc": "2.0",
            "id": "2",
            "method": "tools/list",
            "params": {}
        }

        return await self._send_request(list_payload)

    async def call_tool(self, tool_name: str, arguments: Dict[str, Any]):
        payload = {
            "jsonrpc": "2.0",
            "id": "3",
            "method": "tools/call",
            "params": {
                "name": tool_name,
                "arguments": arguments
            }
        }

        return await self._send_request(payload)

Converting MCP Tools for Gemini

def format_tools_for_gemini(tools: List[Dict[str, Any]]):
    type_map = {
        "string": genai.protos.Type.STRING,
        "integer": genai.protos.Type.INTEGER,
        "number": genai.protos.Type.NUMBER,
        "boolean": genai.protos.Type.BOOLEAN,
    }

    gemini_tools = []

    for tool in tools:
        properties = {}
        input_schema = tool.get("inputSchema", {})

        if "properties" in input_schema:
            for name, prop in input_schema["properties"].items():
                properties[name] = genai.protos.Schema(
                    type=type_map.get(prop.get("type", "string")),
                    description=prop.get("description", "")
                )

        func = genai.protos.FunctionDeclaration(
            name=tool["name"],
            description=tool["description"],
            parameters=genai.protos.Schema(
                type=genai.protos.Type.OBJECT,
                properties=properties,
                required=input_schema.get("required", [])
            ),
        )

        gemini_tools.append(
            genai.protos.Tool(function_declarations=[func])
        )

    return gemini_tools

Full AI → MCP → Tool Execution Flow

async def main():
    mcp_client = MCPClient(MCP_SERVER_URL, SCRAPINGBEE_API_KEY)
    tools_response = await mcp_client.initialize()

    genai.configure(api_key=GEMINI_API_KEY)
    gemini_tools = format_tools_for_gemini(tools_response["result"]["tools"])

    model = genai.GenerativeModel(
        model_name="gemini-2.5-pro",
        tools=gemini_tools
    )

    user_prompt = input("Ask the AI to perform a task:\n> ")

    response = model.generate_content(user_prompt)
    function_call = response.candidates[0].content.parts[0].function_call

    tool_name = function_call.name
    tool_args = dict(function_call.args)

    result = await mcp_client.call_tool(tool_name, tool_args)

    print(json.dumps(result, indent=2))

What This Enables

With this architecture you can:

• Build AI agents that reason about available tools
• Allow LLMs to dynamically choose scraping actions
• Execute structured web data extraction
• Inject real-world data into model context
• Create scalable AI-native web scraping systems

Conclusion

The ScrapingBee MCP Server transforms web scraping into a structured, tool-driven data layer for AI systems.

Instead of brittle prompt scraping, you get:

• Model Context Protocol compliance
• JSON-RPC structured execution
• AI agent web scraping
• Scalable tool orchestration

This is AI-native web data access.

To start building AI-powered agents today, Get your free API key and connect to the ScrapingBee MCP server in minutes.

来源:README.md,提交 15d5788

工具

18

get_amazon_search_results

Scrape Amazon search results using ScrapingBee. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数tagpagesquery必填domaincountrysort_byadd_htmlcurrency另有 8 个

get_amazon_product_details

Scrape Amazon product details using ScrapingBee. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数tagquery必填domaincountryadd_htmlcurrencylanguagezip_code另有 3 个

get_amazon_pricing

Retrieve current Amazon product pricing and seller offers for a given ASIN. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数tagasin必填domaincountryadd_htmlcurrencylanguagezip_code另有 1 个

ask_chatgpt

This tool allows you to send a prompt to OpenAI's ChatGPT via ScrapingBee and get back the generated response. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数tagprompt必填searchadd_htmlcountry_code

ask_gemini

Ask Gemini through ScrapingBee and receive citation objects when available. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数tagprompt必填add_htmlcountry_code

get_google_search_results

This is a FALLBACK tool — use fast_search first for general web searches. Only use this tool when you need specialized search types that fast_search does not support: news, maps, Google Lens, shopping, image search, or Google AI mode. Scrape Google search results using ScrapingBee and return the results. This tool can scrape normal results, news results, maps results, search using google lens,…

输入参数tagnfprpagepagesdeviceradiussearch必填sort_by另有 11 个

get_page_text

Scrape a URL using ScrapingBee and return the page content in Markdown or Text format. Scope: one URL per call, with the result returned into the conversation. For many URLs, a whole site, output written to a file or directory, resumable jobs, or a scheduled re-run, use the ScrapingBee CLI instead — `scrapingbee scrape --input-file urls.txt --output-dir results`, `scrapingbee crawl URL…

输入参数url必填waitdevicecookiestimeoutai_querymax_costwait_for另有 15 个

get_page_html

Scrape a URL using ScrapingBee and return the page content in HTML. Scope: one URL per call, with the result returned into the conversation. For many URLs, a whole site, output written to a file or directory, resumable jobs, or a scheduled re-run, use the ScrapingBee CLI instead — `scrapingbee scrape --input-file urls.txt --output-dir results`, `scrapingbee crawl URL --save-pattern ...`,…

输入参数url必填waitdevicecookiestimeoutai_querymax_costwait_for另有 13 个

extract_page_data

Scrape a URL using ScrapingBee and extract specific data using CSS or XPath selectors. Scope: one URL per call, with the result returned into the conversation. For many URLs, a whole site, output written to a file or directory, resumable jobs, or a scheduled re-run, use the ScrapingBee CLI instead — `scrapingbee scrape --input-file urls.txt --output-dir results`, `scrapingbee crawl URL…

输入参数url必填waitdevicecookiestimeoutmax_costwait_forauto_mode另有 15 个

get_screenshot

Scrape a URL using ScrapingBee and return it's screenshot. Scope: one URL per call, with the result returned into the conversation. For many URLs, a whole site, output written to a file or directory, resumable jobs, or a scheduled re-run, use the ScrapingBee CLI instead — `scrapingbee scrape --input-file urls.txt --output-dir results`, `scrapingbee crawl URL --save-pattern ...`, `scrapingbee…

输入参数url必填waitdevicecookiestimeoutwait_forrender_jssession_id另有 12 个

get_file

Fetches a file from a URL and returns it in a format suitable for FastMcP. This tool can be used to fetch any file type, including images, PDFs, etc. The framework will handle the encoding and packaging of the file. Scope: one URL per call, with the result returned into the conversation. For many URLs, a whole site, output written to a file or directory, resumable jobs, or a scheduled re-run,…

输入参数url必填devicecookiestimeoutrender_jssession_idcountry_codecustom_google另有 1 个

get_scrapingbee_usage

Read real-time credit and concurrency usage for the authenticated ScrapingBee account. Note: This endpoint is rate-limited to 6 calls per minute and does not count against the account's concurrency limit. Returns: max_api_credit, used_api_credit, max_concurrency, current_concurrency, renewal_subscription_date.

无需输入参数。

get_walmart_search_results

Scrape Walmart search results using ScrapingBee. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数tagquery必填devicedomainsort_byadd_htmlstore_idmax_price另有 7 个

get_walmart_product_details

Scrape Walmart product details using ScrapingBee. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数tagdevicedomainadd_htmlstore_idproduct_id必填screenshotdelivery_zip另有 1 个

get_youtube_search_results

Search YouTube and return structured results. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数hdhdrtagliveis_3dis_4kvr180is_360另有 9 个

get_youtube_video_metadata

Fetch structured metadata for a YouTube video including title, description, views, likes, channel info, and technical details. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数video_id必填

get_youtube_video_subtitles

Retrieve subtitles for one YouTube video. Scope: one query per call. To run many queries in one pass, or to write results to disk instead of into the conversation, use the ScrapingBee CLI — `scrapingbee <command> --input-file queries.txt --output-dir results`.

输入参数taglanguagevideo_id必填subtitle_origin

版本历史

2
  1. v2.2.1最新Oct 9, 2026
  2. v2.2.0Oct 8, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

这个评分如何计算

其他 Scrapingbee 集成