n8n

This guide explains how to connect your scraper to n8n to automate 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 MrScraper n8n integration enables you to:

  • Extract data on demand - Run one-off scrapes by prompt, preset schema, or raw rendered HTML
  • Discover URLs - Crawl a website for links or pull Google search results
  • Create scrapers - Set up reusable AI scrapers directly from your workflow
  • Run scrapers - Trigger existing AI or manual scrapers with a single URL or in batch
  • Get results - Retrieve scraped data including latest results, paginated results, or a specific result by ID
  • Monitor your account - Check token usage and limits

Why Use This Integration?

Integrating MrScraper with n8n enables fully automated data pipelines:

  • Automatically create and run scrapers on a schedule or trigger
  • Fetch and process scraping results programmatically
  • Send scraped data to other tools (Google Sheets, databases, APIs, webhooks, notification systems)
  • Build end-to-end workflows by connecting MrScraper with hundreds of n8n-supported services

This transforms scraping from a standalone task into a seamless part of broader automation workflows.

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:

The node authenticates with a single API Token credential, sent as an x-api-token header.

Understanding MrScraper Resources

The MrScraper node in n8n groups its actions into six Resources. Understanding these resources will help you choose the right one for your workflow.

Renamed in recent versions

If you built workflows against an earlier version of the node, resource and operation names have changed. See What changed for the full mapping.

ResourceWhat it doesRuns immediately?
AccountRead account details, token usage and limitsYes
DiscoveryFind URLs by crawling a site or searching GoogleYes
ExtractionOne-off scraping by prompt, preset schema, or raw HTMLYes
ResultFetch data produced by your scrapersYes
Scraper CreationCreate a reusable scraper in your MrScraper accountYes
Scraper RunRun an existing scraper on new URLsYes

Account

Retrieve your MrScraper account information, including account type, usage limits, and token consumption.

Operation: Get Account Info

Use Case: Monitor account status and usage in automated workflows. This operation takes no parameters.

Discovery

Find URLs and search results to feed into the rest of your workflow.

Discover URLs by crawling links from a starting website.

Best for: Site mapping, URL discovery, building link inventories before a detail-page scrape.

Parameters:

ParameterRequiredDefaultDescription
URLYesStarting URL for the crawl
Max DepthNo2How many levels deep to follow links
Max PagesNo50Maximum pages to evaluate during discovery
LimitNo50Maximum number of results to return
Include PatternsNoPipe-separated regex for URLs to include
Exclude PatternsNoPipe-separated regex for URLs to exclude

Pattern syntax

Include and exclude patterns are regular expressions separated by |, for example ^https://www\.example\.com/blog/|^https://www\.example\.com/products/.

Fetch Google search results as JSON or HTML through the synchronous MrScraper SERP API.

Best for: Keyword monitoring, competitor tracking, seeding a workflow with search results.

Parameters:

ParameterRequiredDefaultDescription
Search QueryYesGoogle search terms, e.g. best hotels in New York
RegionYesusTwo-letter country/region code for localized results
LanguageYesenTwo-letter result language code
PageYes1Google results page number
FormatNoJSONJSON for parsed results, HTML for the raw results page
Render JavaScriptNofalseRender JavaScript before collecting results

Extraction

Run a scrape and get data back immediately, without creating a persistent scraper first.

Extract data from a single page using your own prompt.

Best for: Product detail pages, article pages, profile pages, single-item extraction.

Parameters:

ParameterRequiredDefaultDescription
URLYesThe target URL to scrape
PromptNoInstructions for what data to extract
Expected Output SchemaNoJSON describing the expected output shape
ModeNoSuperCheap for weak security, Super for stronger protection. Learn more
Proxy CountryNoISO country code for the proxy, e.g. US, GB, ID, SG

Expected Output Schema

The schema is not sent as a separate field. It is stringified and appended to your prompt, so the agent returns JSON matching the shape you described. Example: {"name":"string","price":"number","inStock":"boolean"}.

Extract repeated items across one or more pages of a listing.

