n8n
Learn how to connect MrScraper to n8n, the open-source workflow automation tool, and retrieve pages, extract brand details and structured JSON, search the web, and check account status from your workflows.
n8n Integration
n8n is an open-source workflow automation tool that lets teams connect apps, services, and APIs using a visual, node-based interface. Similar to Zapier or Make, n8n automates repetitive tasks and builds workflows without custom code.
Workflows in n8n run automatically based on triggers such as schedules, webhooks, or events from connected tools.
Overview
The n8n-nodes-mrscraper community node brings the seven MrScraper services into n8n. Its operations share their descriptions, parameter meanings, and defaults with the CLI, the MCP server, and the SDKs. The node organizes them into three resources, stores authentication in credentials, and returns results as n8n items.
| Resource | Operation | Description |
|---|---|---|
| Scraper API | Scrape HTML | Retrieve the raw HTML of a page. Browser rendering is optional. |
| Scraper API | Scrape Markdown | Retrieve a page as clean Markdown. Browser rendering is optional. |
| Scraper API | Get Screenshot | Capture a Base64 PNG screenshot of the full page, first viewport, or custom viewport. Browser rendering is always enabled. |
| Scraper API | Scrape Brand | Extract a website's colors, typography, logos, and social links as JSON. |
| Scraper API | Scrape JSON | Extract structured JSON from a page using a natural-language prompt and optional schema. |
| Discovery | Web Search | Search the web and return ranked results with titles, URLs, descriptions, and sources. |
| Account | Get Status | Return the raw account status API response without summarizing, redacting body fields, or adding calculated fields. |
Package Information
This page documents version 6.0.0. Version 6.0.0 renames Get Account Info to Get Status, moves Geo Code to the main configuration, adds Max Age and custom screenshot viewports, and always saves page results to your dashboard. See Migrating from earlier versions. See n8n-nodes-mrscraper on npm for the latest release.
Use MrScraper as an AI Agent tool
The MrScraper node is tool-enabled. You can attach it to an n8n AI Agent node and let the model call MrScraper operations on its own, instead of wiring them into a fixed workflow path.
Prerequisites
Before you start, ensure you have:
- A MrScraper API token
- Access to an n8n instance (self-hosted or cloud)
Installation
Install n8n-nodes-mrscraper through Settings > Community Nodes in your n8n instance. See the community node installation guide for other installation methods and requirements.
Authentication
- Obtain an API token from the MrScraper app.
- Create a MrScraper API credential in n8n.
- Paste the token into API Token and select that credential in your MrScraper node.
The saved credential supplies Authorization: Bearer <token> and x-api-token headers. Tokens are not sent in the request URL. Store the token in the credential rather than in workflow fields or Code nodes.
For more information on generating API tokens, see the Generate Token guide.
Quick Start
Add the MrScraper Node
- Open the n8n workflow editor and add a Manual Trigger
- Click the + button, search for MrScraper, and connect the MrScraper node to the trigger
- In Credential to connect with, select your MrScraper API credential
Configure Scrape HTML
- Set Resource to Scraper API and Operation to Scrape HTML
- Enter
https://example.comin URL - Leave Browser Rendering at None, Warm Start off, and Geo Code blank
Test and Execute
- Click Test step
- Read the HTML using
{{ $json.html }}in a following node - Connect the output to other nodes in your workflow
Replace the example target with your page. Live scraping and search calls use tokens from your plan. Response examples below show selected fields with placeholder values; actual responses can include additional fields.
Shared Page Controls
Scrape HTML, Scrape Markdown, Get Screenshot, and Scrape JSON share the following controls. Scrape Brand, Web Search, and Get Status have separate inputs described below.
Fields marked Main configuration appear directly in the node. Fields marked Options are added through Options > Add Option. Defaults describe what the node sends.
| Field | Location | HTTP field | Type | Default | Description |
|---|---|---|---|---|---|
| URL | Main configuration | url | String | Required | Absolute HTTP or HTTPS URL of the page to process, such as https://example.com. |
| Geo Code | Main configuration | geoCode | String | Blank; omitted | Two-letter country code to load the page from, sent in lowercase. For example, US, GB, or ID becomes us, gb, or id. Leave blank to use the API default location, the United States. |
| Timeout | Options | timeout | Integer | 300 seconds | Maximum seconds to wait for the scrape, from 1 to 330. The HTTP request allows 30 additional seconds: a value of 120 gives the transport 150 seconds. |
| Wait for Selector | Options | waitForSelector | String | Blank; omitted | CSS selector or text to wait for on the page before returning the result, up to 500 characters. For example, .product-list waits for the product list. |
| Max Age | Options | maxAge | Integer | 0 milliseconds | Return a cached result of the same request when it is newer than this age. Range: 0 to 604800000 milliseconds (seven days). 0 always scrapes fresh; 86400000 accepts results up to one day old. A cached result costs the same tokens as the original scrape. |
| Max Retries | Options | maxRetries | Integer | Omitted; 3 when added | Maximum retries, as a nonnegative integer. Leave the option absent for no limit. Adding it inserts 3; change that value as needed. 0 disables retries. |
Every page request sends saveResult=true, so results are always saved to your dashboard. There is no Save Result toggle.
Loading controls
Scrape HTML, Scrape Markdown, and Scrape JSON also accept these controls. Get Screenshot always sends browserRendering=true and has no Browser Rendering, Warm Start, or Block Resources input.
| Field | Location | HTTP field | Type | Default | Description |
|---|---|---|---|---|---|
| Browser Rendering | Main configuration | browserRendering | True / False / None | None | Whether to load the page in a browser: True always does and False never does. None leaves the HTTP field out, so the API loads the page without a browser first and switches to a browser if the request is blocked. |
| Warm Start | Main configuration | warmStart | Boolean toggle | Off (false) | Whether to open the site's home page first to warm the session before loading the target URL. |
| Block Resources | Options | blockResources | Boolean toggle | Off (false) | Whether to block images, fonts, and stylesheets while loading the page. This can affect the appearance of captured screenshots. |
Scraper API
Select Resource > Scraper API for the five operations below. All of them call https://api.mrscraper.com/.
Scrape HTML
Retrieve the raw HTML of a page. Browser rendering is optional.
Accepts shared page controls, loading controls, and:
| Field | Location | HTTP field | Type | Default | Description |
|---|---|---|---|---|---|
| Screenshot | Options | screenshot | Boolean toggle | Off (false) | Whether to include a Base64 screenshot in the response. This is a toggle, not a screenshot-area input. Browser Rendering follows its selected setting. |
The request uses GET with html=true, markdown=false, and saveResult=true.
Example configuration
| Field | Value |
|---|---|
| URL | https://example.com |
| Browser Rendering | True |
| Warm Start | On |
| Options > Wait for Selector | body |
| Options > Timeout | 120 |
| Options > Max Retries | 0 |
The node wraps the response body in html:
{
"html": "<html><body>Example page content...</body></html>"
}Use {{ $json.html }} in a following node, or connect an HTML node to extract elements. When you request a screenshot, inspect the output first: this operation reads the response as text and places the complete body in html, including a JSON response returned by the API.
Scrape Markdown
Retrieve a page as clean Markdown. Browser rendering is optional.
Accepts shared page controls, loading controls, and the same Screenshot toggle as Scrape HTML.
The request uses GET with markdown=true, html=false, and saveResult=true.
Example: choose Scrape Markdown, enter https://example.com, turn Warm Start on, and add Options > Max Age with 86400000 to accept a cached result up to one day old.
{
"markdown": "# Example page\n\nExample Markdown content..."
}Use {{ $json.markdown }} in a following node. The complete response body is read as text; inspect it before mapping fields when you request a screenshot.
Get Screenshot
Capture a Base64 PNG screenshot of the full page, first viewport, or custom viewport. Browser rendering is always enabled.
Accepts shared page controls and:
| Field | Location | HTTP field | Type | Default | Description |
|---|---|---|---|---|---|
| Screenshot Mode | Main configuration | screenshot | String | full | Area to capture: full for the entire scroll height, top for the first viewport, or WIDTHxHEIGHT[-ZOOM]. Width and height must be 100 to 3840 pixels; the optional zoom must be 25 to 300 percent, default 100. Examples: 1280x800, 1920x1080-75. |
The request uses GET with browserRendering=true, html=false, markdown=false, and saveResult=true. The API can still include HTML in its response.
Example: choose Get Screenshot, set URL to https://example.com, set Screenshot Mode to top, and add Options > Timeout with 120.
{
"html": "<html>...</html>",
"screenshot": "BASE64_PNG_DATA"
}Read {{ $json.screenshot }}. This is Base64 text, not an n8n binary attachment; convert it before passing it to a node that requires a file.
Scrape Brand
Extract a website's colors, typography, logos, and social links as JSON. Only URL is accepted; shared page and loading controls are not available.
The request uses GET with action=brand-scraping, bundle=none, and the URL. The action is fixed and is not an input field.
{
"data": {
"job_id": "JOB_ID",
"status": "succeeded",
"url": "https://example.com",
"final_url": "https://example.com",
"brand": {
"name": "Example brand",
"colors": { "background": "#ffffff", "text": "#222222" },
"typography": { "body": { "font_family": "Example font" } }
},
"error": null,
"bundle_url": null
},
"message": "Example response"
}Use {{ $json.data.brand }} for brand details and {{ $json.data.job_id }} for the job ID.
Scrape JSON
Extract structured JSON from a page using a natural-language prompt. Append a JSON schema to shape the output.
Accepts shared page controls, loading controls, and:
| Field | Location | HTTP field | Type | Default | Description |
|---|---|---|---|---|---|
| Prompt | Main configuration | prompt | String | Extract all data as complete as possible. | Non-empty instructions describing the data to extract. For example, Extract the product name, price, and availability. |
| Expected Output Schema | Main configuration | Appended to prompt | JSON | Empty | Optional valid JSON describing the expected output. The node appends Json Schema: and the serialized schema to Prompt; it does not send a separate schema parameter. Invalid JSON fails before the request. |
| Return HTML | Options | html | Boolean toggle | On (true) | Whether to include the page HTML alongside the extracted JSON. Turn it off to send false when only the extracted data is needed. |
| Screenshot | Options | screenshot | Boolean toggle | Off (false) | Whether to include a Base64 screenshot in the response. Browser Rendering follows its selected setting. |
The request sends agent=general and saveResult=true. It uses GET unless the encoded URL exceeds 8,000 characters, when it switches to POST with only url, prompt, and agent in the body. Page controls remain in the query.
Example configuration
| Field | Value |
|---|---|
| URL | https://example.com |
| Prompt | Extract the first two items with title and price. |
| Expected Output Schema | {"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"price":{"type":"string"}},"required":["title","price"]}} |
| Browser Rendering | True |
| Options > Return HTML | Off |
{
"success": true,
"data": [{ "title": "Example item", "price": "10.00" }],
"thread_id": "THREAD_ID",
"token_usage": 1,
"html": "",
"markdown": "",
"screenshot": "",
"status": "Results ready",
"error": "",
"runtime": 1.23,
"cookies": []
}Extracted results are in {{ $json.data }} and follow the requested schema. Use Split Out on data when it is an array and you need one n8n item per result. Response metadata can include thread_id, token_usage, status, error, runtime, and cookies.
Discovery
Web Search
Search the web and return ranked results with titles, URLs, descriptions, and sources. Select Resource > Discovery and Operation > Web Search.
| Field | HTTP field | Type | Default | Description |
|---|---|---|---|---|
| Search Query | query | String | Required | Search text, trimmed before sending, containing 1 to 1000 characters. |
| Country | country | String | Blank; omitted | Two-letter country code to search from, sent in lowercase. Leave blank to search from the United States. |
| Number of Results | numResults | Integer | 10 | Number of results to request, from 10 to 100. Fewer results may be returned. |
The request uses GET https://api.mrscraper.com/ with a fixed action=websearch. The transport timeout is fixed at 120 seconds.
Example: set Search Query to site:example.com documentation, Country to id, and Number of Results to 20.
{
"success": true,
"message": "Example response",
"data": [
{
"rank": 1,
"title": "Example result",
"url": "https://example.com",
"description": "Example result description.",
"source": "example.com"
}
],
"tokenUsage": 1
}To scrape each result, use Split Out on data, connect a second MrScraper node, choose Scrape HTML or Scrape Markdown, and map the resulting URL field into URL. Inspect the Split Out output to choose the correct expression.
Account
Get Status
Return the raw account status API response without summarizing, redacting body fields, or adding calculated fields. Select Resource > Account and Operation > Get Status; there are no operation-specific input fields.
The request uses GET https://api.app.mrscraper.com/api/v1/subscription-accounts.
{
"message": "Example response",
"data": {
"id": "ACCOUNT_ID",
"tokenLimit": 100000,
"tokenUsage": 2500,
"stripeStatus": "active",
"user": {
"name": "Example user",
"email": "user@example.com",
"isVerified": true
},
"subscriptionItem": { "name": "Example plan", "tokenLimit": 100000 },
"scraperAllowance": { "remaining": 97500, "plans": [{ "remaining": 97500 }] }
}
}Account fields remain nested in data. For example, use {{ $json.data.tokenUsage }} or inspect {{ $json.data.scraperAllowance }}.
Working with n8n Output
The node returns n8n items. It does not add the CLI and SDK response envelope containing status_code, data, and headers; a data field shown above belongs to the API body itself.
| Operation | Result expression |
|---|---|
| Scrape HTML | {{ $json.html }} |
| Scrape Markdown | {{ $json.markdown }} |
| Get Screenshot | {{ $json.screenshot }} |
| Scrape Brand | {{ $json.data.brand }} |
| Scrape JSON | {{ $json.data }} |
| Web Search | {{ $json.data }} |
| Get Status | {{ $json.data }} |
To use a URL produced by a previous node, switch URL to expression mode and enter {{ $json.url }}. For search, use {{ $json.query }} in Search Query.
Understanding n8n Upstream Node Execution
When you execute a node in n8n, all upstream nodes automatically re-execute silently. With MrScraper, this means hidden token costs.
For example, in a Web Search → Split Out → Scrape Markdown workflow, clicking Test step on Scrape Markdown also runs the search again and scrapes every result. Testing 10 times means 10 searches and 10 rounds of scrapes. Pin the output of upstream MrScraper nodes while you build downstream steps.
Troubleshooting
HTTP and network failures appear as node execution errors. Input validation rejects invalid URLs, page limits, screenshot viewport formats, search inputs, and JSON schemas before the request is sent. Inspect API response fields such as success, status, and error for service-level results.
| Symptom | What to check |
|---|---|
| Authentication fails | Check the token in the selected MrScraper API credential. |
| Dynamic content is missing | Set Browser Rendering to True and add Wait for Selector if needed. |
| A scrape takes too long | Set Timeout up to 330 seconds and configure Max Retries. The transport allows 30 additional seconds. |
| Expected Output Schema is rejected | Use valid JSON with double quotes and no trailing commas. |
| Screenshot settings are rejected | Scrape HTML, Scrape Markdown, and Scrape JSON use boolean toggles. Get Screenshot uses full, top, or a supported viewport. |
| Screenshot output is text rather than a file | Decode the Base64 output into binary before passing it to a node that requires a file. |
| An output expression returns undefined | Inspect the node's output JSON and map the actual response fields. |
Migrating from Earlier Versions
- Get Account Info is now named Get Status. Its internal operation identifier is unchanged, so existing selections continue to work.
- Geo Code is in the main configuration. Browser Rendering choices are True, False, and None.
- Scrape HTML and Scrape Markdown use a boolean Screenshot toggle and have no Action input. Get Screenshot accepts custom viewports in Screenshot Mode.
- Max Age is new on every page operation, and Timeout accepts up to 330 seconds.
proxy,proxyCountry,super,returnCookie,tokenCap, andwaitUntilare not exposed or forwarded. Page results are always saved to your dashboard.- Web Search and ordinary JSON extraction use GET. Get Screenshot sends
html=false, although the API may still return HTML. - The Extraction, Result, Scraper Creation, Scraper Run, and Crawl Website URLs resources of earlier node versions are unavailable. Rebuild workflows that use them with the supported operations, or call the REST API with an HTTP Request node for scrapers and results.
Example Workflows
Built on earlier node versions
These example workflows use the Scraper Creation, Scraper Run, and Result resources of earlier node versions, which version 6.0.0 no longer provides.
Create a Scraper
Create a scraper with the MrScraper n8n node and export results to Google Sheets. Use the generated outputs as reusable inputs for building end-to-end scraping workflows.
Listing Agent + General Agent
Automate data extraction from real estate listing websites using a two-agent approach.
Map Agent + General Agent
Scrape entire websites using a two-agent approach for comprehensive data collection.
Map + Listing + General Agent
Comprehensive website scraping combining three powerful agents for complete site coverage.
Prebuilt Workflow Templates
MrScraper provides ready-to-deploy n8n workflow templates for common automation use cases. Each template is built around real-world scenarios and can be deployed in minutes.
Quick Start
Select the template that fits your use case, follow the setup guide, and you'll have a working automation running in minutes.
Monitor Realtor Listings
Scrape Realtor.com listings on a schedule and receive formatted CSV or XLSX reports via Gmail.
Turn Google Sheets into Website Database
Pull structured data from any website and append it automatically to a live Google Sheet.
Extract Product Details from Search URLs
Extract product names, prices, and ratings from a batch of search result URLs into Google Sheets.
Documentation Support Chatbot
Crawl your documentation site and power a GPT-4.1-mini chatbot that answers user questions accurately.
Monitor News Sentiment Trends
Scrape news articles, analyze sentiment with GPT-4o-mini, and receive Slack digests on coverage shifts.
Monitor Ecommerce Reviews
Track platform reviews with GPT-4o-mini and receive Slack alerts when negative patterns emerge.
Inflowpay
Let AI agents use six tools to fetch page HTML, Markdown and screenshots, extract brand identity and structured JSON, and search the web, with pay-per-request USDC payments through x402, settled by the InFlow facilitator.
Create a Scraper
Build an n8n workflow that creates a new MrScraper scraper and automatically saves its scraper ID and URL to a new Google Sheets spreadsheet.