Search Console API

How to pull and manage Google Search Console data with code — the Search Analytics, URL Inspection, Sitemaps, and Sites APIs, OAuth, quotas, and when to use BigQuery instead.

First published: Jun 23, 2026 · Last updated: Jul 18, 2026 · Advanced
demand #6 in Search Engine Tools#9 in Tools#184 in Technical SEO#249 on the site

The Google Search Console API is four REST APIs — Search Analytics (Performance data), URL Inspection (index status), Sitemaps, and Sites — all authorized with OAuth 2.0 and only returning data for properties you've verified. The Search Analytics API gives up to 25,000 rows per request (vs the UI's ~1,000), but it returns top rows only, so for large sites the bulk data export to BigQuery is the more complete path. URL Inspection is capped at 2,000 queries/day and 600/minute per property, which is the real ceiling on large-scale index monitoring.

TL;DR — The Search ConsoleA free Google service that reports how a site performs in Google Search and surfaces problems with how Google crawls, indexes, and serves it. It's first-party data straight from Google — but you don't need it to appear in results. API is four REST APIs under webmaster-tools/v1 — Search Analytics, URL InspectionA Google Search Console feature that reports how Google sees one specific URL on a property you own. By default it shows the last-indexed snapshot; a separate \"Test live URL\" mode fetches the current version., SitemapsA sitemap is a file that lists the pages, images, videos, and other files on your site so search engines can discover them. It helps discovery, but submitting a sitemap doesn't guarantee crawling or indexing., Sites — all OAuth 2.0, all scoped to verified properties only. Search Analytics returns 1–25,000 rows per request (default 1,000) but “does not guarantee to return all data rows but rather top ones,” so for completeness at scale you graduate to the BigQuery bulk data exportGSC BigQuery export (bulk data export) is a Google Search Console feature that schedules a daily, unsampled export of a property's Performance data into a Google Cloud BigQuery project — bypassing the UI's ~1,000-row export cap and its rolling ~16-month retention window. It doesn't backfill and still excludes anonymized queries at the query level.. URL Inspection is hard-capped at 2,000 QPD / 600 QPM per site — that arithmetic is what gates large-scale indexStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed. monitoring.

Evidence for this claim The Search Console API exposes Search Analytics, Sitemaps, Sites, and URL Inspection operations. Scope: Current Search Console API surface. Confidence: high · Verified: Google Developers: Search Console API Evidence for this claim Search Analytics results are bounded by API quotas and may omit some rows; the API does not guarantee every data row. Scope: Current Search Analytics query behavior and quotas. Confidence: high · Verified: Search Console API: Search Analytics query

The four APIs at a glance

Google’s own framing of what the API does: it lets you “view, add, or remove properties and sitemapsA sitemap is a file that lists the pages, images, videos, and other files on your site so search engines can discover them. It helps discovery, but submitting a sitemap doesn't guarantee crawling or indexing., run advanced queries for Google Search results data for the properties that you manage in Search ConsoleGoogle's free tool for monitoring crawling, indexing, and search performance., and test individual pages.” That maps cleanly onto the four resources, all under webmaster-tools/v1:

  • Search Analytics API — the Performance reportThe Google Search Console report that shows how your site actually performed in Google Search, built from real impressions and clicks. It reports four metrics — clicks, impressions, average CTR, and average position — and keeps the most recent 16 months of data., programmatically: clicks, impressions, CTR, position by dimension (query, page, country, device, search appearance, date, hour).
  • URL Inspection API — the index status of a single URL, the programmatic sibling of the URL Inspection toolA Google Search Console feature that reports how Google sees one specific URL on a property you own. By default it shows the last-indexed snapshot; a separate \"Test live URL\" mode fetches the current version..
  • Sitemaps API — list, get, submit, and delete sitemaps.
  • Sites API — list, add, and remove verified properties.

It exposes much of what you already use in the interface — the Performance report and the URL Inspection tool — as endpoints you can script against. It isn’t a 1:1 mirror, though: the API doesn’t guarantee full UI parity (URL Inspection’s live test, for instance, is UI-only — see below), and neither API access nor automation on its own guarantees indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed., rankings, traffic diagnosis, or AI-search visibility.

Auth: OAuth 2.0, two scopes, verified properties only

There’s no API key. Every call is OAuth 2.0 — Google is explicit that “all requests to the Google Search ConsoleA free Google service that reports how a site performs in Google Search and surfaces problems with how Google crawls, indexes, and serves it. It's first-party data straight from Google — but you don't need it to appear in results. API must be authorized by an authenticated user.” You register an app in Google Cloud, request a scope, and get a short-lived access tokenA token is the smallest unit of text (or image/audio/video) an LLM processes — roughly 4 characters, or about ¾ of an English word. A context window is the maximum number of tokens (input plus output) a model can hold at once, like its short-term memory.. Two scopes exist:

  • https://www.googleapis.com/auth/webmasters — read/write.
  • https://www.googleapis.com/auth/webmasters.readonly — read-only.

For server-to-server automation (a nightly reporting job, an index monitor) you grant a service account access to the property and skip the interactive consent flow.