Best for: Product category pages, search results, directory pages, multi-page listings.

Parameters:

ParameterRequiredDefaultDescription
URLYesThe target URL to scrape
PromptNoInstructions for what to extract from each listing page
Expected Output SchemaNoJSON describing each expected listing item
Max PagesNo1Maximum pagination pages to scrape
Proxy CountryNoISO country code for the proxy

Extract data using a preset schema instead of writing your own prompt.

Best for: Common page types where a standard set of fields is enough.

Parameters:

ParameterRequiredDefaultDescription
URLYesThe target URL to scrape
Structured Data CategoryYesArticlePreset extraction schema
ModeNoSuperCheap or Super scraping mode
Proxy CountryNoISO country code for the proxy

Available Categories: Article, Forum Thread, Hotel, Job Posting, Post, Product, Property, Restaurant, Social Media Profile, Tour / Attraction.

Fetch the rendered HTML of a page through the MrScraper stealth browser, with JavaScript execution, bot evasion, and optional geo proxy.

Best for: Troubleshooting scraping issues, retrieving page source, or when you need raw HTML or Markdown rather than structured extraction.

Parameters:

ParameterRequiredDefaultDescription
URLYesTarget URL to fetch
Max RetriesNo3Retry attempts when the request fails
TimeoutNo300Maximum seconds to wait for the page to load
Geo CodeNousCountry code used for geolocation
Proxy CountryNousCountry code for the proxy location
ScreenshotNofalseCapture and return a screenshot
Screenshot ModeNoFullFull for the entire page or Top for the top only. Appears once Screenshot is enabled
Return HTMLNotrueInclude the rendered HTML in the response
Return MarkdownNofalseInclude Markdown converted from the rendered page

Advanced Options:

Click Add Option to reach these.

OptionDefaultDescription
Token Cap30Maximum token allowance for processing the scraped content
Wait for SelectorCSS selector to wait for before returning the page
Wait UntilDOM Content LoadedBrowser lifecycle event to wait for: DOM Content Loaded, Load, or Network Idle
Block ResourcestrueBlock images, fonts, and stylesheets for faster, cheaper loads
Home PagefalseNavigate via the site's home page before the target URL
Return CookietrueInclude browser cookies in the response
SupertrueUse a real device for sites requiring stronger capabilities

Browser rendering is always on

This operation always renders the page in a browser, so JavaScript content loads. There is no toggle to disable it.

Result

Retrieve data produced by your scrapers. This is typically the final step in a scraping workflow, where you fetch the data to send to other systems.

Retrieve paginated results with sorting.

Best for: Large result sets that need pagination or specific sorting.

Parameters:

ParameterRequiredDefaultDescription
Scraper IDYesID of the scraper whose results to fetch
PageYes1Page number for pagination
Page SizeYes10Number of results per page
Sort ByYesCreated AtField used to sort results
Sort OrderYesDescendingAscending or Descending

Retrieve the most recent results for a scraper.

Best for: Monitoring workflows where you only need the latest data.

Parameters:

ParameterRequiredDefaultDescription
Scraper IDYesID of the scraper whose latest results to fetch
NYes10Number of latest results to fetch

Retrieve a specific result by its ID.

Best for: Fetching a known result, or following up on a batch run.

Parameters:

ParameterRequiredDefaultDescription
Result IDYesUnique result ID to retrieve

Tips

Retrieve batch run results by passing the batch operation ID to this operation. A Scraper ID is not required here.

Common Use Case

Result operations are commonly used to pass scraped data to other n8n nodes like Google Sheets, databases, webhooks, or notifications.

Scraper Creation

Create a persistent scraper in your MrScraper account that can be reused and triggered multiple times with the Scraper Run resource.

Use Case: When you need a reusable scraper configuration that you'll run repeatedly with different URLs.

Create an AI scraper from a URL, an extraction prompt, and an expected JSON output schema.

Parameters:

