Templates / Discover hidden website API endpoints using regex and AI

Discover hidden website API endpoints using regex and AI

Needs changes

by Yulia ✓ · 1,814 views · created 2025-06-03 · Engineering, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 42 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects OpenRouter Chat Model. It also calls openrouter.ai over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. Configuration (Edit Fields (Set)): sets 2 fields: URL, User-Agent
  2. Load Reference Endpoints (Read/Write Files from Disk): reads a file from disk
  3. Merge: merges the data from its input branches
  4. Fetch Website HTML (HTTP Request): calls an HTTP API
  5. Extract Endpoints File Text (Extract from File): extracts data from a file (text)
  6. Evaluate LLM Regex (Edit Fields (Set)): sets 1 field: Evaluation results
  7. Extract URLs of JS files (HTML): parses or builds HTML
  8. Split URLs of JS files (Split Out): splits a list into separate items
  9. Keep Relevant JS Files (Filter): keeps only the items that match a condition
  10. Fetch JS Content (HTTP Request): calls an HTTP API

…plus 24 more steps. See the full node list below.

Services it uses

OpenRouter Chat Model

HTTP calls to: openrouter.ai

Scraping pages by hand? Firecrawl is a simpler option (10% off for new users).

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in Create Endpoints Regex With AI (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Create Endpoints Regex With AI (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (21)

From the author

💡 What it is for This workflow helps to automatically discover undocumented API endpoints by analysing JavaScript files from the website's HTML code. When building automation for platforms without public APIs, we face a significant technical barrier. In a…

Excerpt from Yulia's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.