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:

PackageVersionWhat it adds
OpenClaw plugin @ai-mrscraper/openclaw-mrscraper0.5.113 native tools, plus MrScraper as a web_search provider and a web_fetch fallback
Skill mrscraper1.4.1Instructions 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

Install the plugin

Install from ClawHub

openclaw plugins install clawhub:@ai-mrscraper/openclaw-mrscraper

Review 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, and timeoutSeconds, how long to wait for a search (default 120).
  • webFetch: timeoutSeconds (the page timeout, 1 to 330), geoCode, and blockResources, used by mrscraper_fetch_html and the web_fetch fallback when a fetch sets none.
  • platform: timeoutSeconds and proxyCountry for 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

ToolServiceDescription
mrscraper_fetch_htmlScrape HTMLRetrieve the raw HTML of a page. Browser rendering is optional.
mrscraper_scrape_markdownScrape MarkdownRetrieve a page as clean Markdown. Browser rendering is optional.
mrscraper_get_screenshotGet ScreenshotCapture a base64 PNG screenshot of the full page, the first viewport, or a custom viewport. Browser rendering is always enabled.
mrscraper_scrape_brandScrape BrandExtract a website's colors, typography, logos, and social links as JSON.
mrscraper_scrape_jsonScrape JSONExtract structured JSON from a page using a natural-language prompt.
mrscraper_web_searchWeb SearchSearch the web and return ranked results with titles, URLs, descriptions, and sources.
mrscraper_scrapeCreate AI ScraperStart an AI scraper from a URL and a natural-language request.
mrscraper_rerun_ai_scraperRerun AI ScraperRerun a saved AI scraper on one URL.
mrscraper_bulk_rerun_ai_scraperBulk Rerun AI ScraperRerun a saved AI scraper on multiple URLs.
mrscraper_rerun_manual_scraperRerun Manual ScraperRerun a saved manual scraper on one URL.
mrscraper_bulk_rerun_manual_scraperBulk Rerun Manual ScraperRerun a saved manual scraper on multiple URLs.
mrscraper_get_all_resultsFetch ResultsList stored results.
mrscraper_get_result_by_idFetch Result by IDRetrieve 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/mrscraper

Create a MrScraper API token

  1. Open the MrScraper dashboard.
  2. Click your user profile in the top-right corner.
  3. Select API Tokens.
  4. Click New Token.
  5. Enter a name and an expiration date.
  6. 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:

APIBase URLPurpose
Scraper APIhttps://api.mrscraper.comScrape HTML, Scrape Markdown, Get Screenshot, Scrape Brand, Scrape JSON, and Web Search
Platform APIhttps://api.app.mrscraper.comCreate, 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.

ServiceInputs, in order (default)Query fields, in order
Scrape HTMLurl, browserRendering, timeout (300), warmStart (false), blockResources (false), waitForSelector, geoCode, maxAge (0), maxRetries, screenshot (false), tokenCap, cookiesurl, html=true, markdown=false, [browserRendering], timeout, warmStart, blockResources, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries], screenshot
Scrape Markdownurl, browserRendering, timeout (300), warmStart (false), blockResources (false), waitForSelector, geoCode, maxAge (0), maxRetries, tokenCap, cookiesurl, markdown=true, html=false, screenshot=false, [browserRendering], timeout, warmStart, blockResources, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries]
Get Screenshoturl, screenshot (full), timeout (300), waitForSelector, geoCode, maxAge (0), maxRetries, tokenCap, cookiesurl, screenshot, html=false, markdown=false, browserRendering=true, timeout, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries]
Scrape Brandurlaction=brand-scraping, url, bundle=none
Scrape JSONurl, prompt ("Extract all data as complete as possible."), html (true), browserRendering, timeout (300), warmStart (false), blockResources (false), waitForSelector, geoCode, maxAge (0), maxRetries, screenshot (false), tokenCapurl, prompt, agent=general, html, [browserRendering], timeout, warmStart, blockResources, [waitForSelector], [geoCode], saveResult=true, [tokenCap], maxAge, [maxRetries], screenshot
Web Searchquery, 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

InputTypeDescription
urlstring, requiredAbsolute HTTP or HTTPS URL of the page to process.
browserRenderingbooleanWhether 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.
timeoutinteger, 1–330, default 300Maximum seconds to wait for the page to fully load before the request times out. Increase for slow or complex pages.
warmStartboolean, default falseWarm up session before going directly to the target URL.
blockResourcesboolean, default falseBlock images, fonts, and stylesheets from loading. Speeds up scraping and reduces bandwidth usage.
waitForSelectorstring, 1–500 charactersPause 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.
geoCodestring, 2 lettersTwo-letter country code to load the page from, sent in lowercase.
maxAgeinteger, 0–604800000 milliseconds, default 0Return 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.
maxRetriesinteger, 0 or moreMaximum number of retries, as a nonnegative integer. Omit this parameter for no limit.
screenshot (Scrape HTML)boolean, default falseCapture a screenshot too (forces browser rendering). Set to true to include a screenshot, or false (default) for none.
screenshot (Get Screenshot)string, default fullfull (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 falseWhether to include a base64 screenshot in the response.
tokenCapinteger, 0 or moreMaximum 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.
cookiesstringCookies 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 trueWhether to include the page HTML in the response.
query (Web Search)string, 1–1000 characters, requiredSearch query text, trimmed before sending, containing 1 to 1000 characters.
country (Web Search)string, 2 lettersTwo-letter country code to search from, sent in lowercase.
numResults (Web Search)integer, 10–100, default 10Number 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

ServiceResponse
Scrape HTMLThe page HTML, or JSON with html and screenshot when screenshot is true
Scrape MarkdownThe page as Markdown
Get ScreenshotJSON with the base64 screenshot and the page html
Scrape BrandJSON with the brand in data.brand
Scrape JSONJSON with data, plus html unless html is false and screenshot when it is true
Web SearchJSON 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"
  }'
AgentDescription
generalStandard pages such as product details, articles, and profiles. This is the default.
listingProduct listings, job boards, search results, and other paginated collections.
mapWebsite 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:

ParameterDescription
maxDepthHow many levels of links to follow. A value of 1–2 is recommended.
maxPagesMaximum number of pages to crawl.
limitMaximum number of records to extract.
includePatternsRegex patterns for URLs to include. Separate multiple patterns with ||.
excludePatternsRegex 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:

StatusMeaning
400Invalid request payload.
401Missing or invalid API token.
404Resource not found.
429Rate limit exceeded.
500Internal 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.

On this page