GSC API and Bulk Data Export: The Complete 2026 Guide

A technical guide to using the Google Search Console API v2 for bulk data export, automation, and custom dashboarding in 2026.

Dilshad Akhtar
Dilshad Akhtar
Published: 29 July 2026
4 min read
TL;DRAI summary
  • The GSC API uses OAuth 2.0 for authentication.
  • The API returns a maximum of 25,000 rows per request with 50,000 rows per export cap.
  • The GSC API integrates natively with Google Sheets via Apps Script, or with any BI tool Looker Studio, Tableau, Grafana through the API connector.
  • Common API errors and how to handle them: 403 Access Not Configured : The API is not enabled in Google Cloud Console 429 Rate Limit Exceeded ...
  • Monthly, run a programmatic audit that exports 90 days of search analytics data and checks for anomalies: any query with a greater than 50 percent...

The Google Search Console API v2 enables programmatic access to your property data, supporting bulk exports, automated monitoring, and custom dashboard integrations. This guide covers authentication, endpoint usage, rate limits, and practical code examples for building a production data pipeline...

Authentication and Setup

The GSC API uses OAuth 2.0 for authentication. To get started:

  1. Create a project in the Google Cloud Console
  2. Enable the Google Search Console API
  3. Configure the OAuth consent screen
  4. Create credentials (OAuth 2.0 Client ID or Service Account)

For server-to-server automation, a service account is preferred. Create a service account in Google Cloud, download the JSON key file, and add the service account email as a user in your GSC property under Settings > Users and Permissions with at least "Full User" role.

As of 2026, the API supports both Domain and URL prefix property types. Properties are identified using the full property URL as the siteUrl parameter (e.g., sc-domain:example.com for domain properties, https://example.com/ for URL prefix properties).

Core Endpoints

Search Analytics (`searchanalytics.query`)

The most commonly used endpoint for performance data. Request parameters include:

  • startDate and endDate (YYYY-MM-DD format, up to 16 months of history)
  • dimensions array: query, page, country, device, searchAppearance
  • dimensionFilterGroups: Filter by dimension values
  • rowLimit: Max rows per request (up to 25,000)
  • startRow: Pagination offset
# Python example using google-api-python-client
from google.oauth2 import service_account
from googleapiclient.discovery import build

SCOPES = ['https://www.googleapis.com/auth/webmasters.readonly']
SERVICE_ACCOUNT_FILE = 'path/to/service-account-key.json'

credentials = service_account.Credentials.from_service_account_file(
    SERVICE_ACCOUNT_FILE, scopes=SCOPES)
service = build('searchconsole', 'v1', credentials=credentials)

request = {
    'startDate': '2026-05-01',
    'endDate': '2026-06-01',
    'dimensions': ['query', 'page', 'device'],
    'rowLimit': 25000,
}
response = service.searchanalytics().query(
    siteUrl='sc-domain:example.com', body=request).execute()

Sitemaps (`sitemaps.list`, `sitemaps.get`)

List all submitted sitemaps and their processing status. Returns contents, errors, warnings, isPending, isSitemapsIndex, lastDownloaded, and lastSubmitted.

URL Inspection (`urlInspection.index.inspect`)

Programmatically inspect URL index status. Returns the same inspectionResult object as the UI, including indexStatus, mobileUsability, richResults, and amp sub-objects.

Sites (`sites.list`, `sites.get`)

List all properties accessible to the authenticated account and get property-level data.

Bulk Data Export Strategy

The API returns a maximum of 25,000 rows per request with 50,000 rows per export cap. For comprehensive exports, implement the following strategy:

Pagination

Use startRow to paginate through results. Note that the API may return fewer rows than requested if the data exceeds internal processing limits. Always check responseAggregationType in the response to understand if sampling was applied.

Sampling Awareness

The API applies sampling for large data sets, similar to the UI. The responseAggregationType field (values: AUTO, BY_IMPRESSION_COUNT, BY_PROPERTY, BY_DATE) indicates whether the data was sampled. For unsampled data, use shorter date ranges and fewer dimensions per request.

Parallel Requests

The API supports up to 2,000 queries per property per day as of 2026. For bulk exports spanning 16 months, split the date range into weekly chunks and issue requests in parallel using async HTTP clients (e.g., aiohttp or asyncio in Python). Respect the 2000-query daily limit by calculating your chunk count up front.

Building a Custom Dashboard

The GSC API integrates natively with Google Sheets via Apps Script, or with any BI tool (Looker Studio, Tableau, Grafana) through the API connector. A recommended pipeline:

  1. Export layer: Python script running on a cron job (daily) that queries the API and writes raw JSON to a data lake (BigQuery, S3, or local filesystem)
  2. Transform layer: SQL or Pandas transformations that normalize the data, join with CRM or CMS metadata
  3. Visualization layer: Looker Studio dashboard with scheduled refresh, pulling from BigQuery

Error Handling

Common API errors and how to handle them:

  • 403 (Access Not Configured): The API is not enabled in Google Cloud Console
  • 429 (Rate Limit Exceeded): Back off with exponential backoff (start with 2-second delay, double on each retry)
  • 400 (Invalid Property): The siteUrl format is incorrect. Use sc-domain:example.com for domains or https://example.com/ for URL prefixes

Audit and Verification

Monthly, run a programmatic audit that exports 90 days of search analytics data and checks for anomalies: any query with a greater than 50 percent drop in impressions week-over-week should be flagged. Verify your API service account credentials have not expired and regenerate the key if it is within 30 days of expiration. Document the API response times and data completeness metrics. A healthy data pipeline exports data with zero 400 errors and completes within the daily quota limit. Archive all raw exports to a versioned storage bucket for historical trend analysis.

Ready to Build Your Dream Website?

Let's discuss your project and create something amazing together.