Animated data flow diagram

AI-Powered SEO Rank Analyzer with SERPBear & OpenRouter

Version: 1.0.0 | Last Updated: 2025-05-16

Integrates with:

SERPBear OpenRouter Baserow

Overview

Unlock Automated SEO Performance Analysis and Strategic Insights with this AI Agent

Stop spending hours manually checking keyword positions and trying to make sense of raw data. This n8n AI agent connects directly to your SERPBear instance, retrieves the latest SEO ranking information for your specified keywords and domain, and then uses a powerful Large Language Model (LLM) via OpenRouter to provide you with a clear summary, key observations, trend analysis, and actionable suggestions for improvement. All findings are neatly stored in your Baserow database for easy access and historical tracking.

This is perfect for solo founders, marketing teams, and SEO specialists who want to leverage AI for smarter, faster SEO analysis without complex setups.

Key Features & Benefits

  • Automated SERP Data Retrieval: Connects to your SERPBear instance to fetch keyword rankings, position, ranking URL, and historical data for your specified domain.
  • Intelligent Data Preparation: A built-in code node processes the raw SERPBear data, calculates 7-day average positions, and identifies ranking trends (improving, declining, stable) for each keyword.
  • AI-Powered Analysis & Insights: Leverages a state-of-the-art LLM (e.g., Meta Llama 3.1 70B via OpenRouter) to analyze the prepared data. The AI provides:
    • Key observations about overall ranking performance.
    • Highlights of keywords showing significant improvement.
    • Identification of keywords that require attention.
    • Concrete, actionable suggestions for SEO improvement.
  • Structured Reporting in Baserow: Automatically creates new entries in your Baserow table, storing the date, the AI-generated analysis, and your website/blog identifier.
  • Flexible Triggers: Can be run on a schedule (e.g., weekly) or triggered manually whenever you need an update.
  • Customizable: Easily adapt the AI prompt, change the LLM model in OpenRouter, or modify the data parsing to fit your specific needs.
  • Time-Saving Automation: Drastically reduces manual effort in SEO monitoring and reporting, freeing you up for strategic tasks.

Use Cases

  • Automated weekly or daily SEO performance monitoring and AI-summarized reporting.
  • Identifying underperforming keywords and getting AI-generated suggestions for content optimization.
  • Tracking keyword ranking trends over time with concise AI analysis stored in a database.
  • Generating actionable SEO improvement strategies based on current SERP data without manual analysis.
  • Streamlining SEO audits for client websites by automating data collection and initial analysis.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • A SERPBear instance with API access: You'll need its URL and an API Key.
  • The specific SERPBear Keyword ID or Group ID for the data you want to track (used in the API URL).
  • Your website domain name (to customize in the workflow where rumjahn.com is used as an example).
  • An OpenRouter API Key. (Visit openrouter.ai to get one).
  • A Baserow account, a Database ID, and a Table ID. The table should have at least three fields, for example:
    • Date (Date field type)
    • Note (Long text field type for AI analysis)
    • Blog (Text field type, for your website/project name)

Setup Instructions

  1. Download the n8n workflow JSON file.
  2. Import the workflow into your n8n instance.
  3. Configure 'Get data from SerpBear' node:
    • Update the URL parameter with your SERPBear instance URL and the specific keyword/group ID (e.g., https://your-serpbear.com/api/keyword?id=YOUR_ID).
    • In the Query Parameters section, change the value for the domain parameter from rumjahn.com to your website's domain.
    • Set up Authentication to Generic Credential Type and select HTTP Header Auth. Click Create New Credential. Name it (e.g., "SERPBear API Key"). The Name of the header should be as required by your SERPBear setup (e.g., X-API-KEY or Authorization), and the Value should be your SERPBear API Key (prefix with Bearer if it's a Bearer token).
  4. Review 'Parse data from SerpBear' node:
    • The jsCode in this node prepares data and constructs the prompt for the AI. It uses rumjahn.com as an example domain in the prompt text: Here's the SEO ranking data for rumjahn.com.... Ensure this matches your domain or modify the code to dynamically use the domain from the previous node's parameters if you prefer.
  5. Configure 'Send data to A.I. for analysis' node:
    • The default URL is https://openrouter.ai/api/v1/chat/completions.
    • Set up Authentication to Generic Credential Type and select HTTP Header Auth. Click Create New Credential. Name it (e.g., "OpenRouter API Key"). The Name of the header must be Authorization and the Value must be Bearer YOUR_OPENROUTER_API_KEY (make sure to include the space after 'Bearer').
    • In Body Parameters > JSON Body, you can change the AI model (default: meta-llama/llama-3.1-70b-instruct:free) or customize the user message prompt further if needed.
  6. Configure 'Save data to Baserow' node:
    • Select or create new Baserow API credentials.
    • Enter your Baserow Database ID and Table ID.
    • Map the Fields to your Baserow table's columns. For example:
      • Map your 'Date' field to ={{ DateTime.now().toFormat('yyyy-MM-dd') }}.
      • Map your 'Notes' or 'AI Analysis' field (long text) to ={{ $json.choices[0].message.content }}.
      • Map your 'Blog' or 'Website Name' field to the actual name of your site (e.g., update the example Rumjahn or use a dynamic value).
  7. Customize the 'Schedule Trigger' node for automated execution frequency (e.g., daily, weekly), or use the 'When clicking ‘Test workflow’' node for manual runs.
  8. Activate the workflow. Test thoroughly by running it once to ensure all connections and data mappings are correct.

Tags:

AI AgentSEO AutomationSERPBearOpenRouterLLMLlama 3BaserowData AnalyticsMarketing AutomationProductivitySolopreneur ToolStartup Automation

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Schedule a Consultation