ParameterRequiredDefaultDescription
URLYesThe target URL to scrape
PromptNoInstructions for what data to extract
Expected Output SchemaNoJSON describing the expected output shape
ModeNoSuperCheap or Super scraping mode
Proxy CountryNoISO country code for the proxy

Create an AI scraper for repeated listing data using a prompt and an expected JSON output schema.

Parameters:

ParameterRequiredDefaultDescription
URLYesThe target URL to scrape
PromptNoInstructions for what to extract from each item
Expected Output SchemaNoJSON describing each expected listing item
Max PagesNo1Maximum pagination pages to scrape
Proxy CountryNoISO country code for the proxy

Create a scraper that discovers URLs by crawling a website.

Parameters:

ParameterRequiredDefaultDescription
URLYesStarting URL for the crawl
Max DepthNo2How many levels deep to follow links
Max PagesNo50Maximum pages to evaluate during discovery
LimitNo50Maximum number of results to return
Include PatternsNoPipe-separated regex for URLs to include
Exclude PatternsNoPipe-separated regex for URLs to exclude

Scraper Run

Run an existing scraper again with new URLs. Requires a scraper created through Scraper Creation or in the MrScraper dashboard.

Operations:

  • Run Existing Scraper - run one URL
  • Run Existing Scraper in Batch - run multiple URLs in a single request

Instead of a separate operation per agent type, you pick the scraper's shape with two selectors:

SelectorValuesShown when
Scraper TypeAI, ManualAlways
Agent TypeGeneral, Listing, MapScraper Type is AI and operation is Run Existing Scraper

Important

The selectors must match how the scraper was built. Choosing Manual routes the request to the manual-scraper endpoint, and each Agent Type exposes a different set of run settings.

Run Existing Scraper

Every single run takes these fields:

ParameterRequiredDefaultDescription
Scraper IDYesID of the existing scraper, from the scraper detail page
URLYesFull URL to process in this run
Max RetryNo3Maximum retry attempts if the run fails
Proxy CountryNoProxy country code, e.g. us or uk

Additional fields depend on the selected type:

No extra required fields beyond the common ones.

Options:

OptionDefaultDescription
Bypass ProxyfalseBlock images, fonts, and stylesheets to speed up scraping
HTMLfalseInclude HTML in the result
MarkdownfalseInclude Markdown in the result
Render JavaScriptfalseRender JavaScript before extracting content
Return CookiesfalseInclude browser cookies in the result
ScreenshotfalseCapture a screenshot during the run
Use Home PagefalseVisit the site's home page first. Improves success rate on some sites, but adds latency — enable only if the scraper is blocked
Wait for SelectorCSS selector to wait for before extraction

Extra parameters:

ParameterRequiredDefaultDescription
Max PagesNo5Maximum pagination pages to scrape
TimeoutNo300Maximum seconds to wait for the listing run

Options: the same set as AI · General, plus:

OptionDefaultDescription
StreamfalseStream listing results as they become available

Extra parameters:

ParameterRequiredDefaultDescription
Max DepthNo2Maximum link depth to crawl from the starting URL
Max PagesNo50Maximum pages to evaluate during URL discovery
LimitNo50Maximum number of results to return
Include PatternsNoPipe-separated regex for URLs to include
Exclude PatternsNoPipe-separated regex for URLs to exclude

Map runs do not expose an Options collection.

Manual scrapers have their own Options set, covering browser session control and pagination.

Options:

OptionDefaultDescription
Bypass ProxytrueBlock images, fonts, and stylesheets to speed up scraping
Cookie JarCookie jar identifier or serialized cookie jar value
Cookies[]JSON array of browser cookie objects for this run
Home PagefalseVisit the site's home page before the target URL
Home Page Timeout10Maximum seconds to wait for the home page
HTMLfalseInclude HTML in the result
MarkdownfalseInclude Markdown in the result
Paginator{}JSON pagination configuration, e.g. {"selector":"a.next","maxPages":5}
ProxyProxy URL used for this run
RecordfalseRecord the browser session
Return CookiefalseInclude browser cookies in the result
ScreenshotfalseCapture a screenshot and return it Base64-encoded
StreamfalseStream results as they become available
Timeout600Maximum seconds to wait for the run
Token Cap0Maximum token count for the result; 0 means no explicit limit

