# WebScraping.AI — how to use (mcp.ai)

Connect your WebScraping.AI account and use 7 tools for web scraping straight from your AI agent. Connect with your own API key. WebScraping.AI provides an API for web scraping with features like Chrome JS rendering, rotating proxies, and HTML parsing.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_webscraping_ai?ms=1787291340000`
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. `webscraping_ai_account_info`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/webscraping_ai`
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/webscraping_ai/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/webscraping_ai/account/info` — Tool to retrieve account API call quota and usage. Use when checking remaining requests and subscription details.
- `POST https://api.mcp.ai/api/webscraping_ai/ask/question` — Tool to get an answer to a question about a given web page using LLM. Use when you need AI-powered analysis or extraction from a web page. Proxies and Chromium JavaScript rendering are used for page r
  - body: { js?: boolean, url: string, proxy?: string, device?: string, format?: string, country?: string, headers?: object, timeout?: integer, question: string, wait_for?: string, js_script?: string, js_timeout?: integer, custom_proxy?: string, error_on_404?: boolean, error_on_redirect?: boolean }
- `POST https://api.mcp.ai/api/webscraping_ai/extract/fields` — Tool to extract structured data fields from a web page using AI. Returns extracted fields as JSON. Uses proxies and Chromium JavaScript rendering for page retrieval and processing.
  - body: { url: string, fields: object, unknown?: string }
- `POST https://api.mcp.ai/api/webscraping_ai/get/rendered/html` — Tool to retrieve fully rendered HTML of a webpage. Use when JS-generated content must be included.
  - body: { js?: string, url: string, wait?: integer, device?: string, locale?: string, cookies?: string, headers?: object, referer?: string, timeout?: integer, proxy_type?: string, user_agent?: string, disable_images?: boolean }
- `POST https://api.mcp.ai/api/webscraping_ai/get/selected/html` — Tool to extract HTML from specific page elements using CSS selectors. Use when you need HTML from a particular section rather than the entire page.
  - body: { js?: boolean, url: string, proxy?: string, device?: string, country?: string, headers?: object, timeout?: integer, selector?: string, wait_for?: string, js_script?: string, js_timeout?: integer, custom_proxy?: string, error_on_404?: boolean, error_on_redirect?: boolean }
- `POST https://api.mcp.ai/api/webscraping_ai/get/selected/multiple` — Tool to extract HTML of multiple page areas by URL and CSS selectors. Use when you need to extract multiple elements without HTML parsing on your side.
  - body: { js?: boolean, url: string, proxy?: string, country?: string, timeout?: integer, selectors?: string[], js_timeout?: integer }
- `POST https://api.mcp.ai/api/webscraping_ai/get/text` — Tool to retrieve raw text content from a specified web page. Returns unstructured plain text — markdown formatting (code fences, lists, headings) is not preserved. Use when you need plain text extract
  - body: { url: string, proxy?: string, locale?: string, session?: string, timeout?: integer, render_js?: boolean }

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

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