# Scrapingbee — how to use (mcp.ai)

Connect your Scrapingbee account and use 5 tools for web scraping straight from your AI agent. Connect with your own API key. ScrapingBee is a web scraping API that handles headless browsers and proxy rotation, allowing developers to extract HTML from any website in a single API call.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_scrapingbee?ms=1787293500000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `scrapingbee_data_extraction`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/scrapingbee`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/scrapingbee/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/scrapingbee/data/extraction` — Tool to extract structured data from a webpage using CSS or XPath selectors. Use ScrapingBee's extract_rules feature.
  - body: { url: string, wait?: integer, device?: string, api_key: string, extractor: object, javascript?: boolean, country_code?: string, premium_proxy?: boolean, block_resources?: boolean, forward_headers?: object }
- `POST https://api.mcp.ai/api/scrapingbee/html/fetch` — Tool to fetch HTML or screenshot via ScrapingBee HTML API. Use when you need page markup or image after optional JS rendering and resource controls. For anti-bot or CAPTCHA-protected sites (e.g., Clou
  - body: { url: string, wait?: integer, retry?: integer, device?: string, cookies?: string, wait_for?: string, block_ads?: boolean, render_js?: boolean, js_snippet?: string, screenshot?: boolean, js_scenario?: string, country_code?: string, extract_rules?: string, premium_proxy?: boolean, stealth_proxy?: boolean, block_resources?: boolean, screenshot_selector?: string, screenshot_full_page?: boolean }
- `POST https://api.mcp.ai/api/scrapingbee/scraping/bee/proxy/mode` — Tool to fetch web content via ScrapingBee's Proxy Mode. Use when you need to route requests through ScrapingBee proxies with optional JS rendering and resource blocking.
  - body: { url: string, cookies?: object, headers?: object, timeout?: integer, block_ads?: boolean, render_js?: boolean, session_id?: integer, js_scenario?: string, country_code?: string, premium_proxy?: boolean, stealth_proxy?: boolean, block_resources?: boolean, forward_headers?: boolean }
- `POST https://api.mcp.ai/api/scrapingbee/stealth/proxy` — Tool to perform stealth scraping via ScrapingBee's Stealth Proxy mode. Use when you encounter anti-bot measures requiring undetectable requests.
  - body: { url: string, wait?: integer, device?: string, cookies?: string, js_render?: boolean, country_code?: string, extract_rules?: string, premium_proxy?: boolean, stealth_proxy?: boolean, block_resources?: boolean, forward_headers?: boolean, return_page_source?: boolean }
- `POST https://api.mcp.ai/api/scrapingbee/usage/stats` — Tool to retrieve usage statistics for your ScrapingBee account. Use when you need to monitor remaining credits and request count.

## Example prompts
- "What can I do in Scrapingbee?"
- "Show me a summary of my Scrapingbee account"

## More
- Page: https://mcp.ai/scrapingbee
- Agent spec (llms.txt): https://mcp.ai/scrapingbee/llms.txt
- Postman collection: https://mcp.ai/scrapingbee/postman.json
