AutomationMart
Home/Browse/Discover hidden website API endpoints using regex and AI
n8n

Discover hidden website API endpoints using regex and AI

n8nn8n42 modulesv1.0
Gemini

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 perfect world, every service would offer well-documented APIs with clear endpoints and authentication methods. But the reality is different. Before we resort to complex web scraping, let's analyse the architecture of the platform and check whethe

At a glance

Discover hidden website API endpoints using regex and AI is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Gemini. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Gemini
Modules
42
Price
Free
Version
v1.0
Discover hidden website API endpoints using regex and AI workflow diagram

About this workflow

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 perfect world, every service would offer well-documented APIs with clear endpoints and authentication methods. But the reality is different. Before we resort to complex web scraping, let's analyse the architecture of the platform and check whether it makes internal API calls. We will examine JavaScript files embedded in the HTML source code to find and extract potential API endpoints. ⚙️Key Features To discover hidden API endpoints, we can apply two major approaches: 1. Predefined regex extraction: manually insert a fixed regex with the necessary conditions to extract endpoints. Unlike LLM, which creates a custom regex for each JS file, we provide a generic expression to capture all URL strings. We do not want to accidentally miss important API endpoints. 2. AI-supported extraction: - ask LLMs to examine the structure of the JavaScript code. The 1st model will: - capture potential API endpoints - create a detailed description of each identified endpoint with methods and query parameters - the 2nd LLM connected to the AI Agent will generate a regex for each JS file individually based on the output of the 1st model. In addition to pure endpoint extraction, we supplement our analysis with: - AI regex validation: the AI Agent calls a validation tool to iteratively improve its regex based on the reference data. - Results comparison: side-by-side analysis of API endpoints extracted with a predefined regex against AI-supported results. ✅Requirements: - OpenRouter API access: for AI-powered analysis (Gemini + Claude models by default) - Minimal setup: simply configure the target URL and run - Platforms: JS files must be accessible and have embedded standard API endpoints patterns (/api/, /v1/, etc.) 💪Use Cases 📚 API documentation: create complete endpoint descriptions for internal APIs 🚀 Automation & integration projects: find the APIs you need when official documentation is missing 🛠 Web scraping projects: discover data access patterns 🔍 Security research: map attack surfaces and explore unprotected endpoints 🎉Extracted the endpoints, what now? To execute API requests, we often need additional information such as query parameters or JSON body data: - One way to find out exactly how the request is being made on the platform is to navigate to the Network tab in the Dev Tools console while interacting with the platform. Look for anything that resembles API requests and review the request/response headers, payload and query parameters. - Alternatively, you can also check the JS file and the page source code for the required values. ✨Inspiration As a guitarist who also builds workflows, I wanted to automate communication with the booking platform I use in my music project. While trying to connect to the platform from n8n, I ran into a challenge: no public APIs. Fortunately, I found out that the platform I work with was built as a modern web app with client-side JavaScript that contained information about the API structure. This led me to the topic of hidden API endpoints and eventually to this workflow. It is part of my music booking project which I presented at the n8n Community Meetup in Berlin on 22 May 2025.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Turn BBC News articles into podcasts using Hugging Face and Google Gemini

Turn BBC News Articles into Podcasts using Hugging Face and Google Gemini Effortlessly transform BBC news articles into engaging podcasts with this automated n8n workflow. Who is this for? This template is perfect for: Content creators who want to quickly produce podcasts from current events. Students looking for an efficient way to create audio content for projects or assignments. Individuals interested in generating their own podcasts without technical expertise. Setup Information 1. Instal

Free

Automatically classify and label Gmail emails with Google Gemini AI

Description Quickly organize your inbox with AI! This simple workflow automatically classifies incoming emails into different categories — like High Priority, Work Related, or Promotions — and applies Gmail labels accordingly. Setup takes less than 2 minutes, and it runs 24/7, helping you stay focused on what matters most without manual sorting. Tools/Services Needed Gmail: To trigger the workflow and label emails. Google Gemini (or any LLM Model): To intelligently classify email content. How

Free

Create AI video ads from product descriptions using AI Agent and deAPI

Who is this for? - Marketing teams who need quick video ads without a production crew - E-commerce sellers promoting products on social media - Freelancers and agencies producing ad creatives for clients - Anyone who wants to turn a product description into a video ad in minutes What problem does this solve? Producing a video ad typically requires a designer for the visuals, a motion artist for animation, and hours of back-and-forth. This workflow replaces that entire pipeline — fill out a form,

Free

Multilingual voice & text Telegram bot with ElevenLabs TTS and LangChain agents

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Telegram Voice AI Assistant This n8n template creates a multimodal Telegram bot that dynamically responds to users: - Replies with voice when receiving voice messages (using ElevenLabs TTS) - Replies with text for text-based queries - Supports custom AI tools (e.g., crypto APIs, databases, or custom functions) Built with LangChain Agents, it can integrate any externa

Free

💅 AI Agents Generate Content & Automate Posting for Beauty Salon Social Media 📲

AI Agents Generate Content & Automate Posting for Beauty Salon Social Media 📲 Who Is This For? This workflow is for beauty salons who want consistent, high‑quality social media content without writing every post manually. It also suits agencies and automation builders who manage multiple beauty brands and want a reusable, AI‑driven posting system they can adapt per client. What Problem Is This Workflow Solving? Many beauty businesses struggle to post regularly because research, copywriting,

Free

Find top-performing Instagram Reels & save insights to Notion with Gemini & Apify

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This template helps you discover trending Instagram Reels from competitors or any public profiles you choose. 📺 How It Works The workflow automatically monitors selected Instagram accounts using Apify, pulls recent Reels, and analyzes their performance. It calculates engagement levels, detects early “hot” content, translates text if needed, and organizes all results into a structure

Free

Auto-publish web articles as social posts for X, LinkedIn, Reddit & Threads with Gemini AI

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Description This automation template is designed for content curators, marketers, and anyone looking to supercharge their content sharing strategy. It transforms any web article, blog post, or news link into a series of platform-specific social media posts, generated by AI. It also captures a live screenshot of the webpage to use as the post image, automating the entire process of publishi

Free

Evaluate AI agent response correctness with OpenAI and RAGAS methodology

This n8n template demonstrates how to calculate the evaluation metric "Correctness" which in this scenario, measures the compares and classifies the agent's response against a set of ground truths. The scoring approach is adapted from the open-source evaluations project RAGAS and you can see the source here How it works This evaluation works best where the agent's response is allowed to be more verbose and conversational. For our scoring, we classify the agent's response into 3 buckets: True

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free