★  Gen AI Summit Asia·August 2026 · Malaysia·Get your ticket →·★  Gen AI Summit Asia·August 2026 · Malaysia·Get your ticket →·★  Gen AI Summit Asia·August 2026 · Malaysia·Get your ticket →·★  Gen AI Summit Asia·August 2026 · Malaysia·Get your ticket →·
How to Build SEO Reports with Claude Code and Search Console
AI How-ToMay 20, 20267 min read

How to Build SEO Reports with Claude Code and Search Console

Connect Google Search Console data to Claude Code, generate custom visualizations, and create flexible SEO reporting workflows for stakeholder meetings.

Jackson YewJackson Yew

Builders who manage SEO for clients or in-house teams can now turn Google Search Console data into polished, version-controlled reports using Claude Code. No drag-and-drop dashboards. No rigid templates. You prompt Claude Code in your terminal, it writes and runs a Python script, and you get charts plus plain-English summaries ready for stakeholder meetings. Google Search Console serves over 10 million verified properties as of 2025, yet fewer than 15% of SEO teams automate their reporting beyond basic Looker Studio dashboards, according to a 2024 Search Engine Journal survey. This gap is where Claude Code fits.

What Is Claude Code and Why Use It for SEO Reporting?

Claude Code is Anthropic's agentic coding tool. It runs in your terminal. It can read, write, and run code on your machine. Unlike chat-based AI, it works across multiple files and multiple steps without you pasting code back and forth.

For SEO teams, this matters. You describe the report you want in plain English. Claude Code writes the Python script, runs it against the Google Search Console API, hits an error, fixes the error, and refines the output. One session. One tool.

Compare that to your current options. Looker Studio gives you templates, but they break the moment you need custom filters or non-standard groupings. Manual CSV exports eat 30 to 60 minutes per report. Third-party connectors like Supermetrics cost money and still limit your layout choices.

As of May 2026, Claude Code supports extended thinking and multi-file project context. This makes multi-step data pipelines more reliable than earlier versions. You can point it at your credentials file, your data folder, and your output directory, then let it handle the wiring. The Claude Max plan launched in early 2026 with unlimited Claude Code usage, removing cost barriers for recurring report automation.

How Do You Connect Google Search Console to Claude Code?

The connection runs through Google's API, not through Claude Code itself. Claude Code writes and runs the script that talks to the API. Here is how to set it up.

First, open the Google Cloud Console. Make a new project or pick an existing one. Enable the Google Search Console API under "APIs & Services." Then make a service account (simpler for automation) or OAuth2 credentials (better for one-off use).

Download the JSON credentials file. Store it in your project folder but add it to your .gitignore so it never hits a public repo. When you start a Claude Code session, tell it where the credentials live.

Claude Code will pull in the google-auth and google-api-python-client libraries. It handles the authentication boilerplate. You just specify which property (domain or URL prefix) you want to query.

Watch for common pitfalls. Service accounts need property-level access in Search Console's user settings. The API returns a maximum of 16 months of historical data. Each request caps at 25,000 rows. If you need more, Google added bulk data export to BigQuery in late 2025, which your script can tap into instead. You can also connect these API credentials through MCP (Model Context Protocol) for a more structured tool-to-model connection.

How to Prompt Claude Code to Generate Custom SEO Reports

The quality of your report depends on the quality of your prompt. Be specific. Here is a prompt structure that works well:

> "Build a Python script that pulls Google Search Console data for [property URL] for the last 90 days. Group by query. Include clicks, impressions, CTR, and average position. Filter out branded queries containing [brand name]. Output a CSV to ./output/ and generate a line chart of daily clicks plus a scatter plot of CTR vs. position. Save charts as PNG."

Claude Code will write the script, run it, and show you the output. When something breaks (and it will, usually an auth scope error or a missing library), Claude Code reads the traceback and fixes it in the same session. This error-fix cycle is the key difference from copy-pasting code from ChatGPT.

Once the first draft works, iterate. Ask for device segmentation. Ask it to split pages by subfolder. Ask it to add a year-over-year comparison column. Each request refines the same script. When you are satisfied, the script lives in your repo. Future reports run with one command: python seo_report.py. For more on how to reduce hallucinations and keep Claude Code on track with context files, that guide covers the setup.

What Visualizations Work Best for SEO Stakeholder Meetings?

Executives want trajectory. Practitioners want opportunities. Your report should serve both.

Trend lines showing clicks and impressions over 90 days, with a year-over-year overlay, give leadership the direction story. Up or down. By how much. Claude Code can generate these with matplotlib or Plotly in under a minute. The sample output chart (a 90-day click trend with YoY overlay exported as PNG) shows how clean these automated visuals look without any manual design work.

Scatter plots of CTR versus average position reveal quick wins. Pages ranking in positions 5 through 15 with below-average CTR are your optimization targets. Title tag and meta description rewrites on these pages often lift clicks without building a single link.

Grouped bar charts comparing branded versus non-branded query traffic separate real organic growth from brand awareness. This distinction matters when reporting to stakeholders who care about new customer acquisition.

Export formats matter too. PNG and PDF work for slide decks. HTML files work for Notion embeds or async distribution. Claude Code can output all three from the same script. Ask for it in your prompt. For more on using HTML as an output format in Claude Code workflows, that approach pairs well with report distribution.