Run Existing Scraper in Batch

Run multiple URLs against one existing scraper in a single operation.

Use Case: Scrape many product pages, profiles, or articles with the same scraper configuration without creating separate workflow nodes.

Parameters:

ParameterRequiredDescription
Scraper TypeYesAI or Manual, matching how the scraper was built
Scraper IDYesID of your AI or manual scraper
URLsYesThe URLs to scrape

URL formats accepted

The URLs field accepts a JSON array (["https://example.com/a", "https://example.com/b"]), or a comma- or newline-separated list. The value is normalized to an array before it is sent.

Tips

Retrieve batch results by passing the batch operation ID to the Get Result Detail operation.

What Changed

Resource and operation names were reorganized in recent versions of the node. If you are updating older workflows or older notes, use this mapping:

PreviouslyNow
Agent resourceExtraction resource
Scraping resourceExtraction resource
Web Unblocker resourceExtraction → Fetch Rendered HTML
Batch Operation resourceScraper Run → Run Existing Scraper in Batch
Create Scraper resourceScraper Creation resource
Rerun Scraper resourceScraper Run resource
Results resourceResult resource
Scrape Dynamic ContentExtract Page by Prompt
Scrape Paginated ContentExtract Listings and Paginated Content
Scrape Structured DataExtract Structured Data
Scrape Web PageFetch Rendered HTML
Crawl Website SitemapDiscovery → Crawl Website URLs
Scrape Search ResultsDiscovery → Search Google SERP (now a real Google SERP API)
Run General / Listing / Map / Manual Agent Scraper (4 operations)Run Existing Scraper + Scraper Type / Agent Type selectors

New in the current node:

  • Discovery resource, including the synchronous Google SERP API
  • Expected Output Schema on prompt-based and listing operations
  • Options collections on Scraper Run (screenshot, HTML, Markdown, cookies, streaming, wait-for-selector, and more)
  • An Advanced Options collection on Extraction → Fetch Rendered HTML
  • The node is usable as an AI Agent tool

Fetch Rendered HTML was also reshuffled. If you configured it on an earlier node version:

  • Token Cap, Block Resources, Wait Until, Return Cookie, and Super moved into Advanced Options
  • Browser Rendering was removed — the page is always rendered in a browser
  • Screenshot is now a toggle plus a separate Screenshot Mode (Full / Top), instead of a text field
  • Wait Until is now a dropdown rather than free text
  • Return Markdown now defaults to false

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.

Common example workflow:

Create Scraper → Run Scraper → Get Results

What happens when you only want to test the Get Results node:

You click "Test" on Get Results, but n8n silently executes ALL upstream nodes:

  1. Scraper Creation runs → Creates new scraper
  2. Scraper Run runs → Runs the scraper
  3. Result runs → Retrieves results

Every test click on Get Results creates a brand new scraper. Testing 10 times = 10 new scrapers created and more tokens burned.

Setup Guide

Now that you understand the available resources, let's set up your first MrScraper workflow.

Add the MrScraper Node

  1. Open the n8n workflow editor
  2. Click the + button to add a new node
  3. Search for MrScraper
  4. Select the MrScraper node

Configure Credentials

  1. In Credential to connect with, click Create new credential
  2. Paste your MrScraper API token
  3. Click Save

Choose Your Resource and Configure

  1. Select the Resource that matches your use case (see Understanding MrScraper Resources above)
  2. Select the Operation
  3. Fill in the required parameters, then add optional ones as needed

Test and Execute

  1. Click Test step to verify your configuration
  2. Review the returned data
  3. Connect the output to other nodes in your workflow

Quick Tip

Start with the Extraction resource for testing and one-off scraping. Once you have a working configuration, use Scraper Creation to save it for reuse with the Scraper Run resource.

Example Workflows

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.

On this page