📈 Search ConsolePro Plan

GSC_TOP_QUERIES

Get top search queries from Google Search Console sorted by clicks.

Formula Signature
=GSC_TOP_QUERIES(startDate, endDate, [limit], [siteUrl])

Returns: 2D array with columns: Query, Clicks, Impressions, CTR, Position

Overview

GSC_TOP_QUERIES pulls your top-performing search queries directly from the Google Search Console API into Google Sheets. The function returns a comprehensive table of metrics including the query text, clicks, impressions, click-through rate (CTR), and average position for each keyword your site ranks for. Results are sorted by clicks in descending order, making it easy to identify which search terms drive the most traffic to your site.

Parameters

ParameterTypeRequiredDescription
startDatestringYesStart date in "YYYY-MM-DD" format or relative format like "-30d" for 30 days ago.
endDatestringYesEnd date in "YYYY-MM-DD" format or relative format like "-1d" for yesterday.
limitnumberNo (100)Maximum number of rows to return. Defaults to 100, max 25000.
siteUrlstringNoThe site URL property from Search Console. If omitted, uses the default connected property.

Examples

1

Last 30 days top queries

Retrieve the top 100 search queries from the last 30 days using relative date format.

fx
=GSC_TOP_QUERIES("-30d", "-1d")

Output

QueryClicksImpressionsCTRPosition
best project management tools1240185006.7%3.2
project management software980221004.4%5.1
free task manager870153005.7%4.8
2

Top 10 queries for a specific month

Get only the top 10 queries for January 2025.

fx
=GSC_TOP_QUERIES("2025-01-01", "2025-01-31", 10)

Output

QueryClicksImpressionsCTRPosition
online invoice generator2100310006.8%2.9
free invoice template1850284006.5%3.4
invoice maker1620258006.3%4.1
3

Full export for a specific property

Export up to 25,000 queries from the last 90 days for a specific Search Console domain property.

fx
=GSC_TOP_QUERIES("-90d", "-1d", 25000, "sc-domain:example.com")

Output

QueryClicksImpressionsCTRPosition
example product review5400820006.6%2.1
example vs competitor3200450007.1%3.5
buy example online2800380007.4%2.8
4

Last 7 days quick overview

Get a quick snapshot of the top 20 queries from the past week for a weekly review.

fx
=GSC_TOP_QUERIES("-7d", "-1d", 20)

Output

QueryClicksImpressionsCTRPosition
meal prep ideas34052006.5%4.2
healthy lunch recipes29048006.0%5.1
quick dinner recipes26541006.5%3.8

Use Cases

Digital Marketing

Weekly SEO Performance Report

Marketing agencies pull top queries weekly to track client keyword performance, identify ranking improvements, and report on organic search ROI in automated dashboards.

Content Publishing

Content Gap Analysis

Editorial teams analyze top queries to discover which topics drive the most search traffic and identify high-impression, low-CTR keywords that need better content or meta descriptions.

E-commerce

E-commerce Product Discovery

Online retailers monitor top search queries to understand how customers find their products, identify trending product searches, and optimize product page titles and descriptions.

SaaS

Competitor Keyword Benchmarking

SaaS companies export top queries monthly to compare against competitor keyword lists, identify market positioning opportunities, and inform paid search strategy.

Travel & Hospitality

Seasonal Trend Detection

Travel companies compare top queries across different time periods to identify seasonal search trends and plan content calendars around peak booking periods.

Pro Tips

TIP

Use relative dates like "-30d" and "-1d" to create dashboards that always show the latest data without needing to update date cells manually.

TIP

Combine with VLOOKUP or INDEX/MATCH against a previous period's export to calculate week-over-week or month-over-month changes in clicks and position.

TIP

Filter the results for queries where impressions are high but CTR is below 3% to find your best opportunities for improving title tags and meta descriptions.

TIP

Export 25,000 rows quarterly and use pivot tables to track long-tail keyword trends that may not appear in a shorter top-100 view.

