Search Console API

No Comments
Search console api

What the Search Console API is

The Search Console API is the programmatic way into your Google Search Console data — pull search performance, inspect URLs, and manage sitemaps with code instead of clicking around the web UI. Once your reporting outgrows the dashboard's 1,000-row export cap, the API is how you actually get at everything.

It matters because the web interface hides most of your data. Search Analytics in the browser caps exports; the API lets you page through far more, join it with other datasets, and automate the whole thing on a schedule. The catch is the quotas — hit them blindly and your jobs fail.

The three APIs and their limits

"The Search Console API" is really three distinct APIs, each with its own quotas. Knowing them up front saves you from writing code that dies on the first big pull.

APIWhat it doesKey limits
Search Analytics APIClicks, impressions, CTR, position by query / page / country / device / date~16 months of data; up to 25,000 rows per request via pagination
URL Inspection APIIndex status, coverage, and mobile-usability for a single URL2,000 queries per day, 600 per minute, per property
Sitemaps APIList, submit, and delete sitemaps programmaticallyStandard project quotas; low volume in practice

The two that bite people: Search Analytics only retains 16 months, so if you want year-over-year trends you have to export and store the data yourself before it ages out. And URL Inspection is capped at 2,000 URLs per property per day — fine for spot checks, not for inspecting a million-URL site in one go.

A real request: pulling top queries

Here's a Search Analytics query using the Python client. It asks for the top queries by clicks over a date range.

from googleapiclient.discovery import build

service = build('searchconsole', 'v1', credentials=creds)

request = {
    'startDate': '2024-01-01',
    'endDate':   '2024-03-31',
    'dimensions': ['query'],
    'rowLimit':  25000,      # max rows per request
    'startRow':  0           # bump by 25000 to paginate
}

response = service.searchanalytics().query(
    siteUrl='https://example.com/', body=request
).execute()

for row in response.get('rows', []):
    print(row['keys'][0], row['clicks'], row['impressions'])

To get more than 25,000 rows, you re-run the same request with startRow advanced by 25,000 until a response comes back with no rows. That pagination loop is the whole trick to escaping the UI's export limit. Full walkthrough in the Search Console API data extraction guide.

How to get started with the API

  1. Create a Google Cloud project and enable the Search Console API and (if needed) the URL Inspection API.
  2. Set up credentials. Use a service account for automation or OAuth for user-facing apps. Note the auth email — it needs access to the property.
  3. Grant the credential access to your Search Console property as at least a restricted user, or it'll return empty data.
  4. Make a test Search Analytics call with a small date range to confirm auth works before building anything.
  5. Add pagination. Loop startRow by 25,000 to pull complete datasets past the per-request cap.
  6. Store the data. Because Search Analytics only keeps 16 months, dump results to a database or warehouse so you build history over time.

Common mistakes and how to fix them

  • Not paginating. You grab the first 25,000 rows and assume that's everything. Fix: loop startRow until you get an empty response.
  • Ignoring the 16-month window. You try to pull three years of history and get nothing older than 16 months. Fix: export continuously and warehouse it yourself.
  • Blowing the URL Inspection quota. Firing off 50,000 inspections crashes into the 2,000/day limit. Fix: batch across days or prioritize your most important URLs. See using the URL Inspection API to monitor indexing at scale.
  • Wrong siteUrl format. Domain properties use sc-domain:example.com; URL-prefix properties need the exact protocol and trailing slash. Fix: match the property type exactly or you get 403s.
  • Data sampling surprises. Very high-cardinality dimension combos can return sampled data. Fix: keep dimension sets tight and reconcile totals against the UI.

Frequently asked questions

How far back does the Search Analytics API go?

About 16 months, the same window as the Search Console UI. If you need longer history, you have to pull the data regularly and store it yourself — Google won't backfill beyond that window.

How many URLs can I inspect per day?

The URL Inspection API allows 2,000 queries per day and 600 per minute, per property. For large sites, prioritize your key URLs or spread inspections across multiple days.

How do I get more than 1,000 rows?

The 1,000-row cap is a UI-export limit, not an API limit. The Search Analytics API returns up to 25,000 rows per request, and you paginate with startRow to pull the full dataset.

Do I need coding skills to use it?

To call it directly, yes — typically Python or another language with a Google client library. If you'd rather not code, tools and connectors can wrap it, but understanding the quotas above still saves you grief. The Google Search Console UI covers most one-off needs without any code.

What's the difference between the API and the UI?

Same data, different access. The UI is point-and-click but caps exports at 1,000 rows and offers no automation. The API unlocks larger pulls, scheduling, and integration with other data — at the cost of setup and respecting quotas.

Claude Vincent is a technical SEO consultant focused on crawlability, rendering, and AI-search visibility. He writes the field guides and case studies at SEO ProCheck, with a bias toward the durable, unglamorous work that decides whether search engines and AI answer engines can actually read and cite a site.

About SEO ProCheck

Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.

Work With Me

Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.

Subscribe to our newsletter!

More from our blog