Manual keyword research is slow and disconnected from real user behavior. I use AI agents connected to Google Search Console data to automate keyword clustering, intent analysis, and content gap detection for client websites.
This article shows the complete workflow: from raw GSC data to actionable keyword clusters that drive content decisions.
Traditional keyword research relies on guesswork. You look at competitor sites, use keyword tools with volume estimates, and try to predict what users might search for. But if you already have a website, Google is telling you exactly what people search for — and you're not listening.
Google Search Console provides actual search query data, grouped by page, with impressions, clicks, and average position. This is the real signal. The problem is extracting actionable insights from thousands of rows of query data.
The system consists of three components: Data source: Google Search Console Search Analytics API AI agent: A coding agent with access to the GSC data and the ability to execute scripts Cluster output: A JSON mapping of queries to pages, intents, and optimization opportunities
The agent runs a Node.js script that authenticates with Google Cloud, fetches 12 months of search query data, and processes it into keyword clusters organized by page and intent.
Before anything else, you need API access to Search Console data. This requires: A Google Cloud project with the Search Console API enabled Application Default Credentials (ADC) configured with gcloud auth application-default login The Search Console property added to your account
The core of this workflow is a Node.js script that fetches GSC data and processes it. Here's how it works:
The script fetches up to 25,000 rows of query data spanning the last 12 months. It uses pagination to handle larger datasets.
Map routes to pages: Each query result is mapped to a canonical route, stripping fragments and query parameters.
Aggregate by page: For each page, all queries are collected along with their impressions, clicks, and positions.
Identify intent clusters: Queries are grouped by intent. "What is X" queries are informative. "Buy X" or "hire X" queries are commercial. The intent is inferred from both the query phrasing and the page it leads to.
Detect cannibalization: When multiple pages rank for similar queries, the script flags potential cannibalization where pages compete for the same search terms.
The output is a JSON file that maps each page to its keyword clusters. This becomes the foundation for all content and SEO decisions.
Optimization targets: Pages with high impressions but low clicks are prime optimization targets. The title, meta description, or content may need improvement.
Internal linking strategy: Use the cluster data to identify which pages should link to which. If a page ranks for "website development services" and another ranks for "hire a web developer," they should link to each other.
Content gap identification: Queries with impressions but no corresponding page suggest new content opportunities. The queries tell you what users want but don't find.
Commercial vs. informational intent: The intent labels help decide whether a page should be a blog post (informative) or a landing page (commercial).
