<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Search Console API &#8211; Aveshost Blog</title>
	<atom:link href="https://blog.aveshost.com/tag/search-console-api/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.aveshost.com</link>
	<description>Your Blueprint for Online Success</description>
	<lastBuildDate>Wed, 18 Nov 2026 12:58:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://blog.aveshost.com/wp-content/uploads/2026/01/logo-150x150.png</url>
	<title>Search Console API &#8211; Aveshost Blog</title>
	<link>https://blog.aveshost.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Automate SEO Reports with the Search Console API and n8n</title>
		<link>https://blog.aveshost.com/automate-seo-reports-search-console-api-n8n/</link>
					<comments>https://blog.aveshost.com/automate-seo-reports-search-console-api-n8n/#respond</comments>
		
		<dc:creator><![CDATA[James Wilson]]></dc:creator>
		<pubDate>Wed, 18 Nov 2026 12:56:10 +0000</pubDate>
				<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Google Search Console]]></category>
		<category><![CDATA[n8n]]></category>
		<category><![CDATA[Search Console API]]></category>
		<category><![CDATA[SEO Automation]]></category>
		<category><![CDATA[vps hosting]]></category>
		<category><![CDATA[WordPress SEO]]></category>
		<guid isPermaLink="false">https://blog.aveshost.com/?p=5973</guid>

					<description><![CDATA[A complete engineering guide to automating weekly SEO reports with the Google Search Console API and self-hosted n8n, including OAuth2 setup, 3-day lag offset, period-over-period delta math, and Google Sheets/Slack delivery.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Learning how to <strong>automate SEO reports with the Search Console API and n8n</strong> eliminates hours of manual CSV exports, spreadsheet copy-pasting, and repetitive Monday morning traffic checks. Instead of logging into Google Search Console property by property and hitting the 1,000-row UI export cap, an n8n workflow pulls up to 25,000 rows per API call on a schedule.</p>



<p class="wp-block-paragraph">Because n8n does not ship a dedicated built-in Google Search Console node out of the box, connecting directly to the <code>searchAnalytics/query</code> REST endpoint via n8n&#8217;s <strong>HTTP Request</strong> node gives you full control over dimensions, regex filters, finalized data windows, and period-over-period comparisons.</p>



<p class="wp-block-paragraph">In this step-by-step guide, you will configure Google Cloud OAuth2 credentials, handle Search Console&#8217;s 2–3 day data lag in an n8n Code node, compute week-over-week click and CTR deltas, and deliver automated SEO digests to Google Sheets and Slack from your <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">Aveshost Self-Managed VPS</a>.</p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><div><div><a href="#why-automate-seo-reports-with-the-search-console-api-and-n8n">Why Automate SEO Reports with the Search Console API and n8n?</a></div><div><a href="#step-1-configure-google-cloud-oauth2-credentials-for-n8n">Step 1: Configure Google Cloud OAuth2 Credentials for n8n</a></div><div><a href="#step-2-offset-the-3-day-gsc-lag-and-query-searchanalytics">Step 2: Offset the 3-Day GSC Lag and Query searchAnalytics</a></div><div><a href="#step-3-calculate-traffic-deltas-and-striking-distance-keywords">Step 3: Calculate Traffic Deltas and Striking-Distance Keywords</a></div><div><a href="#step-4-deliver-reports-to-google-sheets-slack-or-ai-agents">Step 4: Deliver Reports to Google Sheets, Slack, or AI Agents</a></div><div><a href="#faq">Frequently asked questions</a></div></div></nav></div>



<h2 id="why-automate-seo-reports-with-the-search-console-api-and-n8n" class="wp-block-heading">Why Automate SEO Reports with the Search Console API and n8n?</h2>



<p class="wp-block-paragraph">Most marketing teams rely on Looker Studio dashboards that require someone to open a link and hunt for anomalies. When you <strong>automate SEO reports with the Search Console API and n8n</strong>, your server proactively detects traffic drops, content decay, and striking-distance keywords and delivers actionable summaries directly to your team.</p>



<p class="wp-block-paragraph">Here is how an n8n API workflow compares to manual Search Console exports:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Reporting Capability</th><th>Manual GSC UI Export</th><th>n8n + Search Console API Workflow</th></tr></thead><tbody><tr><td>Rows Returned per Query</td><td>Capped at 1,000 rows in UI tables</td><td>Up to 25,000 rows per request (paginated via startRow)</td></tr><tr><td>Multi-Property Rollups</td><td>Export each domain one by one</td><td>Loop through all verified sites in one scheduled run</td></tr><tr><td>Data Freshness Control</td><td>Mixes partial recent days unless filtered</td><td>Explicit dataState: final + 3-day lag date offset</td></tr><tr><td>Anomaly &amp; Decay Alerts</td><td>Requires manual spreadsheet formulas</td><td>Automated &gt;20% click-drop alerts to Slack or Telegram</td></tr><tr><td>AI Summarization</td><td>Manual prompt copy-pasting</td><td>Optional LLM / MCP node drafting title &amp; H2 fixes</td></tr></tbody></table></figure>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1264" height="848" src="https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-workflow-architecture.webp" alt="Automated SEO reporting pipeline diagram connecting n8n Schedule Trigger, Google Search Console HTTP Request, Code delta analysis, and Google Sheets or Slack output" class="wp-image-5971" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-workflow-architecture.webp 1264w, https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-workflow-architecture-300x201.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-workflow-architecture-1024x687.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-workflow-architecture-768x515.webp 768w" sizes="(max-width: 1264px) 100vw, 1264px" /></figure>



<h2 id="step-1-configure-google-cloud-oauth2-credentials-for-n8n" class="wp-block-heading">Step 1: Configure Google Cloud OAuth2 Credentials for n8n</h2>



<p class="wp-block-paragraph">To call the <a href="https://developers.google.com/webmaster-tools/v1/searchanalytics/query" rel="noopener">Google Search Console API</a> from n8n, create an OAuth2 Web Application credential in Google Cloud Console (or use a Service Account if you prefer server-to-server JSON keys without user consent).</p>



<p class="wp-block-paragraph">• <strong>1. Enable the API:</strong> Open Google Cloud Console, select your project, go to <strong>APIs &amp; Services &gt; Library</strong>, and enable the <strong>Google Search Console API</strong>.</p>



<p class="wp-block-paragraph">• <strong>2. Create OAuth Client ID:</strong> Under <strong>APIs &amp; Services &gt; Credentials</strong>, create an <strong>OAuth client ID</strong> (<em>Web application</em>) and add your n8n callback URL (<code>https://n8n.yourdomain.com/rest/oauth2-credential/callback</code>) under Authorized redirect URIs.</p>



<p class="wp-block-paragraph">• <strong>3. Create the n8n Credential:</strong> In n8n, open <strong>Credentials &gt; Add Credential &gt; OAuth2 API</strong>. Set Authorization URL to <code>https://accounts.google.com/o/oauth2/v2/auth</code>, Access Token URL to <code>https://oauth2.googleapis.com/token</code>, and Scope to <code>https://www.googleapis.com/auth/webmasters.readonly</code>. Click <strong>Connect my account</strong> and authorize your Google Search Console account.</p>



<h2 id="step-2-offset-the-3-day-gsc-lag-and-query-searchanalytics" class="wp-block-heading">Step 2: Offset the 3-Day GSC Lag and Query searchAnalytics</h2>



<p class="wp-block-paragraph">A common mistake when teams first <strong>automate SEO reports with the Search Console API and n8n</strong> is querying yesterday&#8217;s date. Finalized Google Search Console metrics typically lag <strong>2 to 3 days</strong> behind real time—querying incomplete days makes every Monday report look like traffic crashed on Friday and Saturday.</p>



<p class="wp-block-paragraph">Start your workflow with a <strong>Schedule Trigger</strong> (every Monday at 08:00), followed by a <strong>Code</strong> node that sets <code>currentEnd = today - 3 days</code>, <code>currentStart = today - 30 days</code> (28 full days), and <code>prevEnd = today - 31 days</code>, <code>prevStart = today - 58 days</code>.</p>



<p class="wp-block-paragraph">Next, add two <strong>HTTP Request</strong> nodes (one for the current 28-day window and one for the previous 28-day window) using your Google OAuth2 API credential. Remember to URL-encode the <code>siteUrl</code> path parameter: a Domain property like <code>sc-domain:yourdomain.com</code> becomes <code>sc-domain%3Ayourdomain.com</code>, while a URL-prefix property like <code>https://yourdomain.com/</code> becomes <code>https%3A%2F%2Fyourdomain.com%2F</code>.</p>



<pre class="wp-block-code"><code>// HTTP Request Node: POST Endpoint URL
// https://www.googleapis.com/webmasters/v3/sites/sc-domain%3Ayourdomain.com/searchAnalytics/query

// JSON Request Body (using dynamic dates from the previous Code node)
{
  "startDate": "{{ $json.currentStart }}",
  "endDate": "{{ $json.currentEnd }}",
  "dimensions": &#91;"query", "page"],
  "rowLimit": 25000,
  "startRow": 0,
  "dataState": "final"
}</code></pre>



<h2 id="step-3-calculate-traffic-deltas-and-striking-distance-keywords" class="wp-block-heading">Step 3: Calculate Traffic Deltas and Striking-Distance Keywords</h2>



<p class="wp-block-paragraph">Once both HTTP Request nodes return their <code>rows</code> arrays, add a <strong>Merge</strong> node (Wait for both inputs) followed by a JavaScript <strong>Code</strong> node to compare the current 28-day period against the prior 28-day period.</p>



<p class="wp-block-paragraph">Inside that single Code node, you can extract three high-signal SEO tables in milliseconds:</p>



<p class="wp-block-paragraph">• <strong>1. Top Growing Pages:</strong> URLs with the largest positive click delta so your editorial team sees which newly published guides are gaining traction.</p>



<p class="wp-block-paragraph">• <strong>2. Content Decay Alerts:</strong> Pages that earned at least 100 clicks in the previous period and dropped by <strong>20% or more</strong>—often caused by competitor updates or <a href="https://blog.aveshost.com/google-search-console-ai-overviews/">Google AI Overviews SERP shifts</a>.</p>



<p class="wp-block-paragraph">• <strong>3. Striking-Distance Keywords (Positions 8–20):</strong> Queries ranking on page two or the bottom of page one with high impressions where updating the title tag, H2 headings, or Rank Math FAQ block can quickly unlock page-one clicks.</p>



<pre class="wp-block-code"><code>// n8n Code Node: Compare Current vs Prior 28-Day Search Console Rows
const currentRows = $('GSC Current 28d').first().json.rows || &#91;];
const prevRows = $('GSC Prior 28d').first().json.rows || &#91;];

const prevMap = new Map();
for (const r of prevRows) {
  prevMap.set(`${r.keys&#91;0]}||${r.keys&#91;1]}`, r);
}

const decayAlerts = &#91;];
const strikingDistance = &#91;];

for (const r of currentRows) {
  const &#91;query, page] = r.keys;
  const prev = prevMap.get(`${query}||${page}`);
  if (prev &amp;&amp; prev.clicks &gt;= 50 &amp;&amp; (r.clicks - prev.clicks) / prev.clicks &lt;= -0.2) {
    decayAlerts.push({ query, page, prevClicks: prev.clicks, currClicks: r.clicks });
  }
  if (r.position &gt;= 8 &amp;&amp; r.position &lt;= 20 &amp;&amp; r.impressions &gt;= 300) {
    strikingDistance.push({ query, page, pos: r.position.toFixed(1), impressions: r.impressions, ctr: (r.ctr * 100).toFixed(2) + '%' });
  }
}

return &#91;{ json: { decayAlerts: decayAlerts.slice(0, 10), strikingDistance: strikingDistance.slice(0, 15) } }];</code></pre>



<h2 id="step-4-deliver-reports-to-google-sheets-slack-or-ai-agents" class="wp-block-heading">Step 4: Deliver Reports to Google Sheets, Slack, or AI Agents</h2>



<p class="wp-block-paragraph">With your metrics cleanly structured by the Code node, branch the output into two automated destinations so both historical tracking and weekly team visibility run hands-free:</p>



<p class="wp-block-paragraph">• <strong>Append Historical Snapshots to Google Sheets:</strong> Use the native <strong>Google Sheets (Append Row)</strong> node to log weekly total clicks, impressions, average CTR, and top decaying URLs into a running audit tab for quarterly trend charts.</p>



<p class="wp-block-paragraph">• <strong>Post Formatted Digests to Slack, Telegram, or Email:</strong> Send a concise Markdown summary to your marketing Slack channel or Telegram bot highlighting top winners, &gt;20% traffic drops, and 5 quick-win keywords. If you want an AI assistant to draft specific title rewrites or inspect URLs on demand, combine this workflow with our <a href="https://blog.aveshost.com/google-search-console-mcp/">Google Search Console MCP guide</a> or our <a href="https://blog.aveshost.com/n8n-mcp-integration-guide/">n8n MCP integration tutorial</a>.</p>



<p class="wp-block-paragraph">Running n8n on your own <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">Aveshost Ubuntu VPS</a> (or deploying it via <a href="https://blog.aveshost.com/dokploy-vs-coolify/">Dokploy or Coolify</a>) keeps all OAuth tokens and Search Console analytics private on your own server with zero per-execution SaaS markups.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1264" height="848" src="https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-setup-checklist.webp" alt="6 steps to automate SEO reports in n8n covering Search Console API setup, siteUrl encoding, 3-day lag offset, 25,000-row pagination, delta computation, and output routing" class="wp-image-5972" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-setup-checklist.webp 1264w, https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-setup-checklist-300x201.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-setup-checklist-1024x687.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/gsc-api-n8n-setup-checklist-768x515.webp 768w" sizes="(max-width: 1264px) 100vw, 1264px" /></figure>



<h2 id="faq" class="wp-block-heading">Frequently asked questions</h2>


<div id="rank-math-faq" class="rank-math-block">
<div class="rank-math-list ">
<div id="faq-question-46f224823cdd4080bdbb8a1f1e576c1d" class="rank-math-list-item">
<h3 class="rank-math-question ">Does n8n have a built-in Google Search Console node?</h3>
<div class="rank-math-answer ">

<p>No, n8n does not ship a dedicated Google Search Console node out of the box. Instead, you connect to the official Search Console REST API (https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/searchAnalytics/query) using n8n&#8217;s native HTTP Request node with a Google OAuth2 API or Service Account credential.</p>

</div>
</div>
<div id="faq-question-d5bd301663b14b77a557ce0c4834aa8d" class="rank-math-list-item">
<h3 class="rank-math-question ">Why do I get a 404 or 403 error from the Search Console API in n8n?</h3>
<div class="rank-math-answer ">

<p>The two most common causes are forgetting to URL-encode the siteUrl in the request URL (for example, sc-domain:example.com must be written as sc-domain%3Aexample.com) or authenticating with a Google account or Service Account email that has not been added under Settings &gt; Users and permissions in Search Console.</p>

</div>
</div>
<div id="faq-question-9bafcce3014c42d285a821b9a8eb79a3" class="rank-math-list-item">
<h3 class="rank-math-question ">How do I handle Google Search Console&#x27;s data delay in automated n8n reports?</h3>
<div class="rank-math-answer ">

<p>Finalized Search Console metrics lag 2 to 3 days behind today&#8217;s date. Always offset your endDate by 3 days (today &#8211; 3 days) in an n8n Code node and set dataState to final in your JSON payload so weekly comparisons are never skewed by incomplete recent days.</p>

</div>
</div>
<div id="faq-question-7f00e4172ca546b6ae1066078d3e8758" class="rank-math-list-item">
<h3 class="rank-math-question ">How can I fetch more than 25,000 rows from the Search Console API in n8n?</h3>
<div class="rank-math-answer ">

<p>Each searchAnalytics/query call returns up to 25,000 rows. For large sites, use an n8n loop with the startRow parameter (starting at 0, then incrementing by 25000 on each iteration) until the API returns fewer than 25,000 rows.</p>

</div>
</div>
<div id="faq-question-d082c4f2c1ff4e89b69c30c94516d8df" class="rank-math-list-item">
<h3 class="rank-math-question ">Should I use OAuth2 or a Service Account for Google Search Console in n8n?</h3>
<div class="rank-math-answer ">

<p>OAuth2 with the webmasters.readonly scope is easiest for personal or agency accounts because it inherits all Search Console properties your Google user already owns. A Service Account is ideal for headless production servers where you want zero user token expiration—just remember to add the service account&#8217;s client_email as a Restricted user in each Search Console property.</p>

</div>
</div>
</div>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://blog.aveshost.com/automate-seo-reports-search-console-api-n8n/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