How Does Claude Code Compare to Looker Studio and Manual Exports?

This comparison covers the same dataset (one property, 90 days, five dimension filters) across three methods.

Looker Studio wins for live dashboards where people want to click and filter. Claude Code wins for recurring deliverables that need custom logic, plain-English interpretation, and version control. They are not competitors. They cover different needs. If your team already uses Claude for daily workflows, adding SEO reporting to that system is a small step.

How to Automate and Schedule Recurring Reports

A script that runs once is useful. A script that runs every Monday morning before your team meeting is a system.

Option 1: Cron job. On any Linux or Mac machine, add a cron entry that runs python seo_report.py weekly. The output lands in a shared folder (Google Drive, Dropbox, or an S3 bucket).

Option 2: GitHub Actions. Store your script in a private repo. Add a workflow file that runs on a schedule. GitHub gives you 2,000 free minutes per month on private repos. Your credentials live in GitHub Secrets.

Option 3: Add a summary step. After the script generates charts and CSVs, pipe the CSV into a Claude API call (Sonnet 4.6 works well for this) that writes a three-paragraph summary of what changed, what improved, and what needs attention. This summary goes into the same output folder or gets sent to Slack via a webhook.

The end-to-end workflow looks like this: GSC API credentials feed into your Claude Code-generated script, which outputs charts plus a summary, which gets pushed to your distribution channel (Slack, email, shared folder). The whole pipeline is code. You can review changes in a pull request. Teammates can add new dimensions or filters without starting over. For guidance on building these kinds of AI automation workflows with tools like n8n, that guide covers the orchestration layer.

What Are the Limitations of This Approach?

Every tool has edges. Know these before you commit.

Row limits. The GSC API returns a maximum of 25,000 rows per request. For large sites with thousands of pages and queries, you need pagination or the BigQuery bulk export that Google shipped in late 2025. Claude Code can write the pagination logic, but you need to ask for it.

Data lag. GSC data is 2 to 3 days behind. Daily reporting is impractical. Weekly or monthly cadences fit better.

Environment requirements. Claude Code runs in a terminal. You need Python installed, an Anthropic account (Max plan or API key), and basic comfort with the command line. This is not a no-code solution. It is a low-code solution for people who can follow a terminal.

Live filtering. If your stakeholders want to click through dimensions in real time during a meeting, Looker Studio or Tableau still serve that need better. Claude Code produces static outputs (charts, CSVs, summaries) that answer predefined questions well.

For technical readers: the generated scripts use synchronous API calls by default. For properties with heavy query volume, consider asking Claude Code to add async batch requests with asyncio and aiohttp to speed up data pulls. The Sonnet 4.6 model handles this refactoring well when you describe the bottleneck plainly.

When Should You Start?

Operators who already pull GSC data manually have the clearest path. You know what your stakeholders ask for. You know which filters matter. You just need a faster way to build it.

Start with one report. Pick your most frequent deliverable. Open Claude Code, describe it, and let it build the script. Fix it in-session. Save it. Run it next week. Then add a second report.

The compound value shows up in month two. Your reporting scripts live in a repo. Each one runs in seconds. You spend your time reading the data and making decisions, not formatting it.

For more workflows like this, and to connect with builders running AI-powered operations across Southeast Asia and beyond, visit genai.club or join us at GenAI Summit Asia.

FAQ

Can Claude Code directly access my Google Search Console data?

Not directly. Claude Code executes code on your local machine, so you provide it with GSC API credentials (OAuth2 or a service account JSON key). It then writes and runs a Python script that authenticates against the API and pulls your data. You control which properties and scopes are accessible through your Google Cloud project settings.

Do I need to know Python to build SEO reports with Claude Code?

No. You describe what you want in plain English (metrics, date ranges, chart types) and Claude Code generates the Python code for you. Basic terminal comfort helps (running commands, reading error messages), but you do not need to write code from scratch. Claude Code also fixes its own errors iteratively during the session.

How often can I run automated GSC reports with this workflow?

You can schedule reports as frequently as daily, but GSC data typically lags 2-3 days, so weekly runs are most practical. Wrap the script in a cron job or GitHub Action to run automatically. Each run pulls fresh data from the API within GSC's 16-month retention window.

What are the cost requirements for using Claude Code for SEO reporting?

You need either an Anthropic API key (usage-based billing) or a Claude Max subscription, which includes unlimited Claude Code access as of early 2026. Google Search Console API access is free. The Python libraries used (google-api-python-client, matplotlib, Plotly) are all open-source and free.

Is this approach better than Looker Studio for SEO reporting?

It depends on your needs. Looker Studio excels at live, interactive dashboards shared via URL. Claude Code excels at custom, version-controlled reports with plain-English summaries, unusual data transformations, and outputs tailored to specific stakeholder questions. Many teams use both: Looker Studio for always-on monitoring and Claude Code scripts for monthly deep-dive reports.

Sources

  1. Google Search Console API Documentation
  2. Anthropic Claude Code Documentation
  3. Search Engine Land: Build Custom SEO Reports with Claude Code

More where this came from

Documentation, not the product.

See all posts →