Discover hidden website API endpoints using regex and AI
Needs changesWhat 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).
- Configuration (Edit Fields (Set)): sets 2 fields: URL, User-Agent
- Load Reference Endpoints (Read/Write Files from Disk): reads a file from disk
- Merge: merges the data from its input branches
- Fetch Website HTML (HTTP Request): calls an HTTP API
- Extract Endpoints File Text (Extract from File): extracts data from a file (text)
- Evaluate LLM Regex (Edit Fields (Set)): sets 1 field: Evaluation results
- Extract URLs of JS files (HTML): parses or builds HTML
- Split URLs of JS files (Split Out): splits a list into separate items
- Keep Relevant JS Files (Filter): keeps only the items that match a condition
- Fetch JS Content (HTTP Request): calls an HTTP API
…plus 24 more steps. See the full node list below.
Services it uses
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.0 | Replace 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)
- Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - HTML
n8n-nodes-base.html - Split Out
n8n-nodes-base.splitOut - Filter
n8n-nodes-base.filter - If
n8n-nodes-base.if - Remove Duplicates
n8n-nodes-base.removeDuplicates - No Operation, do nothing
n8n-nodes-base.noOp - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Convert to File
n8n-nodes-base.convertToFile - Read/Write Files from Disk
n8n-nodes-base.readWriteFile - Merge
n8n-nodes-base.merge - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Extract from File
n8n-nodes-base.extractFromFile - Sort
n8n-nodes-base.sort
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…