
Google Search Console API: what it returns, limits and an example
A developer's guide to the Google Search Console API: the Search Analytics query, dimensions, filters, row limits, quotas, data freshness and a sample request.
On this page
The Google Search Console API gives you the performance report as data: clicks, impressions, CTR and average position for your own site, grouped by query, page, date, country, device or search appearance. Almost all of that comes from one method, searchanalytics.query. It is free, read access needs one OAuth scope, and it returns far more rows than the 1,000 the web interface shows.
This guide covers what the method returns, the dimensions and filters, row limits, quotas, how fresh the data is, why query rows never sum to the totals, and when an MCP server is the shorter route for an agent.
What the Google Search Console API returns
The API has a handful of resources (sites, sitemaps, URL inspection, Search Analytics). For SEO work the one that matters is Search Analytics, documented in Google's query reference.
You send a date range and a list of dimensions. You get back rows, each with:
keys: the dimension values for the row, in the order you asked for themclicksandimpressionsctr: a fraction from 0 to 1, not a percentageposition: the average position
With no dimensions, everything collapses into one row of totals. Rows are sorted by clicks, descending, unless you group by date, in which case they come oldest first. You cannot choose another sort order, so sorting by impressions means fetching the rows and sorting them yourself.
What it does not return: search volume, competitors, or anything about queries your site does not appear for. It is a record of your own results.
A minimal Search Console API request
The endpoint is a POST to the property's URL-encoded identifier. A domain property is sc-domain:example.com. A URL-prefix property is the full URL with its trailing slash.
curl -X POST \
"https://www.googleapis.com/webmasters/v3/sites/sc-domain%3Aexample.com/searchAnalytics/query" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"startDate": "2026-11-01",
"endDate": "2026-11-28",
"dimensions": ["query", "page"],
"type": "web",
"rowLimit": 25000,
"startRow": 0
}'
The token needs the https://www.googleapis.com/auth/webmasters.readonly scope, and the Google account behind it needs access to the property. The response (example data):
{
"rows": [
{
"keys": ["free invoice template", "https://example.com/invoice-template"],
"clicks": 412,
"impressions": 96420,
"ctr": 0.004273,
"position": 12.8
},
{
"keys": ["invoice template word", "https://example.com/invoice-word"],
"clicks": 388,
"impressions": 71180,
"ctr": 0.005451,
"position": 11.4
}
],
"responseAggregationType": "byPage"
}
Start and end dates are inclusive and in Pacific Time. Pages come back as full URLs.
Dimensions and filters
Dimensions you can group by: date, hour, query, page, country, device and searchAppearance. Google sets no limit on how many you combine, but each can appear only once. Days with no data are omitted from the response, not returned as zeros.
Search type is the type field: web (the default), image, video, news, discover, googleNews and webMultimodal. Each is a separate data set and needs its own request.
Filters go in dimensionFilterGroups. Each filter has a dimension, an operator and an expression:
| Operator | Behavior |
|---|---|
equals, notEquals |
Exact match, case-sensitive for page and query |
contains, notContains |
Substring match, not case-sensitive |
includingRegex, excludingRegex |
RE2 regular expression |
Things the reference spells out that are easy to trip over:
- Only
andis supported for combining filters in a group. For "this or that" on a query or page, use a regex. - Countries are three-letter ISO 3166-1 alpha-3 codes (
USA, notUS). Devices areDESKTOP,MOBILEandTABLET. - A filter expression can be at most 4,096 characters, which caps how long a regex of alternatives can get.
searchAppearancecannot be requested alongside other dimensions. Google's guide describes a two-step approach: list the appearance types first, then filter by one.
Aggregation is aggregationType: auto, byPage or byProperty. By property, two of your pages showing for one search count as one impression at the topmost position. By page, each URL is counted on its own. If you group or filter by page you cannot aggregate by property. This is the same distinction the web report makes, covered in the guide to Search Console for SEO.
Row limits and quotas
Every number here is from Google's documentation as of December 2026.
Rows per request. rowLimit accepts 1 to 25,000 and defaults to 1,000. Page by raising startRow in steps of 25,000 until a response comes back with no rows.
Rows per day of data. Google's guide to getting all your data states that the method exposes a maximum of 50,000 rows of data per day per search type, sorted by clicks. The reference adds that the API does not guarantee every row, only the top ones. So the reliable pattern for a full export is the one Google recommends: one request per day of data, per search type, paged to the end.
Quotas. From the usage limits page:
| Scope | Search Analytics limit |
|---|---|
| Per site | 1,200 queries a minute |
| Per user | 1,200 queries a minute |
| Per project | 40,000 queries a minute, 30,000,000 a day |
There is also a load quota, measured in 10-minute and 1-day windows, that depends on how expensive your queries are. Google says queries are expensive when they group or filter by page or query, most of all by both, and that load grows with the date range. Every quota failure returns the same "quota exceeded" error. Google's advice for the short-term limit is to wait 15 minutes and spread requests out.
In practice, a backfill of 16 months by query and page hits the load quota long before the per-minute numbers. Request one day at a time and back off when you get the error.
Data freshness and history
Google says data is typically available after 2 to 3 days. The dataState field controls what you get:
final(the default): only finalized data.all: includes fresh data that is still being collected. When grouped by date, the response metadata carriesfirst_incomplete_dateso you know where the provisional days start.hourly_all: for use with thehourdimension.
If you store rows, plan to re-fetch the last few days. A day pulled with all will have different numbers once it is final.
History is limited by Search Console itself, which keeps the last 16 months. The API cannot reach further back. If you want two years of trend, the only way is to have been saving it.
Why the query rows do not add up to the totals
Run a request with no dimensions, then one grouped by query, and sum the second. It will be lower. Two causes, both documented.
Anonymized queries. Google omits queries that "aren't issued by more than a few dozen users over a two-to-three month period" to protect the searcher's privacy. They are counted in the totals and left out of query rows. Filtering by query drops them from the totals as well. Google walks through an example in its performance data deep dive.
Dropped detail. Google's guide says that when you group by page or query, the system "may drop some data" to compute results in reasonable time, and that for accurate counts you must omit the page and query dimensions.
The design that follows: keep two sets of rows. Fetch daily totals with only the date dimension and treat those as the truth for clicks and impressions. Fetch query and page rows separately and treat them as the detail, knowing they are a subset. Never report a sum of query rows as the site's traffic.
When an MCP server is the easier route for an agent
Calling the API from a script is straightforward. Giving a coding agent useful access to it is more work than it looks:
- An OAuth client, consent screen, and refresh tokens to store and rotate
- Paging, backoff on quota errors, and one request per day for a full pull
- Somewhere to keep rows, or the agent re-fetches the same months every session and loses anything past 16 months
- The totals-versus-rows distinction, handled correctly every time the agent sums something
- Output the model can read without burning its context on raw JSON
An MCP server moves all of that out of the agent's way. AgentGrown is one: you sign in with Google once, it syncs each property's query, page and day rows (the full 16 months, then each new day), and the agent asks questions through tools. gsc_query reads the stored rows, with time-only groupings read from property totals so they match the Search Console interface. gsc_live passes a request through to the API for what is not stored: country, device, search appearance, regex filters and fresh data. The same agent also gets GA4 by landing page, which the Search Console API cannot give it. There is more on the trade-offs in Search Console MCP, and every tool's inputs are in the docs.
A call returns a table, not JSON (example data):
# gsc_query · example.com · 2026-11-01 → 2026-11-28 · data through 2026-11-28
| query | page | clicks | impressions | ctr | position |
| --------------------- | ----------------- | -----: | ----------: | ---: | -------: |
| free invoice template | /invoice-template | 412 | 96,420 | 0.4% | 12.8 |
| invoice template word | /invoice-word | 388 | 71,180 | 0.5% | 11.4 |
Rows: 2 of 38 shown
Build on the API directly when you want the raw rows in your own warehouse or are building a product on them. Use an MCP server when the goal is for an agent to answer questions such as which page to fix first while it is already in your repo.
What the API cannot tell you: demand
The Search Console API only knows queries you already appear for. Impressions tell you how often you were shown, which undercounts demand for anything you rank poorly for, and says nothing about phrases you do not rank for at all.
So for the question "what should this page target", Search Console data is half the answer. The other half is search volume from Google keyword data, which is a different source. Checking both before writing is the keyword demand use case:
With AgentGrown, the keyword tools return Google Ads search volume (US, English) in the same session as the Search Console rows, so the agent can see that a query has 40 impressions for you and thousands of searches a month, or the reverse. The keyword research guide covers how to use that before a page gets written, and Search Console vs Google Analytics covers the third data set, what visitors do after the click.
Questions
Is the Google Search Console API free?
Yes. There is no charge for the API. Use is limited by quotas instead: Google's documentation lists 1,200 Search Analytics queries a minute per site and per user, plus load limits on expensive queries.
How many rows can the Search Console API return?
Up to 25,000 rows per request, with a default of 1,000. You page with startRow. Google also documents a ceiling of 50,000 rows of data per day per search type, sorted by clicks.
How fresh is Search Console API data?
Google says data is typically available after 2 to 3 days. Setting dataState to all includes fresh data that is still being collected and can change.
Why don't the query rows add up to the total?
Google leaves anonymized queries out of query-level rows to protect privacy, and may drop some data when you group by page or query. A request with no page or query dimension returns the accurate totals.
Does the Search Console API return search volume?
No. It returns your own site's clicks, impressions, CTR and position. Impressions show how often you were displayed, not how often a keyword is searched, and you get nothing for queries you do not appear for.
How far back can the Search Console API go?
Search Console keeps the last 16 months of data, and the API reads from the same store. To keep more, query each day and save the rows yourself.
Keep going. Keyword demand
Use caseKeyword search volume: how to check it before you writeKeyword search volume is how often a phrase is searched each month. How to check it, what Google's numbers really mean, and how to pick the phrase to target.
ComparisonSemrush MCP: what it exposes, which plan you need, and how it comparesWhat the Semrush MCP server is, the data and tools it exposes, the plan and API units it needs, and how it differs from an MCP server on your own data.
ComparisonAhrefs MCP: what it exposes, which plan you need, and how it comparesWhat the Ahrefs MCP server is, the data it exposes, the plan, API units and row limits it needs, and how it differs from an MCP server on your own data.
Free toolKeyword traffic calculatorWhat ranking for a keyword is worth in clicks, conversions and revenue.