M
MJK.Supplies
Home / n8n / n8n Web Scraping: Extract Data from Any Website …
n8n

n8n Web Scraping: Extract Data from Any Website Automatically

Web scraping with n8n enables competitive intelligence, lead generation, price monitoring, and data collection workflows — all automated and connected to your business tools. This guide covers the best approaches to web scraping in n8n, from simple HTTP fetches to AI-powered data extraction with Claude.

M
MJK Supplies · May 29, 2026 · 11 min read
ShareXinf↗
n8n Web Scraping: Extract Data from Any Website Automatically

Web Scraping Options in n8n

n8n supports several scraping approaches:

HTTP Request node: Fetch any URL. Returns raw HTML. Best for simple pages that don't require JavaScript rendering.

Browser automation (Puppeteer/Playwright via Code node): Full browser rendering for JavaScript-heavy sites. More complex to set up; handles dynamic content.

External scraping services: Browserless, ScrapingBee, Apify, Bright Data — they handle proxies, CAPTCHAs, and JS rendering. n8n calls their API.

RSS feeds: For blogs and news sites, RSS is often easier and more reliable than scraping HTML.

Basic HTTP Scraping

For simple HTML pages:

HTTP Request node setup:

  • Method: GET
  • URL: target URL
  • Response Format: String (to get raw HTML)

Code node — extract data:

// Simple HTML extraction const html = $input.first().json.body; // Extract price from specific pattern const priceMatch = html.match(/class="price"[^>]*>([^<]+)</); const price = priceMatch ? priceMatch[1].trim() : null; // Extract title const titleMatch = html.match(/<h1[^>]*>([^<]+)<\/h1>/); const title = titleMatch ? titleMatch[1].trim() : null; return [{ json: { price, title, url: $input.first().json.url } }];

AI-Powered Data Extraction with Claude

For complex or variable HTML structures, pass raw HTML to Claude:

{ "model": "claude-sonnet-4-6", "max_tokens": 1024, "system": "You are a data extraction assistant. Extract structured data from HTML pages. Return only valid JSON.", "messages": [{ "role": "user", "content": "Extract all product names and prices from this HTML. Return JSON array: [{name: string, price: string}]\n\nHTML:\n{{ $json.html }}" }] }

Claude reads messy HTML and returns clean structured data — handling layout variations, encoding issues, and different HTML patterns better than regex.

Competitor Monitoring

Price monitoring workflow:

  1. Schedule trigger: daily at 6am
  2. Loop: for each competitor URL in Airtable
  3. HTTP: fetch competitor pricing page
  4. Claude: extract products and prices
  5. Code: compare to previous prices (stored in Airtable)
  6. IF: price changed → Slack alert
  7. Airtable: update current prices

Content monitoring:

  1. Schedule trigger: weekly
  2. HTTP: fetch competitor blog RSS feed
  3. Loop: for each new article
  4. Claude: "Is this article relevant to our product? Summarise key points."
  5. Slack: send digest of relevant competitor content

Lead Generation via Web Scraping

Job posting scraping:

Company posting "VP Sales" = potential CRM buyer. Company posting "Machine Learning Engineer" = AI tooling buyer.

  1. Schedule trigger: daily
  2. HTTP: scrape job boards (Indeed, Glassdoor, LinkedIn Jobs API)
  3. Claude: "Does this job posting suggest the company needs [your product]? Why?"
  4. Filter: only positive assessments
  5. Clearbit: enrich company data
  6. HubSpot: add to lead pipeline

Directory scraping: Industry directories often list companies with contact information:

  1. HTTP: fetch directory pages
  2. Claude: extract company names, websites, phone numbers, descriptions
  3. Enrichment: Clearbit / Apollo on extracted companies
  4. HubSpot: create contacts

Handling Anti-Scraping Measures

User agent rotation:

const userAgents = [ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36' ]; const randomUA = userAgents[Math.floor(Math.random() * userAgents.length)];

Rate limiting: Add Wait nodes between requests. 1-3 seconds between requests to the same domain respects server limits and avoids blocks.

Proxy services: For sites with IP-based blocking, route through proxy services:

  • Bright Data, Oxylabs, ScrapingBee handle proxy rotation
  • n8n calls their API instead of the target directly

Use external scraping APIs for hard targets:

HTTP: GET https://api.scrapingbee.com/v1/? api_key={{API_KEY}}& url=https://target-site.com& render_js=true

Data Storage

Scraped data needs to go somewhere:

Airtable: Best for structured, human-reviewable data. Easy to filter and update.

PostgreSQL/MySQL: Best for high-volume data with complex queries.

Google Sheets: Simple sharing with non-technical stakeholders.

Notion: If your team lives in Notion, store intelligence reports there.

Recommended Tools

  • n8n — Automation backbone for scraping workflows
  • Claude API — AI-powered HTML extraction
  • ScrapingBee — Managed scraping with JS rendering
  • Bright Data — Proxy network for anti-bot bypass
  • Airtable — Store scraped competitive intelligence
  • Apollo.io — Lead data that complements scraped sources
#n8n#scraping#data#extraction

Related articles

MJK Supplies · Automation Services

Want this built for you?

We design and ship custom AI agents and automation systems for teams that want results, not a backlog. Book a free 30-minute consult — no commitment, no pitch deck.