Google Search Console icon

Google Search Console

Connect to Google Search Console API

Overview

The node connects to the Google Search Console API to compare search analytics data for a specified website between two date ranges. It allows users to analyze how key metrics such as clicks, impressions, click-through rate (CTR), and average position have changed over time for different dimensions like page, query, or date.

This operation is useful for SEO professionals and webmasters who want to track performance trends, evaluate the impact of changes on their site, or identify opportunities by comparing historical periods. For example, you can compare last month’s page performance against the previous month or the same period last year to understand growth or decline in search traffic.

Properties

Name Meaning
Filters Add one or more filter groups similar to the Search Console UI. Each filter group consists of filters on dimensions (query or page) with operators like equals, contains, regex matching, etc. Groups are ANDed together.
Site URL Mode Choose whether to pick the verified site URL from your list or enter it manually.
Site URL The verified site URL selected from your Google Search Console verified sites (shown if "Pick from My Verified Sites" mode is chosen).
Site URL (Manual) Manually enter a verified property URL, supporting full URLs (e.g., https://example.com/) or domain properties (e.g., sc-domain:example.com).
Date Range A Select a preset date range (last 7 days, last 28 days, last 3 months, last 12 months) or custom start/end dates for the first comparison period.
Start Date A Custom start date for Date Range A (only shown if Date Range A is set to custom).
End Date A Custom end date for Date Range A (only shown if Date Range A is set to custom).
Compare Mode Choose how to define the second comparison period: previous period (immediately before Date Range A), previous year (year-over-year), or custom.
Date Range B Select a preset or custom date range for the second comparison period (only shown if Compare Mode is custom).
Start Date B Custom start date for Date Range B (only shown if Compare Mode and Date Range B are custom).
End Date B Custom end date for Date Range B (only shown if Compare Mode and Date Range B are custom).
Row Limit (per range) Maximum number of rows to retrieve per date range (between 1 and 25,000). Defaults to 1000.
Search Type The type of search results to analyze: Web, Image, Video, or News.
Dimensions One or more dimensions to group the data by: Date, Page, Query. Defaults to Page.

Output

The output is an array of JSON objects where each object represents a unique combination of the selected dimensions with metrics for both date ranges and their differences:

  • Keys corresponding to the selected dimensions (e.g., page, query, date) with their values.
  • Metrics suffixed with _a for Date Range A and _b for Date Range B:
    • clicks_a, clicks_b, clicks_diff
    • impr_a (impressions), impr_b, impr_diff
    • ctr_a (click-through rate), ctr_b, ctr_diff
    • pos_a (average position), pos_b, pos_diff
  • Metadata fields:
    • range_a and range_b: Objects describing the start and end dates of each range.
    • compare_mode: The comparison mode used (prevPeriod, prevYear, or custom).

Each output item is paired with the input item index for traceability.

No binary data is output by this node.

Dependencies

  • Requires a valid OAuth2 API authentication token with access to the Google Search Console API.
  • The node uses the Google Search Console API endpoints:
    • https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/searchAnalytics/query for querying analytics data.
    • https://searchconsole.googleapis.com/v1/urlInspection/index:inspect for URL inspection (not used in this operation).
  • The user must have verified ownership of the site in Google Search Console.
  • n8n credentials must be configured with appropriate permissions to access the Google Search Console API.

Troubleshooting

  • No site selected or invalid site URL: The node throws an error if no site is selected or if the site URL does not start with http://, https://, or sc-domain:. Ensure the site URL is correct and verified in Google Search Console.
  • At least one dimension required: If no dimension is selected for comparison, the node will throw an error. Always select at least one dimension (Date, Page, or Query).
  • API quota limits: Large row limits may cause API quota issues or slow responses. Reduce the row limit if you encounter timeouts or quota errors.
  • Invalid date ranges: Custom date ranges must be valid ISO date strings. Invalid or missing dates when using custom ranges will cause errors.
  • Filters syntax: Filters must be properly formatted; incorrect expressions or unsupported dimensions/operators may lead to empty results or errors.
  • OAuth token issues: Authentication failures usually indicate expired or misconfigured OAuth credentials. Re-authenticate or check permissions if requests fail.

Links and References


If you need further details about other operations or resources, feel free to ask!

Discussion