Scrape and analyze websites with custom prompts using Gemini, Apify, and LangChain
Workflow preview
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER
Early Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
Important notice
This workflow is provided as-is. Please review and test before using in production.
Overview
π AI-Powered Website Prompt Executor (Apify + OpenRouter)
This workflow combines the power of Apify and OpenRouter to scrape website content and execute any custom prompt using AI. You define what you want β whether itβs extracting contact details, summarizing content, collecting job offers, or anything else β and the system intelligently processes the site to give you results.
π Overview
This workflow allows you to:
- Input a URL and define a prompt.
- Scrape the specified number of pages from the website.
- Process each pageβs metadata and Markdown content.
- Use AI to interpret and respond to the prompt on each page.
- Aggregate and return structured output.
π§ How It Works
Input Example
{
"enqueue": true,
"maxPages": 5,
"url": "https://apify.com",
"method": "GET",
"prompt": "collect all contact informations available on this website"
}
Workflow Steps
| Step | Action |
|---|---|
| 1 | Triggered by another workflow with JSON input. |
| 2 | Calls the Apify actor firescraper-ai-website-content-markdown-scraper to scrape content. |
| 3 | Loops through the scraped pages. |
| 4 | AI analyzes each page based on the input prompt. |
| 5 | Aggregates AI outputs across all pages. |
| 6 | Final AI processing step to return a clean structured result. |
π Technologies Used
- Apify β Scrapes structured content and Markdown from websites.
- OpenRouter β Provides access to advanced AI models like Gemini.
- LangChain β Handles AI agent orchestration and prompt interpretation.
π§ Customization
Customize the workflow via the following input fields:
url: Starting point for scrapingmaxPages: Limit the number of pages to crawlprompt: Define any instruction (e.g., βsummarize this website,β βextract product data,β βlist all emails,β etc.)
This allows dynamic, flexible use across various use cases.
π¦ Output
The workflow returns a JSON result that includes:
- Processed prompt responses from each page
- Aggregated AI insights
- Structured and machine-readable format
π§ͺ Example Use Cases
- π Extracting contact information from websites
- π Summarizing articles or company profiles
- ποΈ Collecting product information
- π Extracting job listings or news
- π¬ Generating outreach lists from public data
- π€ Used as a tool within other AI agents for real-time web analysis
- π§© Integrated as an external tool in MCP (Multi-Component Prompt) servers to enhance AI capabilities
π API Credentials Required
You will need:
- Apify API token β For running the scraper actor
- OpenRouter API key β For AI-powered prompt processing
Set these credentials in your environment or n8n credential manager before running.