Google Search Console
v0.1.0Google Search Console data and SEO analysis: performance, quick wins, indexing and sitemaps.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_sites List Search Console properties
Lists every Search Console property the connected Google account can read, with its type and permission level. Call this first when you do not know the exact property name.
search_analytics Query search performance data
Runs a raw Search Console performance query: clicks, impressions, CTR and average position, broken down by any mix of query, page, country, device, date, hour and search appearance, with filters. Use it for anything the specialised tools do not cover. Rows come back sorted by clicks unless order_by says otherwise.
| Parameter | Type | Description |
|---|---|---|
aggregation_type | string | How impressions are counted: "byProperty" counts a search once however many of your pages appear, "byPage" counts each page. Leave unset for Google's default. |
data_state | string | "all" (default) matches the Search Console website: complete days, plus partial numbers for recent days if the period reaches that far. "final" leaves out any day that is not final yet. "hourly_all" i… |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
dimensions | array | How to break the numbers down, in order. Empty returns one row of totals. "searchAppearance" cannot be combined with other dimensions. "hour" needs data_state "hourly_all" and only covers the last few… |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
order | string | Sort direction. Default desc, or asc for position (best first). |
order_by | string | Sort by this metric instead of clicks. The tool then reads up to 25,000 rows and sorts them locally, so "top by impressions" is correct within that scan. |
row_limit | integer | Maximum number of rows to return. |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
start_row | integer | Zero-based offset, for paging through results. |
get_performance_overview Performance overview
One-call snapshot of a property: total clicks, impressions, CTR and position against a comparison period, the trend over time, and the top queries, pages, countries, devices and search appearances. The best starting point for a report or before digging into a specific question.
| Parameter | Type | Description |
|---|---|---|
compare_end_date | string | Last day of the comparison period when compare_to is "custom". |
compare_start_date | string | First day of the comparison period when compare_to is "custom". |
compare_to | string | What to compare against: the same number of days immediately before, the same period 52 weeks earlier, a custom range (set compare_start_date and compare_end_date), or nothing. |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
top | integer | Maximum number of rows in each top list to return. |
compare_periods Compare two periods
Compares two periods row by row for one dimension (queries, pages, countries, devices or search appearances) and returns the biggest gainers and decliners plus what is new and what disappeared. Use it to explain why traffic moved.
| Parameter | Type | Description |
|---|---|---|
compare_end_date | string | Last day of the comparison period when compare_to is "custom". |
compare_start_date | string | First day of the comparison period when compare_to is "custom". |
compare_to | string | What to compare against: the same number of days immediately before (default), the same period 52 weeks earlier, or a custom range (set compare_start_date and compare_end_date). |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
dimension | string | What to compare. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
limit | integer | Maximum number of rows in each list to return. |
scan_rows | integer | How many rows to read from Search Console before analysing. Google returns rows sorted by clicks, so a larger scan reaches further into low-click, high-impression rows. Each 25,000 rows is one API cal… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
sort_by | string | Rank gainers and decliners by change in this metric. |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
find_quick_wins Find quick-win keywords
Finds "striking distance" keywords: queries where a page already ranks just below the top results (positions 4 to 20 by default) and is being seen. These are the cheapest rankings to improve. Returns each query with its page and an estimate of the extra clicks from reaching the target position, plus the pages with the most combined potential.
| Parameter | Type | Description |
|---|---|---|
brand_terms | array | Brand names and their common spellings, for example ["acme", "acme corp"]. Defaults to GSC_BRAND_TERMS. |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
limit | integer | Maximum number of opportunities to return. |
max_position | number | Worst (highest) average position to include. |
min_impressions | integer | Ignore rows with fewer impressions than this in the period. |
min_position | number | Best (lowest) average position to include. |
scan_rows | integer | How many rows to read from Search Console before analysing. Google returns rows sorted by clicks, so a larger scan reaches further into low-click, high-impression rows. Each 25,000 rows is one API cal… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
target_position | number | The position the click estimate assumes the page reaches. |
find_ctr_opportunities Find pages with weak click-through
Finds results that rank well but are clicked much less than their position should earn, judged against the site's own CTR-by-position curve. These are candidates for a better title, meta description or structured data. Returns the underperforming pages (rolled up across their queries) and the individual query and page pairs, each with the clicks being missed.
| Parameter | Type | Description |
|---|---|---|
brand_terms | array | Brand names and their common spellings, for example ["acme", "acme corp"]. Defaults to GSC_BRAND_TERMS. |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
limit | integer | Maximum number of rows in each list to return. |
max_ctr_ratio | number | Flag a row when its CTR is at most this fraction of the expected CTR. 0.6 means at least 40% below expected. |
max_position | number | Only consider rankings at this average position or better. |
min_impressions | integer | Ignore rows with fewer impressions than this in the period. |
scan_rows | integer | How many rows to read from Search Console before analysing. Google returns rows sorted by clicks, so a larger scan reaches further into low-click, high-impression rows. Each 25,000 rows is one API cal… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
find_keyword_cannibalization Find keyword cannibalization
Finds queries for which two or more pages of the site each take a meaningful share of the impressions, which often means the pages compete with each other. Returns each query with the competing pages, their share of impressions and their positions, ordered by how many impressions are split away from the strongest page.
| Parameter | Type | Description |
|---|---|---|
brand_terms | array | Brand names and their common spellings, for example ["acme", "acme corp"]. Defaults to GSC_BRAND_TERMS. |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
limit | integer | Maximum number of queries to return. |
min_impressions | integer | Ignore queries with fewer total impressions than this. |
min_share_pct | number | A page counts as competing when it holds at least this percentage of the query's impressions. |
scan_rows | integer | How many rows to read from Search Console before analysing. Google returns rows sorted by clicks, so a larger scan reaches further into low-click, high-impression rows. Each 25,000 rows is one API cal… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
find_declining_pages Find declining pages
Finds the pages (or queries) that lost the most clicks against a comparison period and gives a first reading of why: a ranking loss, fewer impressions, or a lower click-through rate. For the worst cases it also lists what lost the most underneath (the queries of a page, or the pages of a query). Use it to plan content refreshes and to investigate traffic drops.
| Parameter | Type | Description |
|---|---|---|
compare_end_date | string | Last day of the comparison period when compare_to is "custom". |
compare_start_date | string | First day of the comparison period when compare_to is "custom". |
compare_to | string | What to compare against: the same number of days immediately before (default), the same period 52 weeks earlier, or a custom range (set compare_start_date and compare_end_date). |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
dimension | string | Look for declining pages or declining queries. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
explain_top | integer | For this many of the worst rows, also fetch the breakdown underneath. Each costs two API calls; 0 turns it off. |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
limit | integer | Maximum number of rows to return. |
min_drop_pct | number | Only report rows whose clicks fell by at least this percentage. |
min_previous_clicks | integer | Only consider rows that had at least this many clicks in the comparison period. |
scan_rows | integer | How many rows to read from Search Console before analysing. Google returns rows sorted by clicks, so a larger scan reaches further into low-click, high-impression rows. Each 25,000 rows is one API cal… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
find_content_gaps Find content gaps and question keywords
Finds topics the site is visible for but does not serve well: queries with real impressions where the best page ranks beyond the second results page, and question-style queries (who, what, how ...) that suit FAQ sections, how-to content or new articles. Use it to plan new content.
| Parameter | Type | Description |
|---|---|---|
brand_terms | array | Brand names and their common spellings, for example ["acme", "acme corp"]. Defaults to GSC_BRAND_TERMS. |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
limit | integer | Maximum number of rows in each list to return. |
min_impressions | integer | Ignore queries with fewer impressions than this in the period. |
question_pattern | string | Regular expression (JavaScript syntax, case-insensitive) that marks a query as a question. The default matches English question words at the start of the query; pass your own for other languages, for… |
scan_rows | integer | How many rows to read from Search Console before analysing. Google returns rows sorted by clicks, so a larger scan reaches further into low-click, high-impression rows. Each 25,000 rows is one API cal… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
weak_position | number | A query counts as weakly served when the site's average position is worse than this. |
get_brand_split Branded versus non-branded search
Splits search performance into branded queries (containing the brand name), non-branded queries and anonymised queries, with the change against a comparison period. Non-branded traffic is the part SEO work actually wins, so this separates real organic growth from brand demand.
| Parameter | Type | Description |
|---|---|---|
brand_terms | array | Brand names and their common spellings, for example ["acme", "acme corp"]. Defaults to GSC_BRAND_TERMS. |
compare_end_date | string | Last day of the comparison period when compare_to is "custom". |
compare_start_date | string | First day of the comparison period when compare_to is "custom". |
compare_to | string | What to compare against: the same number of days immediately before, the same period 52 weeks earlier, a custom range (set compare_start_date and compare_end_date), or nothing. |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
detect_traffic_anomalies Detect traffic drops and spikes
Scans the daily trend for days that differ sharply from the same weekday in the preceding weeks, so the weekly rhythm does not trigger false alarms. Returns the unusual days with the expected value and how the latest week compares with a typical one. Use it for monitoring and as the first step when someone asks "did our traffic drop?".
| Parameter | Type | Description |
|---|---|---|
days | integer | How many days of history to examine. At least 35 are needed to form a baseline. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
filters | array | Filters; a row must match all of them. Example: [{"dimension":"page","operator":"contains","expression":"/blog/"},{"dimension":"country","operator":"equals","expression":"usa"}]. Countries are ISO 316… |
metric | string | Which metric to watch. |
min_deviation_pct | number | Smallest deviation from the expected value, in percent, worth reporting. |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
analyze_page Analyse one page
Everything Search Console knows about a single page: its totals against a comparison period, the queries it ranks for with their change, the queries worth optimising for (ranked 4 to 20 with the most impressions), devices, countries, the trend, and its index status. Use it before rewriting or refreshing a page.
| Parameter | Type | Description |
|---|---|---|
page_url * | string | Full URL of the page, exactly as it appears in Search Console. |
compare_end_date | string | Last day of the comparison period when compare_to is "custom". |
compare_start_date | string | First day of the comparison period when compare_to is "custom". |
compare_to | string | What to compare against: the same number of days immediately before, the same period 52 weeks earlier, a custom range (set compare_start_date and compare_end_date), or nothing. |
days | integer | Length of the period in days, used when start_date is not given. Default 28. |
end_date | string | Last day of the period, YYYY-MM-DD in Pacific Time, or "today" / "yesterday". Defaults to the latest day Google has complete data for, usually 3 to 4 days ago. A later date includes days that are stil… |
include_index_status | boolean | Also run a URL inspection for the page (one call against the daily inspection quota). |
search_type | string | Which Google surface: web (default), image, video, news (the News tab), discover or googleNews. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
start_date | string | First day of the period, YYYY-MM-DD in Pacific Time. Defaults to `days` before end_date. |
top_queries | integer | Maximum number of queries to return. |
inspect_url Inspect a URL
Asks Google how it sees one URL: whether it is indexed and why not, the canonical Google chose against the declared one, when it was last crawled and as which device, robots.txt and noindex state, the sitemaps and pages that point to it, and structured data problems. It reports the indexed version, not a live test. Counts against a quota of 2,000 inspections per day per property.
| Parameter | Type | Description |
|---|---|---|
url * | string | The full URL to inspect. It must belong to the property. |
language_code | string | BCP-47 language for Google's issue messages, for example "en-US" (default) or "el". |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
inspect_urls Inspect several URLs
Runs URL inspection for up to 50 URLs of one property and returns a compact table of which are indexed, their coverage state, last crawl and the problems found. Each URL uses one of the 2,000 daily inspections per property.
| Parameter | Type | Description |
|---|---|---|
urls * | array | The full URLs to inspect, all on the same property. |
language_code | string | BCP-47 language for Google's issue messages, for example "en-US" (default) or "el". |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
audit_sitemap_indexing Audit how much of a sitemap is indexed
Reads the URLs listed in the property's sitemaps, inspects a sample of them and reports how many are indexed, the reasons the others are not, and the affected URLs. This is the closest the API gets to the Page indexing report. Each inspected URL uses one of the 2,000 daily inspections per property, so the sample is small by default.
| Parameter | Type | Description |
|---|---|---|
language_code | string | BCP-47 language for Google's issue messages, for example "en-US" (default) or "el". |
max_urls | integer | How many URLs to inspect. Google takes about six seconds per inspection, so 25 takes around 25 seconds and 50 is the most one call can finish. Call again for a second sample. |
sampling | string | "random" picks a representative sample; "first" takes the URLs in sitemap order. |
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
sitemap_url | string | A specific sitemap or sitemap index to audit. Defaults to every sitemap submitted in Search Console. |
list_sitemaps List sitemaps
Lists the sitemaps submitted for a property with their processing state, when Google last read them, error and warning counts, and how many URLs each one submits.
| Parameter | Type | Description |
|---|---|---|
site_url | string | Search Console property, for example "sc-domain:example.com" or "https://www.example.com/". A bare domain or any page URL on the site also works. Optional when GSC_SITE_URL is set or the account has e… |
sitemap_index | string | Only list the sitemaps contained in this sitemap index. |