Back to Blog

research

Search Analytics: SQL-Powered SEO Insights for Agents

Learn how the search-analytics skill lets agents query Google Search Console data in SQLite for SEO and content optimization.

OpenAgentSkillPublished:

Where this fits

You manage a content site and need to know why organic traffic dipped last month. Instead of exporting CSV files from Google Search Console and stitching them together in a spreadsheet, you want a local, queryable dataset. The search-analytics skill does exactly that: it pulls clicks, impressions, CTR, average position, and landing pages into a SQLite database, so you (or your agent) can ask precise questions with SQL and get answers in seconds.

Why agents benefit

  • Direct SQL access: Agents can run ad-hoc queries like SELECT query, clicks FROM search_analytics WHERE date BETWEEN ? AND ? without needing API credentials or manual exports.
  • Historical persistence: Data is stored incrementally with no loss, so agents can compare week-over-week trends and detect anomalies.
  • Automated sync: The included script handles OAuth, pagination, and API quotas (25,000-row batches), freeing the agent from boilerplate.
  • Contextual recommendations: By analyzing which queries have high impressions but low CTR, agents can suggest title or meta description improvements.
  • Local privacy: All data stays in a local SQLite file—no third-party analytics platform required, which simplifies compliance and debugging.

Practical scenarios

Keyword Ranking Drift Analysis

An agent runs a weekly job that queries the database for queries where average position dropped by more than 3 positions. It then cross-references those queries with landing page URLs to flag pages needing content refresh or internal linking.

CTR Optimization Opportunities

Your agent identifies queries with impressions > 1,000 but CTR < 1%. It generates a list of titles and meta descriptions that could be A/B tested, and even drafts new versions based on search intent inferred from the query text.

Landing Page Performance Reports

For a monthly editorial review, the agent produces a per-URL summary of clicks, impressions, and trend direction. It writes the report to a markdown file and highlights pages that lost significant impressions—prioritizing them for content updates.

Add it to your agent workflow

Install the skill with:

npx skills add danicat/skills --skill search-analytics

Then, in your agent’s tool configuration, point it to the generated search_analytics.db. A simple usage example:

import sqlite3
conn = sqlite3.connect('search_analytics.db')
cur = conn.cursor()
cur.execute("SELECT query, clicks, ctr FROM performance WHERE date = '2025-03-01' ORDER BY clicks DESC LIMIT 5")
for row in cur.fetchall():
    print(row)

For a full walkthrough of the skill’s capabilities, check its catalog page.

Compare before adopting

Before integrating, compare this skill against alternatives based on:

  • Quality signals: Does the README clearly explain data handling, error recovery, and OAuth flow? The 25,000-row batching and raw JSON preservation are strong indicators.
  • Maintenance freshness: Check the commit history and release cadence. A skill that hasn’t been updated in a year may break with API changes.
  • Alternatives: There are other SEO analytics tools, but few offer local SQLite storage with no external dependencies.
  • Workflow fit: Does your agent already use SQLite? If so, this integrates seamlessly. If you prefer a cloud dashboard, you might need a different approach.

Why it is worth tracking

With only 16 stars, this is an early-stage skill, but its design is solid: Apache-2.0 licensed, authored by Daniela Petruzalek (a known data engineer), and actively versioned (0.2.0). The local-first, SQL-friendly approach is a growing pattern in agent tooling. Track it if you value data portability and want to avoid vendor lock-in. Evaluate it when you need to automate SEO reporting or content optimization without building a custom scraper. Its simplicity and clear documentation make it a low-risk addition to any agent’s toolkit.

Featured Skill

search-analytics

Skill by danicat

Search Analytics: SQL-Powered SEO Insights for Agents | OpenAgentSkill