AcademyWorkflowsData and reporting

Scrape web pages into structured JSON with AI

Data and operations teams that collect information from web pages whose layout changes.

  • Recommendedour rating
  • 17,135views on n8n
Open on n8n.io ↗

Paste it straight onto an n8n canvas with Ctrl+V or Cmd+V.

scrape-any-web-page-into-structured-json-data-with-scrapeninja-and-ai.json

Loading the file...

What it does

An n8n workflow that scrapes a page's HTML with ScrapeNinja, asks Google Gemini to write a JavaScript extractor, and runs that code in a sandbox to return structured data. Because the extractor is generated each time, layout changes break it less often. Self-hosted n8n only.

Use cases

  1. 01Extract product details from a web page
  2. 02Turn a listing page into structured records
  3. 03Keep a scraper working after a layout change

Connects

Basic LLM Chain · Google Gemini Chat Model

Questions about
Scrape web pages into structured JSON with AI.

What is Scrape web pages into structured JSON with AI used for?

Data and operations teams that collect information from web pages whose layout changes. An n8n workflow that scrapes a page's HTML with ScrapeNinja, asks Google Gemini to write a JavaScript extractor, and runs that code in a sandbox to return structured data. Because the extractor is generated each time, layout changes break it less often. Self-hosted n8n only.

How do I import Scrape web pages into structured JSON with AI into n8n?

Copy the workflow JSON from this page and paste it onto the n8n canvas with Ctrl+V or Cmd+V. Then connect your credentials in each node.

Is Scrape web pages into structured JSON with AI safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.