# Scrapfly — how to use (mcp.ai)

Connect your Scrapfly account and use 12 tools for web scraping straight from your AI agent. Connect with your own API key. Scrapfly is a web scraping API that enables developers to extract data from websites efficiently, offering features like JavaScript rendering, anti-bot protection bypass, and proxy rotation.

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

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

### Endpoints
- `POST https://api.mcp.ai/api/scrapfly/capture/screenshot` — Tool to capture a full-page or viewport screenshot of a website. Use when you need to take a screenshot with options like JS rendering, custom resolution, or accessibility testing. Returns the screens
  - body: { js?: string, url: string, cache?: boolean, format?: string, capture?: string, country?: string, options?: string, timeout?: integer, cache_ttl?: integer, resolution?: string, auto_scroll?: boolean, cache_clear?: boolean, rendering_wait?: integer, wait_for_selector?: string }
- `POST https://api.mcp.ai/api/scrapfly/capture/screenshot/head` — Tool to capture screenshot metadata without downloading the image body. Use this for async screenshot workflows where you need the URL to retrieve the image later. Returns the screenshot URL in respon
  - body: { js?: string, url: string, cache?: boolean, format?: string, capture?: string, country?: string, options?: string, timeout?: integer, cache_ttl?: integer, resolution?: string, auto_scroll?: boolean, cache_clear?: boolean, rendering_wait?: integer, vision_deficiency?: string, wait_for_selector?: string }
- `POST https://api.mcp.ai/api/scrapfly/create/crawler` — Tool to create a new web crawler to recursively crawl an entire website. Returns a crawler UUID for tracking progress. Use when you need to crawl multiple pages from a website with configurable limits
  - body: { asp?: boolean, url: string, delay?: integer, max_depth?: integer, render_js?: boolean, page_limit?: integer, concurrency?: integer, cost_budget?: number, exclude_paths?: string[], content_formats?: string[], include_only_paths?: string[], follow_external_links?: boolean }
- `POST https://api.mcp.ai/api/scrapfly/extract/data` — Tool to extract structured data from HTML or other content using AI models, LLM prompts, or custom templates. Use when you need to parse web pages or documents into structured JSON data. Supports pred
  - body: { url?: string, charset?: string, content: string, content_type: string, webhook_name?: string, extraction_model?: string, extraction_prompt?: string, extraction_template?: string }
- `POST https://api.mcp.ai/api/scrapfly/get/account/info` — Tool to retrieve Scrapfly account information. Use after authenticating to get API credit balance and usage stats. Returns comprehensive account data including subscription plan, usage statistics, bil
- `POST https://api.mcp.ai/api/scrapfly/get/crawler/artifact` — Tool to download crawler artifact files in WARC or HAR format. Use when you need to retrieve the complete crawl results as an archive file. WARC format is recommended for large crawls as it includes g
  - body: { type: string, crawler_uuid: string }
- `POST https://api.mcp.ai/api/scrapfly/get/crawler/contents` — Tool to retrieve extracted content from crawled pages. Supports multiple output formats including markdown, text, HTML, and JSON. Use when you need to access the actual content extracted during a craw
  - body: { url?: string, limit?: integer, plain?: boolean, offset?: integer, formats?: string, crawler_uuid: string }
- `POST https://api.mcp.ai/api/scrapfly/get/crawler/status` — Tool to get the current status of a crawler including progress, pages crawled, and completion state. Use for polling workflow to monitor crawl progress.
  - body: { crawler_uuid: string }
- `POST https://api.mcp.ai/api/scrapfly/get/crawler/urls` — Tool to retrieve the list of discovered and crawled URLs from a crawler. Use when you need to get all URLs found during a crawl or filter by status to analyze failed URLs with error codes. Supports pa
  - body: { page?: integer, status?: string, per_page?: integer, crawler_uuid: string }
- `POST https://api.mcp.ai/api/scrapfly/scrape` — Tool to perform a web scraping request. Use when you need to fetch a page with custom configuration like JS rendering, proxies, and extraction.
  - body: { asp?: boolean, url: string, body?: string, tags?: string[], cache?: boolean, retry?: integer, method?: string, country?: string, headers?: object, session?: string, timeout?: integer, render_js?: boolean, extract_rules?: object }
- `POST https://api.mcp.ai/api/scrapfly/scrape/post` — Tool to scrape web pages using POST method to send data in the request body. Use when you need to scrape endpoints that require POST requests, such as form submissions or APIs that expect data payload
  - body: { asp?: boolean, url: string, body: object, tags?: string[], cache?: boolean, retry?: integer, country?: string, headers?: object, session?: string, timeout?: integer, render_js?: boolean, extract_rules?: object }
- `POST https://api.mcp.ai/api/scrapfly/scrape/with/put` — Tool to scrape web pages using PUT method with body payload. Use when the target API requires PUT requests with data in the request body. Forwards PUT request with custom body to the target URL. If no
  - body: { asp?: boolean, url: string, body: string, tags?: string[], cache?: boolean, retry?: integer, country?: string, headers?: object, session?: string, timeout?: integer, render_js?: boolean, extract_rules?: object }

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

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