Google Search Console

Get data from Google Search Console API

Overview

This node integrates with the Google Search Console API to retrieve search performance data for websites. Specifically, the "Get Top Pages" operation fetches the top performing pages of a specified site within a given date range, including metrics such as clicks, impressions, click-through rate (CTR), and average position in search results.

Common scenarios where this node is beneficial include:

  • SEO analysis to identify which pages drive the most traffic.
  • Monitoring changes in page performance over time.
  • Reporting on search visibility and user engagement metrics.
  • Filtering results by search type (web, image, or video) to tailor insights.

For example, a digital marketer could use this node to pull the top 10 web pages from their site over the last month to analyze which content performs best and optimize accordingly.

Properties

Name Meaning
Site URL The full URL of the website to query, must end with a slash (/).
Date Range The period for which to retrieve data: includes Start Date and End Date (format YYYY-MM-DD).
Additional Options Extra parameters to customize the query:
- Row Limit: Maximum number of results to return (1–25000).
- Search Type: Filter results by type of search: Web, Image, or Video.

Output

The node outputs JSON data structured as follows:

  • siteUrl: The queried site URL.
  • dateRange: Object containing startDate and endDate used for the query.
  • totalRows: Number of rows returned by the query.
  • topPages: An array of objects representing each top page with these fields:
    • rank: Position in the list starting at 1.
    • page: The URL path of the page.
    • clicks: Number of clicks received.
    • impressions: Number of times the page appeared in search results.
    • ctr: Click-through rate as a percentage string (e.g., "12.34%").
    • position: Average position in search results (decimal).

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Google Search Console API.
  • The node uses the Google Search Console API endpoint https://www.googleapis.com/webmasters/v3.
  • Proper OAuth2 credentials and permissions must be configured in n8n to access the Google Search Console data.

Troubleshooting

  • Invalid Site URL: Ensure the site URL ends with a trailing slash (/) and matches a verified property in Google Search Console.
  • Date Range Issues: If no start or end date is provided, defaults are applied (last 30 days ending today). Invalid date formats may cause errors.
  • API Quotas and Permissions: Exceeding Google API quotas or lacking proper permissions will result in authentication or quota errors.
  • Empty Results: If no data is returned, verify that the site has indexed pages and sufficient search traffic in the specified date range.
  • Error Messages: Errors from the API are wrapped and thrown as node errors. Enabling "Continue On Fail" allows processing subsequent items even if one fails.

Links and References

Discussion