TIP

If you manage multiple sites, use the siteUrl parameter to pull data for each property into separate tabs of the same spreadsheet for easy comparison.

This function is essential for SEO professionals who need to regularly monitor keyword performance without manually logging into Google Search Console. You can specify custom date ranges using standard date formats or convenient relative dates like "-30d" for the last 30 days or "-7d" for the past week. The optional limit parameter lets you control how many rows are returned, from a focused top-10 list to a comprehensive export of up to 25,000 queries.

By combining GSC_TOP_QUERIES with other spreadsheet formulas, you can build powerful SEO dashboards that automatically refresh with the latest data. Track week-over-week or month-over-month changes in keyword rankings, identify trending queries, and spot opportunities where you have high impressions but low CTR. The data returned matches exactly what you would see in the Search Console Performance report, but with the added flexibility of being inside a spreadsheet where you can sort, filter, pivot, and chart the data however you need.

Common Errors

NOT_AUTHORIZED: Access to Search Console property denied

Cause: The Google account connected to Unlimited Sheets does not have access to the specified Search Console property.

Fix: Ensure your Google account has at least "Full" permission on the Search Console property. Go to Search Console > Settings > Users and permissions to verify access. If using a domain property, make sure you have verified ownership.

INVALID_DATE: Start date must be before end date

Cause: The startDate is after the endDate, or one of the dates is in an invalid format.

Fix: Check that your dates are in "YYYY-MM-DD" format and that the start date comes before the end date chronologically. When using relative dates, remember that "-30d" means 30 days ago (earlier) and "-1d" means yesterday (later).

PROPERTY_NOT_FOUND: No Search Console property connected

Cause: No default Search Console property has been set and no siteUrl was provided.

Fix: Either provide the siteUrl parameter explicitly (e.g., "sc-domain:example.com") or connect a default property through the Unlimited Sheets Search Console sidebar (Extensions > Unlimited Sheets > Search Console).

Frequently Asked Questions

Google Search Console retains data for the last 16 months. You can use any date range within that window. Dates can be specified in "YYYY-MM-DD" format or as relative dates like "-30d" (30 days ago), "-7d" (7 days ago), or "-1d" (yesterday). The most recent data available is typically from 2-3 days ago due to Google's processing delay.

You can retrieve up to 25,000 queries per request by setting the limit parameter. The default is 100 if no limit is specified. For sites with more than 25,000 ranking queries, consider using GSC_QUERY with date dimension to split data across multiple date ranges.

Results are always sorted by clicks in descending order, showing your highest-traffic queries first. If you need a different sort order, you can use Google Sheets' SORT function on the returned data, for example =SORT(GSC_TOP_QUERIES("-30d", "-1d"), 5, TRUE) to sort by position ascending.

The siteUrl should match your Search Console property exactly. For domain properties use "sc-domain:example.com". For URL-prefix properties use the full URL like "https://www.example.com/". If omitted, the function uses the default property you connected during setup.

Minor discrepancies are normal and can occur due to data sampling, timezone differences, or rounding. The API data and the Search Console UI use the same underlying dataset, but aggregation methods may produce slightly different totals. For the most accurate comparison, ensure you are using the exact same date range and property.

Yes, GSC_TOP_QUERIES works with automated sheets and scheduled refreshes. However, be mindful of API quota limits if you have many formulas refreshing simultaneously. For dashboards with multiple GSC functions, consider using manual refresh triggers or staggering refresh times.

If there is no search performance data for the specified date range (for example, the site was not yet verified or had no impressions), the function returns an empty result with only the header row.

No, GSC_TOP_QUERIES returns only web search data by default. Google Discover and Google News have separate data types in the Search Console API. Use GSC_QUERY with appropriate search type filters if you need Discover or News data.

Related Functions

Start using GSC_TOP_QUERIES today

Install Unlimited Sheets to get GSC_TOP_QUERIES and 41 other powerful functions in Google Sheets.