Panduan Search Console API
cara pull dan manage Google Search Console data dengan code — Search Analytics, pemeriksaan URL, Sitemaps, dan situs APIs, OAuth, quotas, dan when untuk gunakan BigQuery instead.
Bahasa
untuk situs web properties, Google Search Console API exposes Search Analytics, pemeriksaan URL, Sitemaps, dan situs resources melalui OAuth 2,0. Search Analytics mengembalikan up untuk 25 000 top rows per permintaan; pemeriksaan URL adalah capped di 2 000 kueri/day dan 600/minute per property. Search Console now juga memiliki Instagram, TikTok, X, dan YouTube platform properties, tetapi Google's saat ini platform documentation melakukan not specify legacy API identifiers atau endpoint mendukung, so ini guide melakukan not claim API compatibility untuk them.
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 queryTL;DR — Search Console API lets Anda grab Anda Google Search Console data dengan code alih-alih clicking melalui interface. ini adalah how Anda get more daripada UI hands Anda — export di interface tops out sekitar 1 000 rows, while API gives Anda up untuk 25 000 per permintaan. Anda log di dengan Google (OAuth, not sebuah sederhana API key), dan Anda hanya get data untuk situs Anda’ve verified.
What Search Console API adalah
Search Console menampilkan Anda how Anda situs melakukan di Google — what kueri Anda peringkat untuk, how banyak clicks dan impressions Anda get, whether Anda halaman adalah terindeks. API gives Anda programmatic access untuk much dari itu sama data dan itu sama controls, so Anda dapat feed ini ke sebuah spreadsheet, sebuah dashboard, atau sebuah script itu runs pada sebuah schedule. ini adalah not full UI parity, though — sebuah few things (like live-testing sebuah URL) hanya exist di interface, dan having API access atau automation doesn’t oleh itself guarantee pengindeksan, rankings, traffic diagnosis, atau AI-search visibilitas.
ada four pieces:
- Search Analytics API — Anda performa report angka (clicks, impressions, CTR, average position), broken down oleh kueri, halaman, country, device, dan date.
- pemeriksaan URL API — indeks status dari sebuah single URL. ini reports versi currently di Google’s indeks; interface’s pemeriksaan URL alat dapat juga run sebuah live test, which API dapat’t melakukan.
- Sitemaps API — list, submit, atau delete Anda sitemaps.
- situs API — list, tambahkan, atau hapus properties pada Anda account.
Platform-property boundary: Search Console now memiliki separate Instagram, TikTok,
X, dan YouTube properties, tetapi Google’s saat ini platform documentation describes
mereka interface reports dan report export—not sebuah siteUrl identifier atau mendukung
contract untuk ini legacy endpoints. API workflow di ini artikel therefore
covers situs web properties hanya. LinkedIn adalah not sebuah didukung platform property.
Why gunakan ini alih-alih interface
big one: rows. jika Anda export performa report dari Search Console interface, Anda get roughly 1 000 rows. API mengembalikan up untuk 25 000 rows per permintaan, dan Anda dapat halaman melalui untuk more. jika Anda’ve got sebuah situs dengan thousands dari kueri atau halaman, interface simply doesn’t tampilkan Anda sebagian besar dari Anda data.
lainnya alasan adalah automation. Once ini adalah sebuah API panggil, Anda dapat run ini setiap morning, dump ini ke sebuah dashboard, atau alert yourself when clicks drop.
catch
Anda dapat hanya pull data untuk properties Anda’ve verified di Search Console. poin API di sebuah situs Anda tidak own dan Anda get nothing back — itu’s paling umum beginner stumble.
dan API doesn’t give Anda everything. ini mengembalikan top rows, not full list, dan ini tidak pernah menampilkan Anda kueri Google anonymizes untuk privacy. untuk sebuah big situs itu ingin complete picture, better alat adalah bulk data export to BigQuery — more on that in the Advanced version.
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 queryTL;DR — Search Console API adalah four REST APIs di bawah
webmaster-tools/v1— Search Analytics, pemeriksaan URL, Sitemaps, situs — semua OAuth 2,0, semua scoped untuk verified properties hanya. Search Analytics mengembalikan 1–25 000 rows per permintaan (default 1 000) tetapi “does not guarantee to return all data rows but rather top ones,” (terjemahan) “melakukan not guarantee untuk kembalikan semua data rows tetapi rather top ones,” so untuk completeness di scale Anda graduate untuk BigQuery bulk data export. pemeriksaan URL adalah hard-capped di 2 000 QPD / 600 QPM per situs — itu arithmetic adalah what gates besar-scale indeks monitoring.
ini API guide adalah scoped untuk situs web properties. melakukan not assume situs, Search Analytics, pemeriksaan URL, atau Sitemaps endpoints mendukung Instagram, TikTok, X, atau YouTube platform properties until Google documents identifier dan endpoint contract.
four APIs di sebuah glance
Google’s own framing dari what API melakukan: ini lets Anda “view, add, or remove
properties and sitemaps, run advanced queries for Google Search results data for
the properties that you manage in Search Console, and test individual pages.” (terjemahan) “view, tambahkan, atau hapus
properties dan sitemaps, run advanced kueri untuk Google hasil pencarian data untuk
properties itu Anda manage di Search Console, dan test individual halaman.”
itu maps cleanly onto four resources, semua di bawah webmaster-tools/v1:
- Search Analytics API — performa report, programmatically: clicks, impressions, CTR, position oleh dimension (kueri, halaman, country, device, search appearance, date, hour).
- pemeriksaan URL API — indeks status dari sebuah single URL, programmatic sibling dari pemeriksaan URL alat.
- Sitemaps API — list, get, submit, dan delete sitemaps.
- situs API — list, tambahkan, dan hapus verified properties.
ini exposes much dari what Anda sudah gunakan di interface — performa report dan pemeriksaan URL alat — sebagai endpoints Anda dapat script terhadap. ini isn’t sebuah 1:1 mirror, though: API doesn’t guarantee full UI parity (URL Inspection’s live test, misalnya, adalah UI-hanya — see below), dan neither API access nor automation pada -nya own guarantees pengindeksan, rankings, traffic diagnosis, atau AI-search visibilitas.
Auth: OAuth 2,0, two scopes, verified properties hanya
There’s no API key. setiap panggil adalah OAuth 2,0 — Google adalah explicit itu “all requests to the Google Search Console API must be authorized by an authenticated user.” (terjemahan) “semua permintaan untuk Google Search Console API harus menjadi authorized oleh sebuah authenticated pengguna.” Anda register sebuah app di Google Cloud, permintaan sebuah scope, dan get sebuah pendek-lived access token. Two scopes exist:
https://www.googleapis.com/auth/webmasters— read/write.https://www.googleapis.com/auth/webmasters.readonly— read-hanya.
untuk server-untuk-server automation (sebuah nightly reporting job, sebuah indeks monitor) Anda grant sebuah service account access untuk property dan skip interactive consent flow.
untuk situs web properties, two property-identifier formats penting here too: sebuah URL-prefix property adalah
passed sebagai sebuah full property URL (Google’s own contoh adalah http://www.example.com/),
dan sebuah Domain property menggunakan sc-domain:example.com form — Anda memiliki untuk pass
whichever form matches how property adalah verified di Search Console. Either
cara, service account (atau pengguna) perlu untuk menjadi granted access untuk itu exact
property; ini adalah not sebuah bypass untuk ownership atau sebuah blanket grant di seluruh setiap
property pada account.
dan gate itu 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.” (terjemahan) “Anda harus memiliki appropriate access (owner, full, read) untuk apa pun Google Search Console account itu Anda wish untuk access menggunakan API.” panggil API untuk sebuah property Anda’re not verified pada dan ini mengembalikan nothing — not sebuah error Anda’ll necessarily notice, hanya empty data.
Search Analytics API — performa report, di scale
Start dengan ceiling, not convenience: Google’s own caveat adalah itu “The
API is bounded by internal limitations of Search Console and does not
guarantee to return all data rows but rather top ones.” (terjemahan) “
API adalah bounded oleh internal limitations dari Search Console dan melakukan not
guarantee untuk kembalikan semua data rows tetapi rather top ones.” Pagination extends
how far Anda dapat halaman ke itu top-rows list — ini doesn’t hapus ceiling.
When Anda perlu setiap row, itu’s cue untuk reach untuk BigQuery bulk export
(below), not sebuah bigger rowLimit.
di dalam itu ceiling, ini adalah masih one sebagian besar people come untuk. alasan ini
beats interface adalah rowLimit parameter: “[Optional; Valid range is
1–25,000; Default is 1,000].” (terjemahan) “[Optional; Valid range adalah
1–25 000; Default adalah 1 000].” interface export caps near 1 000 rows;
API gives Anda up untuk 25 000 per permintaan, dan Anda paginate past itu dengan
startRow. pada sebuah situs dengan sebuah panjang tail dari kueri, itu’s difference
antara seeing top dari Anda data dan seeing more dari ini — masih not semua dari
ini.
Two more things shape what comes back. pertama, dataState controls freshness:
final ( default) mengembalikan hanya finalized data, all mencakup fresh,
recently collected data, dan hourly_all gives hourly breakdowns itu adalah
explicitly partial — respons metadata flags sebuah first_incomplete_date atau
first_incomplete_hour, dan Google notes nilai setelah itu poin dapat masih
perubahan. kedua, Search Analytics quotas aren’t sebuah single angka: usage
limits halaman splits them ke muat limits (sebuah resource-based allowance
diukur di 10-minute dan 1-day chunks — wider date ranges, more dimensions,
dan heavier filtering semua draw ini down faster) dan QPS/QPM/QPD
permintaan-rate limits covered below. Anda dapat hit muat ceiling sebelum Anda
hit permintaan-rate ceiling.
pemeriksaan URL API — dan quota itu actually constrains Anda
pemeriksaan URL 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.” (terjemahan) “view[s] terindeks, atau dapat diindeks, status dari disediakan URL. Presently hanya status dari versi di Google indeks adalah available; Anda cannot test indexability dari sebuah live URL.” itu last clause adalah sebuah nyata scope limit, not sebuah technicality: interface’s pemeriksaan URL alat dapat run sebuah live test terhadap halaman sebagai ini exists right now; API dapat hanya report pada versi Google sudah memiliki terindeks. gunakan API untuk bangun indeks-coverage monitoring di seluruh banyak URLs — not sebagai sebuah substitute untuk UI’s live test.
Here’s where math penting. Per situs, Anda get 2 000 kueri per day dan 600 per minute. (Per project ceiling adalah far higher — 10 000 000/day dan 15 000/minute — tetapi per-situs cap adalah what bites.) jika Anda ingin monitor indeks status dari sebuah 50 000-URL situs, Anda dapat’t inspect them semua di sebuah day; Anda batch dan schedule di seluruh days, atau Anda prioritize. Few posts melakukan ini arithmetic, dan ini adalah single biggest planning constraint pada besar-scale indeks monitoring.
oleh contrast, Search Analytics adalah generous — 1 200 QPM per situs dan per pengguna — dan lainnya resources (Sitemaps, situs) sit di 20 QPS / 200 QPM per pengguna. URL Inspection adalah tight one.
Sitemaps dan situs APIs
Sitemaps API adalah management layer untuk Anda sitemaps: ini “submits a
sitemap for a site,” (terjemahan) “submits sebuah
sitemap untuk sebuah situs,” “deletes a sitemap from this site,” (terjemahan) “deletes sebuah sitemap dari ini situs,” “retrieves
information about a specific sitemap,” (terjemahan) “retrieves
informasi tentang sebuah spesifik sitemap,” dan “lists the sitemaps-entries submitted
for this site, or included in the sitemap index file.” (terjemahan) “lists sitemaps-entries submitted
untuk ini situs, atau disertakan di sitemap indeks file.” sitemap resource ini
mengembalikan mencakup fields like path, lastSubmitted, isPending,
isSitemapsIndex, lastDownloaded, warnings, errors, dan sebuah contents
array — handy untuk auditing sitemap health di scale.
situs API lists, menambahkan, dan menghapus verified properties — berguna jika Anda manage banyak properties dan ingin untuk provision atau audit them programmatically.
When untuk gunakan BigQuery bulk export instead
untuk besar situs, API’s 25 000-rows-per-permintaan, top-rows-hanya model becomes sebuah ceiling. Google’s jawaban isn’t sebuah fifth API resource itu mengembalikan yang sama shape dari data — ini adalah sebuah separate, scheduled export pipeline: bulk data export untuk BigQuery. Think dari choice sebagai pull vs. scheduled push, not “API A vs. API B.” (terjemahan) “API sebuah 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.” (terjemahan) “Schedule sebuah daily export dari Anda Search Console performa data untuk BigQuery, where Anda dapat run kompleks kueri di atas Anda data atau export ini untuk sebuah external storage service. menggunakan bulk data export fitur, Anda’ll see semua performa data available untuk Search Console untuk Anda property, dengan exception dari anonymized kueri.”
itu’s decision aturan:
- Interface export — ~1 000 rows, quick one-off look.
- Search Analytics API — up untuk 25 000 rows/permintaan, paginate, scriptable; great untuk moderate pada-demand pulls dan dashboards.
- BigQuery bulk export — semua available performa data, daily, no row cap; right alat setelah Anda’ve got tens dari thousands dari halaman atau kueri.
one thing none dari them give Anda adalah anonymized kueri — istilah Google hides untuk privacy. itu’s sebuah nyata gap, not sebuah bug Anda dapat berfungsi sekitar. I know scale dari ini firsthand: sebagai Ahrefs’ Brand Ambassador I helped surface sebuah study where kami pulled semua data available dari API di seluruh sebuah very besar sample dari situs dan ditemukan Google hides keyword istilah pada sebuah besar share dari clicks. kami later dibangun itu ke Ahrefs peringkat Tracker — full history dari Anda GSC data, percent dari clicks going untuk anonymized kueri, dan sebuah custom CTR curve dibangun dari Anda own angka. When someone tells Anda API mengembalikan “all your data,” (terjemahan) “semua Anda data,” itu anonymized slice adalah honest asterisk.
umum gunakan cases
- Automated reporting — scheduled pulls ke Sheets atau sebuah warehouse.
- BI dashboards — Looker Studio atau BigQuery pada top dari performa data.
- besar-scale indeks/coverage monitoring — pemeriksaan URL, batched di dalam 2 000/day quota.
- CTR curve membangun — model expected CTR oleh position dari Anda own data.
- Anomaly alerting — flag click/impression drops automatically.
ini adalah juga how ketiga-party alat berfungsi: when Ahrefs atau sebuah Looker Studio connector “integrates Search Console,” (terjemahan) “integrates Search Console,” mereka’re calling ini sama APIs (dan increasingly, BigQuery export) pada Anda behalf.
AI summary
sebuah condensed take pada Advanced versi:
- ** Search Console API = four REST APIs** di bawah
webmaster-tools/v1: Search Analytics (performa data), pemeriksaan URL (indeks status), Sitemaps, dan situs. ini adalah not full UI parity — sebuah few things, like pemeriksaan URL’s live test, hanya exist di interface, dan API access alone doesn’t guarantee pengindeksan, rankings, atau traffic diagnosis. - Auth adalah OAuth 2,0, no API key. Two scopes (
webmasters,webmasters.readonly); service accounts untuk server-untuk-server, tetapi mereka masih perlu explicit access untuk exact property.siteUrltakes either sebuah URL-prefix property atau sebuahsc-domain:example.comDomain property — match how ini adalah verified. API hanya mengembalikan data untuk properties Anda’ve verified — #1 beginner gotcha. - Search Analytics mengembalikan top rows pertama, not sebuah complete dump — “does not guarantee to return all data rows but rather top ones,” (terjemahan) “melakukan not guarantee untuk kembalikan semua data rows tetapi rather top ones,” regardless dari pagination. di dalam itu ceiling: 1–25 000 rows per permintaan (default 1 000), vs ~1 000 di interface export, dan quotas split ke muat limits dan QPS/QPM/QPD permintaan-rate limits.
- pemeriksaan URL: 2 000 kueri/day, 600/minute per situs, dan ini reports hanya terindeks versi — ini dapat’t run sebuah live test. itu quota adalah nyata constraint pada besar-scale indeks monitoring — batch dan schedule sekitar ini.
- Sitemaps API lists/gets/submits/deletes sitemaps; situs API lists/menambahkan/menghapus properties.
- untuk besar situs, gunakan BigQuery bulk data export — sebuah separate scheduled pipeline (not sebuah fifth API resource) giving semua available performa data daily, no row cap, except anonymized kueri.
- Anonymized kueri adalah sebuah genuine gap no API atau export fills — Patrick’s Ahrefs berfungsi quantified how besar itu hidden slice adalah.
Official documentation
Primary-source documentation dari Google.
Search Console API reference
- Search Console API — Overview / tentang — what API melakukan dan verified-property requirement.
- Search Analytics: kueri reference —
rowLimit(1–25 000) dan dimension parameters. - pemeriksaan URL API reference — what indeks-status data inspect metode mengembalikan.
- Sitemaps API reference — list, get, submit, delete.
- situs API reference — list, tambahkan, hapus verified properties.
- Usage limits — full per-situs, per-pengguna, dan per-project quota table.
- Authorizing permintaan (OAuth 2,0) — scopes dan auth flow.
Bulk data export
- tentang bulk data export (Search Console Help) — schedule sebuah daily BigQuery export dari semua performa data except anonymized kueri.
- Bulk data export announcement (Search Central blog) — launch post positioning bulk export untuk besar situs.
Quotes dari source
pada—record statements dari Google’s documentation. setiap tautan adalah sebuah deep tautan itu jumps untuk quoted passage pada source halaman.
Google — what API melakukan dan who dapat gunakan ini
- “view, add, or remove properties and sitemaps, run advanced queries for Google Search results data for the properties that you manage in Search Console, and test individual pages.” (terjemahan) “view, tambahkan, atau hapus properties dan sitemaps, run advanced kueri untuk Google hasil pencarian data untuk properties itu Anda manage di Search Console, dan test individual halaman.” — Google Search Console API docs (Overview). Jump untuk quote
- “You must have appropriate access (owner, full, read) to any Google Search Console account that you wish to access using the API.” (terjemahan) “Anda harus memiliki appropriate access (owner, full, read) untuk apa pun Google Search Console account itu Anda wish untuk access menggunakan API.” — Google Search Console API docs (Overview). Jump untuk quote
- “All requests to the Google Search Console API must be authorized by an authenticated user.” (terjemahan) “semua permintaan untuk Google Search Console API harus menjadi authorized oleh sebuah authenticated pengguna.” — Authorizing permintaan guide. Jump untuk quote
Google — Search Analytics API
- “[Optional; Valid range is 1–25,000; Default is 1,000]” (terjemahan) “[Optional; Valid range adalah 1–25 000; Default adalah 1 000]” —
rowLimitparameter. — Search Analytics: kueri reference. Jump untuk quote - “The URL of the property as defined in Search Console.” (terjemahan) “ URL dari property sebagai defined di Search Console.” —
siteUrlparameter, whose contoh give both URL-prefix form (http://www.example.com/) dan Domain-property form (sc-domain:example.com). — Search Analytics: kueri reference. Jump untuk quote - “The API is bounded by internal limitations of Search Console and does not guarantee to return all data rows but rather top ones.” (terjemahan) “ API adalah bounded oleh internal limitations dari Search Console dan melakukan not guarantee untuk kembalikan semua data rows tetapi rather top ones.” — Search Analytics: kueri reference. Jump untuk quote
Google — pemeriksaan URL API
- “View 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.” (terjemahan) “View terindeks, atau dapat diindeks, status dari disediakan URL. Presently hanya status dari versi di Google indeks adalah available; Anda cannot test indexability dari sebuah live URL.” — pemeriksaan URL API reference. Jump untuk quote
Google — Sitemaps API
- “Submits a sitemap for a site.” (terjemahan) “Submits sebuah sitemap untuk sebuah situs.” / “Deletes a sitemap from this site.” (terjemahan) “Deletes sebuah sitemap dari ini situs.” / “Lists the sitemaps-entries submitted for this site, or included in the sitemap index file.” (terjemahan) “Lists sitemaps-entries submitted untuk ini situs, atau disertakan di sitemap indeks file.” — Sitemaps API reference. Jump untuk quote
Google — bulk data export
- “Schedule a daily export of your Search Console performance data to BigQuery… you’ll see all the performance data available to Search Console for your property, with the exception of anonymized queries.” (terjemahan) “Schedule sebuah daily export dari Anda Search Console performa data untuk BigQuery… Anda’ll see semua performa data available untuk Search Console untuk Anda property, dengan exception dari anonymized kueri.” — Search Console Help: tentang bulk data export. Jump untuk quote
OAuth setup & pertama-panggil checklist
Getting dari zero untuk sebuah berfungsi Search Console API panggil:
- Confirm Anda memiliki verified access (owner, full, atau read) untuk property di Search Console — API mengembalikan nothing untuk unverified properties.
- buat project di Google Cloud Console.
- Enable Search Console API untuk itu project.
- buat credentials: sebuah OAuth 2,0 client (untuk interactive/pengguna apps) atau sebuah service account (untuk server-untuk-server automation).
- jika menggunakan sebuah service account, grant ini access untuk property di Search Console settings.
- permintaan right scope:
webmasters.readonlyuntuk reporting,webmastersjika Anda’ll submit sitemaps atau manage properties. - Obtain sebuah access token via OAuth flow (atau service-account key).
- Confirm
siteUrlformat matches how property adalah verified: sebuah full URL untuk sebuah URL-prefix property, atausc-domain:example.comuntuk sebuah Domain property. - membuat sebuah test panggil untuk
searchAnalytics.querydengan sebuah kecil date range danrowLimit: 10untuk confirm data comes back. - Plan sekitar quotas: Search Analytics permintaan rates adalah generous tetapi juga draw down sebuah separate muat quota; pemeriksaan URL adalah capped di 2 000/day, 600/min per situs — batch accordingly. Don’t expect URL Inspection untuk run sebuah live test — itu’s UI-hanya.
- untuk tens dari thousands dari rows, siapkan BigQuery bulk export instead dari paginating.
mental models
1. Four APIs, one auth. Search Analytics (read Anda performa data), pemeriksaan URL (read sebuah URL’s indeks status), Sitemaps (manage sitemaps), situs (manage properties). semua four go melalui yang sama OAuth 2,0 door dan respect yang sama verified-property aturan.
2. data-scale ladder. Pick alat oleh volume:
- Quick look → interface export (~1 000 rows).
- Scriptable, moderate → Search Analytics API (up untuk 25 000/permintaan, paginate).
- besar situs, complete → BigQuery bulk export (semua data, daily, no row cap). Move up ladder when rung below stops fitting Anda data.
3. Top rows, not semua rows. Internalize itu API mengembalikan “top ones,” (terjemahan) “top ones,” not everything, dan itu anonymized kueri adalah excluded dari both API dan export. jika completeness penting, BigQuery adalah closer — tetapi anonymized slice adalah hilang regardless.
4. Quota arithmetic sebelum Anda bangun. sebelum designing sebuah indeks monitor, melakukan math: pemeriksaan URL adalah 2 000/day per situs. sebuah 50k-URL situs dapat’t menjadi inspected daily — so batch, prioritize, atau schedule di seluruh days. Design sekitar cap, don’t menemukan ini di production.
Search Console API — cheat sheet
** four APIs dan mereka key limits**
| API | What ini melakukan | Key limit / quota |
|---|---|---|
| Search Analytics | performa data (clicks, impressions, CTR, position) oleh dimension | rowLimit 1–25 000/permintaan (default 1 000); 1 200 QPM per situs & per pengguna plus sebuah separate muat quota; “top rows” (terjemahan) “top rows” hanya |
| pemeriksaan URL | indeks status dari one URL (no live test — UI-hanya) | 2 000 QPD / 600 QPM per situs (10M QPD / 15 000 QPM per project) |
| Sitemaps | List / get / submit / delete sitemaps | 20 QPS / 200 QPM per pengguna |
| situs | List / tambahkan / hapus verified properties | 20 QPS / 200 QPM per pengguna |
Auth
- OAuth 2,0 hanya — no API key.
- Scopes:
webmasters(read/write),webmasters.readonly(read). - Service accounts untuk server-untuk-server (grant them property access).
- hanya verified properties kembalikan data.
Fast facts
- API mengembalikan top rows hanya — not guaranteed complete — regardless dari pagination.
- Interface export caps near 1 000 rows; API gives up untuk 25 000/permintaan,
paginate dengan
startRow. - Search Analytics quotas split ke muat limits (resource-based, 10-min / 1-day chunks) dan QPS/QPM/QPD permintaan-rate limits above.
siteUrltakes sebuah URL-prefix property (http://www.example.com/) atau sebuah Domain property (sc-domain:example.com) — match how ini adalah verified.- pemeriksaan URL reports terindeks versi hanya — ini dapat’t run sebuah live test; itu’s UI-hanya.
- Anonymized kueri adalah excluded dari API dan BigQuery export.
- untuk tens dari thousands dari rows → BigQuery bulk data export — sebuah separate scheduled pipeline, not sebuah fifth API resource.
- Exposes much dari performa report (Search Analytics) dan URL Inspection alat, tetapi isn’t full UI parity.
sebuah minimal Search Analytics permintaan
ini adalah illustrative, not copy-paste-ready — Anda’ll perlu untuk wire up Anda own
OAuth credentials dan adjust dates dan property. ini menampilkan shape dari sebuah
searchAnalytics.query panggil: permintaan body dengan sebuah date range, dimensions
Anda ingin, dan rowLimit.
** permintaan body ( bagian itu penting)**
{
"startDate": "2026-05-01",
"endDate": "2026-05-31",
"dimensions": ["query", "page"],
"rowLimit": 25000,
"startRow": 0
}Sketch di Python (dengan google-api-python-client library)
# Illustrative only — assumes you've already built an authorized `service`
# via OAuth 2.0 (scope: webmasters.readonly) or a service account.
from googleapiclient.discovery import build
service = build("searchconsole", "v1", credentials=creds)
request = {
"startDate": "2026-05-01",
"endDate": "2026-05-31",
"dimensions": ["query", "page"],
"rowLimit": 25000, # max per request; default is 1000
"startRow": 0, # bump by 25000 to paginate
}
response = service.searchanalytics().query(
siteUrl="https://example.com/", # URL-prefix property; use "sc-domain:example.com"
# instead for a Domain property — must be verified
body=request,
).execute()
for row in response.get("rows", []):
print(row["keys"], row["clicks"], row["impressions"])untuk go past 25 000 rows, loop dan increment startRow oleh 25 000 until sebuah permintaan
mengembalikan no rows. Remember hasil adalah masih “top rows,” (terjemahan) “top rows,” not sebuah complete dump —
untuk itu, gunakan BigQuery bulk export.
alat itu gunakan (atau wrap) Search Console API
- Google Cloud Console — where Anda buat project, enable API, dan mint OAuth/service-account credentials.
- Official client libraries — Google API client libraries untuk Python, Java, JavaScript/Node, PHP, dan.NET wrap REST panggilan.
- BigQuery — destination untuk bulk data export; kueri semua Anda performa data dengan SQL.
- Looker Studio — connects untuk Search Console (dan BigQuery) untuk dashboards dibangun pada yang sama data.
- Ahrefs — integrates Search Console API; -nya peringkat Tracker menampilkan full GSC history, share dari clicks going untuk anonymized kueri, dan sebuah custom CTR curve dari Anda own data.
- Search Console interface — performa report dan pemeriksaan URL alat adalah manual counterparts untuk Search Analytics dan pemeriksaan URL APIs, dengan one gap API dapat’t close: hanya interface alat dapat run sebuah live test pada sebuah URL.
Prompts untuk planning Search Console API berfungsi
gunakan ini prompts untuk shape code atau sebuah analysis plan. pertahankan credentials, refresh tokens, dan service-account keys out dari apa pun chat input.
Design sebuah Search Analytics permintaan
Paste Anda property URL, date range, dimensions, filters, dan reporting goal.
Design a Google Search Console Search Analytics API request for the following reporting task.
Property: [sc-domain:example.com or exact URL-prefix property]
Date range: [start and end]
Goal: [the question the report must answer]
Dimensions: [date, query, page, country, device, searchAppearance, or hour]
Filters: [include/exclude rules]
Return:
1. The request body, including a rowLimit no higher than 25,000.
2. Pagination logic using startRow.
3. The aggregation and grouping needed after retrieval.
4. Warnings about top-rows-only data and anonymized queries.
5. A small validation query I can run before scheduling the full pull.
Do not invent credentials or assume the result is a complete census.Plan sebuah quota-safe pemeriksaan URL schedule
Paste sebuah CSV summary atau counts oleh URL priority alih-alih confidential tokens.
Create a quota-safe sampling and scheduling plan for the Search Console URL Inspection API.
Property: [property]
Total URLs: [count]
Priority groups: [critical templates, new URLs, changed URLs, long-tail sample]
Required revisit cadence: [daily, weekly, monthly]
Constraints from this article:
- 2,000 inspection queries per day per site.
- 600 inspection queries per minute per site.
- The API reports the indexed version, not a live test.
Return a daily allocation by priority group, a rotation method, retry/backoff rules,
and alerts for unexpected index or canonical states. Explain what cannot fit inside
the quota instead of silently dropping it.Choose API versus BigQuery export
Help me choose between the Search Console interface, Search Analytics API, and BigQuery bulk export.
Reporting need: [one-off analysis, dashboard, warehouse, anomaly alerts]
Expected rows per day: [estimate]
History required: [range]
Refresh cadence: [cadence]
Dimensions needed: [list]
Infrastructure available: [spreadsheet, script runner, BigQuery, BI tool]
Compare setup cost, row/completeness limits, automation, and maintenance. Account for
the API returning top rows and for anonymized queries being absent from every path.
End with one recommendation and the smallest proof-of-concept to validate it. Resources worth Anda time
My related berfungsi
- Ahrefs blog — my posts — including berfungsi pada GSC data di scale dan anonymized kueri.
- Now di Ahrefs peringkat Tracker: full GSC history + anonymized-kueri share — CTR-curve dan GSC-history fitur I announced.
Google’s docs
- Search Console API overview dan usage limits halaman — two halaman untuk bookmark pertama.
- tentang bulk data export — when dan cara move untuk BigQuery.
dari others
- Hidden keywords di GSC — Ahrefs study (mesin pencari Journal coverage) — ketiga-party write-up dari anonymized-kueri findings.
- Enhanced Search Console analytics dengan BigQuery (SEJ) — sebuah practical lihat bulk-export path.
- Bulk data export: sebuah baru dan powerful cara untuk access Anda Search Console data (Google Search Central blog) — Feb 2023 launch post dari Search Console team positioning bulk export untuk besar situs.
- google-api-python-client (PyPI) — official Python client library digunakan untuk panggil Search Console API; juga available untuk Node, Java, PHP, dan.NET via Google APIs client library family.
- r/TechSEO — community untuk API dan data-pull troubleshooting.
Stats worth citing
- Search Analytics row limit: 25 000 per permintaan (default 1 000) — versus interface export’s ~1 000-row cap. ini adalah core alasan untuk gunakan API. Source
- pemeriksaan URL quota: 2 000 kueri/day dan 600/minute per situs — hard ceiling pada besar-scale indeks monitoring (10M/day, 15 000/min per project). Source
- Anonymized kueri adalah excluded dari bahkan paling complete path (BigQuery bulk export) — sebuah nyata, unavoidable gap di Anda kueri data. Source
- Google hides keyword istilah pada sebuah besar share dari clicks — dari Ahrefs study I helped surface, which pulled semua available data dari API di seluruh sebuah very besar sample dari situs. Coverage
Test yourself: Search Console API
Five quick pertanyaan pada APIs, authentication, data limits, dan scale. Pick sebuah jawaban untuk setiap, lalu periksa Anda hasil.
Log perubahan
Diperbarui 30 Jul 2026.
Ringkasan editorial dan detail perubahan yang tercatat.Detail perubahan
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
Perbandingan lengkap tidak tersedia — tidak ada cuplikan sebelumnya yang diarsipkan untuk revisi ini.
Diperbarui 18 Jul 2026.
Ringkasan editorial dan detail perubahan yang tercatat.Detail perubahan
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
Perbandingan lengkap tidak tersedia — tidak ada cuplikan sebelumnya yang diarsipkan untuk revisi ini.