ClawHub
Add MrScraper to OpenClaw from ClawHub: a plugin with 13 native tools plus web_search and web_fetch providers, and a skill for direct API use.
ClawHub Integration
ClawHub is the registry of skills and plugins for OpenClaw agents. MrScraper publishes two packages there, both owned by @ai-mrscraper:
| Package | Version | What it adds |
|---|---|---|
OpenClaw plugin @ai-mrscraper/openclaw-mrscraper | 0.5.1 | 13 native tools, plus MrScraper as a web_search provider and a web_fetch fallback |
Skill mrscraper | 1.4.1 | Instructions that let the agent call the MrScraper API directly over HTTPS |
Both cover the six Scraper API services (Scrape HTML, Scrape Markdown, Get Screenshot, Scrape Brand, Scrape JSON, and Web Search) and the platform endpoints for AI scrapers, reruns, and results.
Prerequisites
- An OpenClaw agent with the
openclawCLI available. - A MrScraper API token.
Install the plugin
Install from ClawHub
openclaw plugins install clawhub:@ai-mrscraper/openclaw-mrscraperReview and accept the plugin's capabilities when prompted: 13 tools and the web_search and web_fetch providers.
Add your API token
Set MRSCRAPER_API_TOKEN in the Gateway environment, or store the token in plugins.entries.mrscraper.config.apiToken.
Select MrScraper as a provider (optional)
{
plugins: { entries: { mrscraper: { enabled: true } } },
tools: {
web: {
search: { provider: "mrscraper" },
fetch: { provider: "mrscraper" },
},
},
}Optional plugin settings:
webSearch:country, used when a search sets none, andtimeoutSeconds, how long to wait for a search (default 120).webFetch:timeoutSeconds(the pagetimeout, 1 to 330),geoCode, andblockResources, used bymrscraper_fetch_htmland theweb_fetchfallback when a fetch sets none.platform:timeoutSecondsandproxyCountryfor the AI scraper, rerun, and result tools.
When neither a call nor these settings set a value, requests send each input's default, such as timeout=300 and blockResources=false, and leave out inputs without one, such as geoCode and country.
Plugin tools
| Tool | Service | Description |
|---|---|---|
mrscraper_fetch_html | Scrape HTML | Retrieve the raw HTML of a page. Browser rendering is optional. |
mrscraper_scrape_markdown | Scrape Markdown | Retrieve a page as clean Markdown. Browser rendering is optional. |
mrscraper_get_screenshot | Get Screenshot | Capture a base64 PNG screenshot of the full page, the first viewport, or a custom viewport. Browser rendering is always enabled. |
mrscraper_scrape_brand | Scrape Brand | Extract a website's colors, typography, logos, and social links as JSON. |
mrscraper_scrape_json | Scrape JSON | Extract structured JSON from a page using a natural-language prompt. |
mrscraper_web_search | Web Search | Search the web and return ranked results with titles, URLs, descriptions, and sources. |
mrscraper_scrape | Create AI Scraper | Start an AI scraper from a URL and a natural-language request. |
mrscraper_rerun_ai_scraper | Rerun AI Scraper | Rerun a saved AI scraper on one URL. |
mrscraper_bulk_rerun_ai_scraper | Bulk Rerun AI Scraper | Rerun a saved AI scraper on multiple URLs. |
mrscraper_rerun_manual_scraper | Rerun Manual Scraper | Rerun a saved manual scraper on one URL. |
mrscraper_bulk_rerun_manual_scraper | Bulk Rerun Manual Scraper | Rerun a saved manual scraper on multiple URLs. |
mrscraper_get_all_results | Fetch Results | List stored results. |
mrscraper_get_result_by_id | Fetch Result by ID | Retrieve one stored result. |
The six Scraper API tools take their service's inputs, in the order listed under Scraper API services, and send the same requests. mrscraper_fetch_html also takes maxChars, which limits the characters returned to the agent. Screenshots come back to the agent as images. Scraped content, brand data, JSON results, and platform responses come back wrapped as untrusted content.
The web_search provider follows OpenClaw's web_search contract (query, count from 1 to 10, country): it requests MrScraper's default of 10 results and keeps the first count. The web_fetch provider receives url, extractMode, and maxChars from OpenClaw and takes its page settings from webFetch. In non-sandboxed sessions, OpenClaw calls it when its own extraction fails.
Install the skill
Install the skill
openclaw skills install @ai-mrscraper/mrscraperCreate a MrScraper API token
- Open the MrScraper dashboard.
- Click your user profile in the top-right corner.
- Select API Tokens.
- Click New Token.
- Enter a name and an expiration date.
- Click Create and copy the token.
Store the token
Expose the token to your agent as the MRSCRAPER_API_TOKEN environment variable.
export MRSCRAPER_API_TOKEN="your-token-here"Keep your token secret
Never expose your API token in client-side code, logs, or commits. Store it in an environment variable or a server-side secret manager.
The skill sends the token in the x-api-token header on every request. It uses two hosts:
| API | Base URL | Purpose |
|---|---|---|
| Scraper API | https://api.mrscraper.com | Scrape HTML, Scrape Markdown, Get Screenshot, Scrape Brand, Scrape JSON, and Web Search |
| Platform API | https://api.app.mrscraper.com | Create, rerun, and read scrapers and results |
Scraper API services
Every service is a GET to https://api.mrscraper.com/. Its settings go in the query string as URL-encoded parameters, in the order of the last column, except cookies: it goes in a standard Cookie request header, never in the URL. An input with a default is always sent, with its default when unset. An input without a default is sent only when set, so the API default applies; the last column shows these in brackets. Booleans are sent as true or false, country codes in lowercase, and the search query trimmed.
| Service | Inputs, in order (default) | Query fields, in order |
|---|---|---|
| Scrape HTML | url, browserRendering, timeout (300), warmStart (false), blockResources (false), waitForSelector, geoCode, maxAge (0), maxRetries, screenshot (false), tokenCap, cookies | url, html=true, markdown=false, [browserRendering], timeout, warmStart, blockResources, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries], screenshot |
| Scrape Markdown | url, browserRendering, timeout (300), warmStart (false), blockResources (false), waitForSelector, geoCode, maxAge (0), maxRetries, tokenCap, cookies | url, markdown=true, html=false, screenshot=false, [browserRendering], timeout, warmStart, blockResources, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries] |
| Get Screenshot | url, screenshot (full), timeout (300), waitForSelector, geoCode, maxAge (0), maxRetries, tokenCap, cookies | url, screenshot, html=false, markdown=false, browserRendering=true, timeout, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries] |
| Scrape Brand | url | action=brand-scraping, url, bundle=none |
| Scrape JSON | url, prompt ("Extract all data as complete as possible."), html (true), browserRendering, timeout (300), warmStart (false), blockResources (false), waitForSelector, geoCode, maxAge (0), maxRetries, screenshot (false), tokenCap | url, prompt, agent=general, html, [browserRendering], timeout, warmStart, blockResources, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries], screenshot |
| Web Search | query, country, numResults (10) | action=websearch, query, [country], numResults |
browserRendering is sent as true whenever waitForSelector is set or Scrape HTML's screenshot is true, even if false was chosen; leaving it out is not the same as false. saveResult=true saves every page to your MrScraper results. A page request can take up to its timeout (300 seconds by default), so allow 30 seconds more for the response. Scrape Brand and Web Search can take up to 120 seconds. Give cookies as name=value pairs separated by semicolons, on one line and in printable ASCII (URL-encode other characters).
Inputs
| Input | Type | Description |
|---|---|---|
url | string, required | Absolute HTTP or HTTPS URL of the page to process. |
browserRendering | boolean | Whether to load the page in a browser: true enables it, false disables it unless required. Omit to try without a browser first and switch automatically if blocked. waitForSelector forces true. |
timeout | integer, 1–330, default 300 | Maximum seconds to wait for the page to fully load before the request times out. Increase for slow or complex pages. |
warmStart | boolean, default false | Warm up session before going directly to the target URL. |
blockResources | boolean, default false | Block images, fonts, and stylesheets from loading. Speeds up scraping and reduces bandwidth usage. |
waitForSelector | string, 1–500 characters | Pause until a specific CSS selector or text appears on the page. Useful for content that loads asynchronously after the initial page load. Requires a rendered page. Setting this parameter automatically forces browserRendering to true. |
geoCode | string, 2 letters | Two-letter country code to load the page from, sent in lowercase. |
maxAge | integer, 0–604800000 milliseconds, default 0 | Return a cached result of the same request when it is newer than the selected age. Set to 0 to always fetch fresh results. A cached result costs the same tokens as the original scrape. |
maxRetries | integer, 0 or more | Maximum number of retries, as a nonnegative integer. Omit this parameter for no limit. |
screenshot (Scrape HTML) | boolean, default false | Capture a screenshot too (forces browser rendering). Set to true to include a screenshot, or false (default) for none. |
screenshot (Get Screenshot) | string, default full | full (default) captures the entire scroll height, top captures the first viewport, or a custom size WIDTHxHEIGHT with optional -ZOOM, e.g. 1280x800 or 1920x1080-75. Width/height 100 to 3840, zoom 25 to 300. |
screenshot (Scrape JSON) | boolean, default false | Whether to include a base64 screenshot in the response. |
tokenCap | integer, 0 or more | Maximum total tokens the scrape and its retries can use. Automatic retries are bounded by this cap, so the total tokens for a single run stay at or below the value you set. Omit for no limit. |
cookies | string | Cookies to send to the target site, as name=value pairs separated by semicolons (URL-encoded), for pages behind a login session. The gateway sends them as the Cookie header and never forwards the parameter itself. A standard Cookie request header works too; this parameter wins when both are sent. Requests with cookies skip the result cache. |
prompt (Scrape JSON) | string, default "Extract all data as complete as possible." | Describe the data shape you want back (e.g. fields like title, price, rating). This prompt only parses the scraped content. It cannot instruct the scraper flow itself. |
html (Scrape JSON) | boolean, default true | Whether to include the page HTML in the response. |
query (Web Search) | string, 1–1000 characters, required | Search query text, trimmed before sending, containing 1 to 1000 characters. |
country (Web Search) | string, 2 letters | Two-letter country code to search from, sent in lowercase. |
numResults (Web Search) | integer, 10–100, default 10 | Number of search results to request, as an integer from 10 to 100. Fewer results may be returned. |
Examples
Scrape HTML:
curl 'https://api.mrscraper.com/?url=https%3A%2F%2Fexample.com&html=true&markdown=false&timeout=300&warmStart=false&blockResources=false&saveResult=true&maxAge=0&screenshot=false' \
-H "x-api-token: <MRSCRAPER_API_TOKEN>"Scrape HTML with a token cap and your own session cookies, in the Cookie header:
curl 'https://api.mrscraper.com/?url=https%3A%2F%2Fhttpbin.org%2Fcookies&html=true&markdown=false&timeout=300&warmStart=false&blockResources=false&saveResult=true&tokenCap=100&maxAge=0&screenshot=false' \
-H "x-api-token: <MRSCRAPER_API_TOKEN>" \
-H 'Cookie: session=abc123; theme=dark'Get Screenshot of the first viewport:
curl 'https://api.mrscraper.com/?url=https%3A%2F%2Fexample.com&screenshot=top&html=false&markdown=false&browserRendering=true&timeout=300&saveResult=true&maxAge=0' \
-H "x-api-token: <MRSCRAPER_API_TOKEN>"Scrape Brand:
curl 'https://api.mrscraper.com/?action=brand-scraping&url=https%3A%2F%2Fmrscraper.com&bundle=none' \
-H "x-api-token: <MRSCRAPER_API_TOKEN>"Scrape JSON:
curl 'https://api.mrscraper.com/?url=https%3A%2F%2Fbooks.toscrape.com%2Fcatalogue%2Fa-light-in-the-attic_1000%2Findex.html&prompt=Extract+title%2C+price%2C+and+rating&agent=general&html=true&timeout=300&warmStart=false&blockResources=false&saveResult=true&maxAge=0&screenshot=false' \
-H "x-api-token: <MRSCRAPER_API_TOKEN>"When a Scrape JSON request URL would exceed about 8,000 characters, for example with a long prompt, send it as a POST to https://api.mrscraper.com/ with url, prompt, and agent in a JSON body and the other fields in the query string.
Web Search:
curl 'https://api.mrscraper.com/?action=websearch&query=web+scraping+api&numResults=10' \
-H "x-api-token: <MRSCRAPER_API_TOKEN>"Responses
| Service | Response |
|---|---|
| Scrape HTML | The page HTML, or JSON with html and screenshot when screenshot is true |
| Scrape Markdown | The page as Markdown |
| Get Screenshot | JSON with the base64 screenshot and the page html |
| Scrape Brand | JSON with the brand in data.brand |
| Scrape JSON | JSON with data, plus html unless html is false and screenshot when it is true |
| Web Search | JSON with the results in data, ordered by rank |
Platform API
The platform endpoints use https://api.app.mrscraper.com and a JSON body.
Create AI Scraper
Creates a scraper from a natural-language instruction and runs it. The body takes url, message, agent, and an optional proxyCountry, the country to route the scraper through. The Scraper API services set the country with geoCode instead.
curl -X POST "https://api.app.mrscraper.com/api/v1/scrapers-ai" \
-H "x-api-token: <MRSCRAPER_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"message": "Extract title, price, stocks, and rating",
"agent": "general"
}'| Agent | Description |
|---|---|
general | Standard pages such as product details, articles, and profiles. This is the default. |
listing | Product listings, job boards, search results, and other paginated collections. |
map | Website crawling that follows links to discover pages. |
Rerun AI Scraper
Applies an existing scraper configuration to a new URL.
curl -X POST "https://api.app.mrscraper.com/api/v1/scrapers-ai-rerun" \
-H "x-api-token: <MRSCRAPER_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"scraperId": "6695bf87-aaa6-46b0-b1ee-88586b222b0b",
"url": "https://books.toscrape.com/"
}'Bulk Rerun AI Scraper
Runs one scraper configuration across multiple URLs in a single request.
curl -X POST "https://api.app.mrscraper.com/api/v1/scrapers-ai-rerun/bulk" \
-H "x-api-token: <MRSCRAPER_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"scraperId": "6695bf87-aaa6-46b0-b1ee-88586b222b0b",
"urls": [
"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html"
]
}'Manual Scraper Rerun
Executes a browser workflow built from selectors, for cases where you want explicit extraction rules instead of AI. Bulk reruns use /api/v1/scrapers-manual-rerun/bulk with scraperId and urls.
curl -X POST "https://api.app.mrscraper.com/api/v1/scrapers-manual-rerun" \
-H "x-api-token: <MRSCRAPER_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"scraperId": "6695bf87-aaa6-46b0-b1ee-88586b222b0b",
"url": "https://books.toscrape.com/",
"workflow": [
{
"type": "extract",
"data": {
"extraction_type": "text",
"name": "book",
"selector": "h3 a"
}
}
]
}'Fetch Results
Returns paginated scrape results.
curl -X GET "https://api.app.mrscraper.com/api/v1/results?sortField=updatedAt&sortOrder=DESC&page=1&pageSize=10" \
-H "x-api-token: <MRSCRAPER_API_TOKEN>"Fetch Result by ID
Returns the detail of a single result.
curl -X GET "https://api.app.mrscraper.com/api/v1/results/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
-H "x-api-token: <MRSCRAPER_API_TOKEN>"Map Agent Configuration
When you use the map agent, these parameters control how the crawl behaves:
| Parameter | Description |
|---|---|
maxDepth | How many levels of links to follow. A value of 1–2 is recommended. |
maxPages | Maximum number of pages to crawl. |
limit | Maximum number of records to extract. |
includePatterns | Regex patterns for URLs to include. Separate multiple patterns with ||. |
excludePatterns | Regex patterns for URLs to exclude. Separate multiple patterns with ||. |
Keep crawls bounded
Set maxDepth to 1 or 2 and cap maxPages. Depth grows the crawl exponentially, and an unbounded crawl burns tokens fast.
Error Handling
The API uses standard HTTP status codes:
| Status | Meaning |
|---|---|
400 | Invalid request payload. |
401 | Missing or invalid API token. |
404 | Resource not found. |
429 | Rate limit exceeded. |
500 | Internal error. |
Retry 429 responses with exponential backoff.
Data Scope
Data is transmitted only to MrScraper servers. Responses contain the extracted page content and its metadata, and page results are saved to your MrScraper account. Session cookies are sent only when you provide them for a request, in a Cookie request header to api.mrscraper.com and never in a URL; MrScraper passes them to the target site as its Cookie header. Never expose your API token in logs or commits.
Zapier
Connect MrScraper to Zapier to scrape pages as HTML, Markdown, screenshots, brand data, or JSON, search the web, and check account status from no-code Zaps.
Hermes Agent
Install the MrScraper plugin for Hermes Agent to scrape pages as HTML, Markdown, screenshots, brand data, or JSON, search the web, and check account status.