# Claude Code for SEO Playbook

> Turn Claude Code into an automated end-to-end SEO pipeline using external APIs

A practical workflow setup that configures Claude Code with API keys for Keywords Everywhere, DataForSEO, Google Search Console, and your CMS. It covers endpoint-specific recipes for keyword clustering, programmatic landing pages, backlink outreach, internal linking, and content updates.

## How it works

Setup: a .env file for Claude Code containing your Keywords Everywhere API key, DataForSEO API key, data warehouse for Google Search Console data, and CMS access to publish content.

1. Map keyword universe: pull the full keyword universe via Keywords Everywhere's related keywords and people-also-search-for endpoints; send the entire list to DataForSEO's SERP API to see who ranks and where gaps are; produce a content calendar with clustering and prioritization.
2. Programmatic landing pages at scale: for a SaaS serving 20 industries, hit Keywords Everywhere for long-tail variations per vertical, check DataForSEO for difficulty and SERP features, and have Claude Code generate unique pages with correct semantic terms and schema markup baked in.
3. Link building: use DataForSEO's domain intersection endpoint (sites linking to competitors but not you). Pull backlink profiles for top 5 competitors, run the intersection, find gaps, scrape contact info, draft personalized outreach emails referencing the specific page they link to. Entire pipeline in 8 minutes.
4. Internal linking: build topical relevance clusters from Keywords Everywhere related-keyword data, then have Claude Code generate the site-wide linking structure with real semantic relationships.
5. Content refreshing: with GSC data access (via graphed.com, because direct API/MCP hits hit rate limits, pagination and misrepresentative data), ask Claude to analyze top pages, find keywords they rank for, identify which ranking keywords aren't on the page, and refresh content to incorporate them. Claimed 20% lift.
6. Analytics: connect GA4 and GSC into graphed.com and do SEO reporting there; direct connections without a pipeline/warehouse cause duplication errors, rate limits and pagination.

## What it is for

- Generate programmatic landing pages mapped to specific vertical keyword clusters
- Identify competitor backlink gaps and draft personalized link outreach emails
- Find striking-distance keywords in Search Console data to refresh existing articles
- Build a site-wide internal linking architecture based on semantic keyword clusters

## Key points

- Environment configuration linking Claude Code directly to SEO data APIs and CMS publishing endpoints
- Keyword universe mapping using Keywords Everywhere and DataForSEO SERP endpoints
- Automated programmatic landing page generation with schema markup and semantic terms
- Backlink prospecting via DataForSEO domain intersection endpoint
- GSC-driven content optimization to integrate ranking queries missing from the copy
- Data warehouse routing recommendation for Search Console and GA4 to avoid API pagination and rate limits

## Pricing

Free. Playbook is free; requires paid API credits for Keywords Everywhere and DataForSEO

## Details

- Type: Tip
- Category: [Marketing & Sales](https://xiry.app/topics/marketing-sales.md)
- Topic: [Search Engine Optimization](https://xiry.app/topics/marketing-sales/search-engine-optimization.md)
- Open source: no
- Platforms: Command line
- For: Technical SEOs, growth marketers, and developers building programmatic search campaigns
- Alternative to: Ahrefs, Semrush, Surfer SEO
- Tags: seo, claude code, keywords everywhere, dataforseo, automation, programmatic seo

## Why it was saved

- [@codyschneider, 2 March 2026](https://x.com/codyschneider/status/2028500579501183024): Concrete, endpoint-level recipes with claimed results (full keyword universe, pages at scale, outreach pipeline in 8 minutes, 20% content lift).

## Compare

- [Alternatives to Semrush](https://xiry.app/alternatives/semrush.md)
- [Alternatives to Ahrefs](https://xiry.app/alternatives/ahrefs.md)
- [Alternatives to Surfer SEO](https://xiry.app/alternatives/surfer-seo.md)

## Related

- [10 AI Search Optimization Findings from 1 Billion Data Points](https://xiry.app/resources/10-ai-search-optimization-findings-from-1-billion-data-point): Empirical SEO findings on how AI models and Google AI Overviews cite content (List, Free)
- [18 About Us Page Elements for E-E-A-T](https://xiry.app/resources/18-about-us-page-elements-for-e-e-a-t): Checklist of 18 trust signals to improve website About pages for SEO (Tip, Free)
- [Above-the-Fold H1 Heading Optimization for Homepage SEO](https://xiry.app/resources/above-the-fold-h1-heading-optimization-for-homepage-seo): On-page SEO practice for targeting primary keywords in homepage headings (Tip, Free)
- [Cloudflare 'Block AI bots' SEO Troubleshooting Tip](https://xiry.app/resources/cloudflare-block-ai-bots-seo-troubleshooting-tip): Warning on how Cloudflare's AI bot blocking breaks Google search indexing (Tip, Free)
- [Competitor Keyword Gap Analysis Workflow](https://xiry.app/resources/competitor-keyword-gap-analysis-workflow): Find competitor search queries your site misses to guide new content. (Tip, Freemium)
- [Exact-Match Review Domain SEO & AI Citation Strategy](https://xiry.app/resources/exact-match-review-domain-seo-and-ai-citation-strategy): Host reviews on an exact-match domain to control search results and AI citations (Tip, Free)

Updated 11 October 2026. Page: https://xiry.app/resources/claude-code-for-seo-playbook

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
