Authorize Search Console API access with the correct OAuth scope and automate domain property verification via the Site Verification API

domain: developers.google.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Choose between the webmasters (read/write) and webmasters.readonly OAuth scopes depending on whether your integration needs to submit sitemaps/request indexing or just read data
  2. For URL-prefix properties, pass siteUrl as the literal prefixed URL (e.g. https://www.example.com/); for Domain properties, use the sc-domain:example.com format
  3. To programmatically add and verify a new Domain property rather than doing it manually via DNS in the UI, also request the Site Verification API's scope
  4. Complete DNS TXT record verification through the Site Verification API before the corresponding Search Console API calls will succeed for that domain
  5. Store and refresh OAuth tokens per the standard Google OAuth 2.0 flow, matching the scopes actually granted by the user

Known gotchas

Related routes

Set up Google Cloud service account credentials and add the service account as a delegated owner in Search Console to authorize use of the Indexing API
developers.google.com · 6 steps · unrated
Query Google Search Console Search Analytics API for Discover performance data
developers.google.com · 6 steps · unrated
Inspect individual URLs at scale using the Google Search Console URL Inspection API and manage quota constraints
developers.google.com · 6 steps · unrated

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?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans