Enable the Google Search Console API in Google Cloud Console and create OAuth 2.0 credentials for your project
Authenticate using OAuth 2.0 with the scope https://www.googleapis.com/auth/webmasters.readonly and obtain an access token
Send a POST request to the searchanalytics.query endpoint for your verified site, specifying a date range in the request body
Set the 'dimensions' array to one or more of: query, page, country, device, date, searchAppearance — each dimension fans out results accordingly
Use the 'rowLimit' field to request up to the API maximum per call, and paginate with the 'startRow' offset field to retrieve all rows beyond the first page
Aggregate and store returned rows; each row contains dimension keys, clicks, impressions, ctr, and position values
Known gotchas
The API returns data with a latency of roughly two to three days; querying for yesterday's data will return empty or incomplete results
The default row limit per response is 1000 rows; results beyond that require repeated calls incrementing startRow — failing to paginate means silently missing most of your data
Data is sampled and aggregated; very low-traffic queries may be filtered out entirely, so totals from the API can differ from the Search Console UI
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp