Generate keyword ideas and historical search metrics using the Google Ads API Keyword Planner service
domain: advertising · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Authenticate with OAuth2 and a developer token, then instantiate the KeywordPlanIdeaService client for your target API version (Google moved to monthly point releases in 2026, e.g. v24.x — confirm the current supported version in the release notes before building)
Build a GenerateKeywordIdeasRequest seeding keyword_seed, url_seed, or site_seed (or a combination), plus a geo target constant and a language constant resource name
Set keyword_annotation and historical_metrics_options (e.g. year_month_range) if you need trend and search-volume history alongside new ideas
Call GenerateKeywordIdeas and iterate the returned GenerateKeywordIdeaResult entries, reading avg_monthly_searches, competition, and low/high top-of-page bid
Call GenerateKeywordHistoricalMetrics separately when you only need volume/trend data for a known keyword list rather than new suggestions
Cache resolved geo target constant and language constant IDs locally instead of re-resolving them via GeoTargetConstantService on every call
Known gotchas
GenerateKeywordIdeas only accepts geo target constant resource names, not free-text locations — an unmapped location silently returns zero ideas rather than erroring
Historical search volume is bucketed/approximate for low-volume keywords, not an exact count
The service requires a developer token with at least basic access; test-account-only tokens get restricted or empty results
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?