Two property-identifier formats matter here too: a URL-prefix property is passed as a full property URL (Google’s own example is http://www.example.com/), and a Domain property uses the sc-domain:example.com form — you have to pass whichever form matches how the property is verified in Search Console. Either way, the service account (or user) needs to be granted access to that exact property; it’s not a bypass for ownership or a blanket grant across every property on the account.

And the gate that trips everyone up: “You must have appropriate access (owner, full, read) to any Google Search Console account that you wish to access using the API.” Call the API for a property you’re not verified on and it returns nothing — not an error you’ll necessarily notice, just empty data.

Search Analytics API — the Performance report, at scale

Start with the ceiling, not the convenience: Google’s own caveat is that “The API is bounded by internal limitations of Search Console and does not guarantee to return all data rows but rather top ones.” PaginationPagination splits a large set of content — product listings, blog archives, search results — across multiple sequentially numbered URLs. For SEO, each paginated page should be crawlable, indexable, and self-canonical; Google no longer uses rel=prev/next, but Bing still does. extends how far you can page into that top-rows list — it doesn’t remove the ceiling. When you need every row, that’s the cue to reach for BigQuery bulk export (below), not a bigger rowLimit.

Within that ceiling, this is still the one most people come for. The reason it beats the interface is the rowLimit parameter: “[Optional; Valid range is 1–25,000; Default is 1,000].” The interface export caps near 1,000 rows; the API gives you up to 25,000 per request, and you paginate past that with startRow. On a site with a long tail of queries, that’s the difference between seeing the top of your data and seeing more of it — still not all of it.

Two more things shape what comes back. First, dataState controls freshness: final (the default) returns only finalized data, all includes fresh, recently collected data, and hourly_all gives hourly breakdowns that are explicitly partial — the response metadata flags a first_incomplete_date or first_incomplete_hour, and Google notes values after that point can still change. Second, Search Analytics quotas aren’t a single number: the usage limits page splits them into load limits (a resource-based allowance measured in 10-minute and 1-day chunks — wider date ranges, more dimensions, and heavier filtering all draw it down faster) and the QPS/QPM/QPD request-rate limits covered below. You can hit the load ceiling before you hit the request-rate ceiling.

URL Inspection API — and the quota that actually constrains you

The URL Inspection API “view[s] the indexed, or indexable, status of the provided URL. Presently only the status of the version in the Google index is available; you cannot test the indexability of a live URL.” That last clause is a real scope limit, not a technicality: the interface’s URL Inspection tool can run a live test against the page as it exists right now; the API can only report on the version Google already has indexed. Use the API to build index-coverage monitoring across many URLs — not as a substitute for the UI’s live test.

Here’s where the math matters. Per site, you get 2,000 queries per day and 600 per minute. (Per project the ceiling is far higher — 10,000,000/day and 15,000/minute — but the per-site cap is what bites.) If you want to monitor the index status of a 50,000-URL site, you can’t inspect them all in a day; you batch and schedule across days, or you prioritize. Few posts do this arithmetic, and it’s the single biggest planning constraint on large-scale index monitoring.

By contrast, Search Analytics is generous — 1,200 QPM per site and per user — and the other resources (Sitemaps, Sites) sit at 20 QPS / 200 QPM per user. URL Inspection is the tight one.

Sitemaps and Sites APIs

The Sitemaps API is the management layer for your sitemaps: it “submits a sitemap for a site,” “deletes a sitemap from this site,” “retrieves information about a specific sitemap,” and “lists the sitemaps-entries submitted for this site, or included in the sitemap indexA sitemap index is a sitemap of sitemaps — a single file that lists your other sitemap files instead of listing URLs directly. It's how large sites stay under the 50,000-URL / 50MB-per-sitemap limit while submitting just one file. file.” The sitemap resource it returns includes fields like path, lastSubmitted, isPending, isSitemapsIndex, lastDownloaded, warnings, errors, and a contents array — handy for auditing sitemap health at scale.

The Sites API lists, adds, and removes verified properties — useful if you manage many properties and want to provision or audit them programmatically.

When to use BigQuery bulk export instead

For large sites, the API’s 25,000-rows-per-request, top-rows-only model becomes a ceiling. Google’s answer isn’t a fifth API resource that returns the same shape of data — it’s a separate, scheduled export pipeline: the bulk data export to BigQuery. Think of the choice as pull vs. scheduled push, not “API A vs. API B.” Google’s own framing: “Schedule a daily export of your Search Console performance data to BigQuery, where you can run complex queries over your data or export it to an external storage service. Using the bulk data export feature, you’ll see all the performance data available to Search Console for your property, with the exception of anonymized queries.”

That’s the decision rule:

  • Interface export — ~1,000 rows, quick one-off look.
  • Search Analytics API — up to 25,000 rows/request, paginate, scriptable; great for moderate on-demand pulls and dashboards.
  • BigQuery bulk export — all available performance data, daily, no row cap; the right tool once you’ve got tens of thousands of pages or queries.

The one thing none of them give you is anonymized queries — the terms Google hides for privacy. That’s a real gap, not a bug you can work around. I know the scale of it firsthand: as Ahrefs’ Brand Ambassador I helped surface a study where we pulled all the data available from the API across a very large sample of sites and found Google hides the keyword term on a large share of clicks. We later built that into Ahrefs Rank Tracker — full history of your GSC data, the percent of clicks going to anonymized queries, and a custom CTR curve built from your own numbers. When someone tells you the API returns “all your data,” that anonymized slice is the honest asterisk.

Common use cases

  • Automated reporting — scheduled pulls into Sheets or a warehouse.
  • BI dashboards — Looker Studio or BigQuery on top of the Performance data.
  • Large-scale index/coverage monitoring — URL Inspection, batched within the 2,000/day quota.
  • CTR curve building — model expected CTR by position from your own data.
  • Anomaly alerting — flag click/impression drops automatically.

This is also how third-party tools work: when Ahrefs or a Looker Studio connector “integrates Search Console,” they’re calling these same APIs (and increasingly, the BigQuery export) on your behalf.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.