> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Search Console

> Your Search Console properties: search performance (clicks, impressions, CTR, position by query, page, country, device and date) and sitemaps.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/google-search-console.webp?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=da582d8f5e6d1cc412c765f3108d8533)

[Web Catalog · SEO](https://docs.webrouter.net/data-apis.md?category=seo)

Needs&#x20;

`GOOGLE_SEARCH_CONSOLE_CLIENT_ID`

,&#x20;

`GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET`

,&#x20;

`GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN`

Endpoints

3

Auth

OAuth refresh token

[Vendor docs](https://developers.google.com/webmaster-tools/v1/api_reference_index)

## Setup

| Variable | | What it is |
| - | - | - |
| `GOOGLE_SEARCH_CONSOLE_CLIENT_ID` | required | the OAuth client id of a Google Cloud OAuth app with the Search Console API enabled (Google Cloud console > APIs & Services > Credentials) |
| `GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET` | required | that OAuth app's client secret |
| `GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN` | required | a refresh token minted with that OAuth app for the scope [https://www.googleapis.com/auth/webmasters.readonly](https://www.googleapis.com/auth/webmasters.readonly) (reads) or [https://www.googleapis.com/auth/webmasters](https://www.googleapis.com/auth/webmasters) (to submit sitemaps) |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Own-account API: only properties the signed-in Google user has in Search Console.
* The siteUrl path segment must be percent-encoded ('sc-domain%3Aexample.com', 'https%3A%2F%2Fwww\.example.com%2F').
* Dates are Pacific Time. Results come back sorted by clicks, or by date when grouped by date; the API returns top rows, not every row.
* Search analytics pages with startRow; at most 25,000 rows per call.

## Endpoints

GET

List Search Console properties

Every property the user has and their permission level.

[Open](#google-search-console-sites-list)

POST

Query search performance

Clicks, impressions, CTR and average position grouped by dimensions over a date range.

[Open](#google-search-console-search-analytics-query)

GET

List a property's sitemaps

Sitemaps submitted for a property with their status and errors.

[Open](#google-search-console-sitemaps-list)

### List Search Console properties

GET

`/sites`

`google-search-console.sites.list`

Every property the user has and their permission level.

Input

No inputs.

[Vendor docs](https://developers.google.com/webmaster-tools/v1/sites/list) · Same job: [Bing Webmaster Tools](https://docs.webrouter.net/data-apis/bing-webmaster.md#bing-webmaster-sites-list)

```python Python theme={null}
router.call_data_api("google-search-console.sites.list")
```

```text MCP theme={null}
call_data_api(endpoint="google-search-console.sites.list")
```

### Query search performance

POST

`/sites/{siteUrl}/searchAnalytics/query`

`google-search-console.search_analytics.query`

Clicks, impressions, CTR and average position grouped by dimensions over a date range.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`siteUrl` required</td><td>string</td><td>path</td><td>The property exactly as Search Console shows it: 'https\://www\.example.com/' (trailing slash) or 'sc-domain:example.com'. URL-encode it in the path. Example `sc-domain:example.com`</td></tr>
    <tr><td>`startDate` required</td><td>string</td><td>body</td><td>YYYY-MM-DD, Pacific Time, inclusive. Example `2026-10-01`</td></tr>
    <tr><td>`endDate` required</td><td>string</td><td>body</td><td>YYYY-MM-DD, Pacific Time, inclusive. Example `2026-10-31`</td></tr>
    <tr><td>`dimensions`</td><td>array</td><td>body</td><td>Group by, in order: country, device, page, query, searchAppearance, date, hour. Omit for one total row. Example `["query", "page"]`</td></tr>

    <tr>
      <td>
        `type`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        web (default), image, video, news, discover or googleNews.
      </td>
    </tr>

    <tr>
      <td>
        `dimensionFilterGroups`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        \[\{groupType: 'and', filters: \[\{dimension, operator, expression}]}]. Operators: contains, equals, notContains, notEquals, includingRegex, excludingRegex.
      </td>
    </tr>

    <tr>
      <td>
        `aggregationType`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        auto (default), byPage, byProperty or byNewsShowcasePanel.
      </td>
    </tr>

    <tr><td>`rowLimit`</td><td>integer</td><td>body</td><td>1 to 25000; default 1000. Example `1000`</td></tr>
    <tr><td>`startRow`</td><td>integer</td><td>body</td><td>Zero-based first row, for paging. Example `0`</td></tr>

    <tr>
      <td>
        `dataState`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        final (default), all (includes fresh partial data) or hourly\_all (use with the hour dimension).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/webmaster-tools/v1/searchanalytics/query) · Same job: [Bing Webmaster Tools](https://docs.webrouter.net/data-apis/bing-webmaster.md#bing-webmaster-traffic-daily)

```python Python theme={null}
router.call_data_api("google-search-console.search_analytics.query", {'siteUrl': 'sc-domain:example.com', 'startDate': '2026-10-01', 'endDate': '2026-10-31', 'dimensions': ['query', 'page'], 'rowLimit': 1000, 'startRow': 0})
```

```text MCP theme={null}
call_data_api(endpoint="google-search-console.search_analytics.query", params={"siteUrl": "sc-domain:example.com", "startDate": "2026-10-01", "endDate": "2026-10-31", "dimensions": ["query", "page"], "rowLimit": 1000, "startRow": 0})
```

> [!NOTE]
>
> * A read over POST. country values are ISO 3166-1 alpha-3 codes; device is DESKTOP, MOBILE or TABLET.
> * Fresh days can be partial: dataState 'all' includes them.

### List a property's sitemaps

GET

`/sites/{siteUrl}/sitemaps`

`google-search-console.sitemaps.list`

Sitemaps submitted for a property with their status and errors.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`siteUrl` required</td><td>string</td><td>path</td><td>The property exactly as Search Console shows it: 'https\://www\.example.com/' (trailing slash) or 'sc-domain:example.com'. URL-encode it in the path. Example `sc-domain:example.com`</td></tr>

    <tr>
      <td>
        `sitemapIndex`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        URL of a sitemap index to list the sitemaps inside it.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.google.com/webmaster-tools/v1/sitemaps/list)

```python Python theme={null}
router.call_data_api("google-search-console.sitemaps.list", {'siteUrl': 'sc-domain:example.com'})
```

```text MCP theme={null}
call_data_api(endpoint="google-search-console.sitemaps.list", params={"siteUrl": "sc-domain:example.com"})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.