---
title: "Google Search Console API"
description: "Access GSC performance data programmatically. Learn API limits, authentication, and query patterns for SEO automation."
canonical_url: "https://gscdump.com/learn-google-search-console/api"
last_updated: "2026-07-20"
---

The Google Search Console API lets you access search performance data programmatically (clicks, impressions, CTR, and average position) for any property [your Google Account can access](https://developers.google.com/webmaster-tools/v1/sites/list). It supports SEO automation, custom dashboards, and other reporting workflows.

## What the API Provides

The [Search Console API reference](https://developers.google.com/webmaster-tools/v1/api_reference_index) exposes four main resources:

- **Search Analytics:** Performance metrics broken down by dimensions such as query, page, country, device, date, and search appearance.
- **URL Inspection:** Index status, crawl information, canonical signals, and rich-results analysis for a specific URL. The response schema still contains a mobile-usability result, but [Google has deprecated that field](https://developers.google.com/webmaster-tools/v1/urlInspection.index/UrlInspectionResult#resource).
- **Sitemaps:** Submit, list, delete, and check sitemaps for a property.
- **Sites:** List properties available to the authenticated user, inspect the user's permission level, and add or remove a property from that user's Search Console property set.

## API vs UI Capabilities

Exports from [most Search Console reports](https://support.google.com/webmasters/answer/12919797?hl=en) are limited to 1,000 representative rows. The [Search Analytics API](https://developers.google.com/webmaster-tools/v1/how-tos/all-your-data) returns up to **25,000 rows per request** and exposes up to **50,000 rows per day per search type**, so large sites can retrieve more rows programmatically.

The API does not bypass Search Console's data processing rules. [Anonymized queries](https://support.google.com/webmasters/answer/17011259?hl=en) are omitted from dimensioned results, and Search Console [may drop rows](https://developers.google.com/webmaster-tools/v1/how-tos/all-your-data#why_do_i_lose_data_when_asking_for_more_detail) when you group by page or query. Request totals separately without those dimensions when you need the most complete aggregate counts.

## Common Use Cases

- **SEO dashboards:** Pull GSC data into your analytics stack and compare it with GA4, rank-tracker, or CMS data.
- **Scheduled reports:** Export daily metrics with a script and send updates without downloading reports by hand.
- **AI-assisted analysis:** Give search performance data to an AI tool for tasks such as finding content gaps or pages worth updating.
- **Large-site exports:** For sites with more than 1,000 report rows, the API exposes more data than a report export. Search Console's [BigQuery bulk export](https://support.google.com/webmasters/answer/12917675?hl=en) is another option for ongoing, high-volume exports.
- **Historical archives:** Export the available [16 months of Search Console data](https://developers.google.com/search/docs/monitor-debug/debugging-search-traffic-drops#change_date_range) into your own storage before it rolls out of the reporting window.

## First Request

```typescript
// Fetch last 7 days of clicks/impressions by query
const siteUrl = 'sc-domain:example.com' // or 'https://example.com/'
const response = await fetch(
  `https://searchconsole.googleapis.com/webmasters/v3/sites/${encodeURIComponent(siteUrl)}/searchAnalytics/query`,
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      startDate: '2026-07-01',
      endDate: '2026-07-07',
      dimensions: ['query'],
      rowLimit: 25000
    })
  }
)

if (!response.ok) {
  throw new Error(`Search Console API error: ${response.status} ${await response.text()}`)
}

const data = await response.json()
console.log(data.rows ?? []) // Array of {keys: ['query'], clicks, impressions, ctr, position}
```

Finalized Search Console data is [typically available after **2–3 days**](https://developers.google.com/webmaster-tools/v1/how-tos/all-your-data). Set `dataState` to `all` to request fresher data, then check the [response metadata](https://developers.google.com/webmaster-tools/v1/searchanalytics/query#response) because recent rows may still be incomplete.

## API Limits

- **Rate limits:** Search Analytics has separate limits of 1,200 queries per minute per site and 1,200 per minute per user. URL Inspection allows 600 queries per minute per site. Project quotas and load quotas also apply. See [Rate Limits](/learn-google-search-console/api/rate-limits) for details.
- **Row limits:** A response contains at most 25,000 rows, while Search Analytics exposes at most 50,000 rows per day per search type. Larger properties require pagination and carefully chosen date and dimension combinations.
- **Data completeness:** When grouping or filtering by page or query, Google may omit some rows to keep calculations within its internal resource limits. The amount varies by property and request; Google does not publish a fixed loss percentage.
- **No BigQuery backfill:** The first [BigQuery bulk export](https://support.google.com/webmasters/answer/12917675?hl=en) includes data for the day of that export, not earlier history. Use the Search Console API or reports to retrieve earlier data while it remains available.

## Related Guides

- [Authentication](/learn-google-search-console/api/authentication): Set up OAuth 2.0 for API access
- [Rate Limits](/learn-google-search-console/api/rate-limits): Understand quotas and avoid 429 errors
- [Query Builder](/learn-google-search-console/api/query-builder): Learn filter and dimension patterns

## Archiving with gscdump

Search Console keeps a rolling 16 months of data, and each API response is capped at 25,000 rows. For Pro accounts, gscdump's initial hosted backfill targets up to 180 days; daily jobs then retain new rows and expose the stored range through MCP tools. Composed reports are unmetered during beta and can query Search Analytics live when stored coverage is unavailable.

Query retained history without repeatedly calling Google's API. As with any Search Console integration, source data remains subject to Google's anonymization and data limits.

Try gscdump free: [gscdump.com](https://gscdump.com)
