Google Search Console Search Console Searchanalytics API

The Search Console Searchanalytics API from Google Search Console — 1 operation(s) for search console searchanalytics.

GitHub OpenAPI

Operations 1

POST /webmasters/v3/sites/{siteUrl}/searchAnalytics/query Query searchanalytics #

Documentation

📖
Documentation
https://developers.google.com/webmaster-tools/v1/api_reference_index
📖
Documentation
https://searchconsole.googleapis.com/$discovery/rest?version=v1
📖
Authentication
https://developers.google.com/webmaster-tools/v1/how-tos/authorizing
📖
Documentation
https://developers.google.com/webmaster-tools/about
📖
Documentation
https://developers.google.com/webmaster-tools/v1/prereqs
📖
GettingStarted
https://developers.google.com/webmaster-tools/v1/quickstart/quickstart-python
📖
Documentation
https://developers.google.com/webmaster-tools/v1/how-tos/search_analytics
📖
APIReference
https://developers.google.com/webmaster-tools/v1/searchanalytics/query
📖
APIReference
https://developers.google.com/webmaster-tools/v1/sitemaps
📖
APIReference
https://developers.google.com/webmaster-tools/v1/sitemaps/get
📖
APIReference
https://developers.google.com/webmaster-tools/v1/sitemaps/submit
📖
APIReference
https://developers.google.com/webmaster-tools/v1/sites/get
📖
APIReference
https://developers.google.com/webmaster-tools/v1/urlInspection.index/inspect
📖
APIReference
https://developers.google.com/webmaster-tools/v1/urlInspection.index/UrlInspectionResult
📖
APIReference
https://developers.google.com/webmaster-tools/search-console-api/v1/reference/urlTestingTools/mobileFriendlyTest/run
📖
Documentation
https://developers.google.com/webmaster-tools/search-console-api/v1/
📖
Documentation
https://developers.google.com/webmaster-tools/search-console-api/about
📖
Documentation
https://search.google.com/test/rich-results
📖
Documentation
https://indexing.googleapis.com/$discovery/rest?version=v3
📖
Documentation
https://developers.google.com/search/apis/indexing-api/v3/reference/indexing/rest
📖
GettingStarted
https://developers.google.com/search/apis/indexing-api/v3/quickstart
📖
Documentation
https://developers.google.com/search/apis/indexing-api/v3/prereqs
📖
APIReference
https://developers.google.com/search/apis/indexing-api/v3/reference/indexing/rpc
📖
APIReference
https://developers.google.com/search/apis/indexing-api/v3/reference/indexing/rest/v3/urlNotifications/publish

Specifications

Code Examples

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-search-console:google-search-console-searchanalytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-search-console-searchanalytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Search Console Searchanalytics API
  version: v1
  description: Generated from Google's published Discovery document for Google Search Console API (searchconsole v1, revision 20261110). 1 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://searchconsole.googleapis.com
tags:
- name: Searchanalytics
paths:
  /webmasters/v3/sites/{siteUrl}/searchAnalytics/query:
    post:
      operationId: webmasters.searchanalytics.query
      summary: Query searchanalytics
      description: Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.
      parameters:
      - name: siteUrl
        in: path
        required: true
        description: 'The site''s URL, including protocol. For example: `http://www.example.com/`.'
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchAnalyticsQueryRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchAnalyticsQueryResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/webmasters
        - https://www.googleapis.com/auth/webmasters.readonly
      - apiKey: []
      tags:
      - Searchanalytics
components:
  schemas:
    Metadata:
      type: object
      description: An object that may be returned with your query results, providing context about the state of the data. When you request recent data (using `all` or `hourly_all` for `dataState`), some of the rows returned may represent data that is incomplete, which means that the data is still being collected and processed. This metadata object helps you identify exactly when this starts and ends. All dates and times provided in this object are in the `America/Los_Angeles` time zone. The specific field returned within this object depends on how you've grouped your data in the request. See details in inner fields.
      properties:
        firstIncompleteDate:
          type: string
          description: The first date for which the data is still being collected and processed, presented in `YYYY-MM-DD` format (ISO-8601 extended local date format). This field is populated only when the request's `dataState` is "`all`", data is grouped by "`DATE`", and the requested date range contains incomplete data points. All values after the `first_incomplete_date` may still change noticeably.
        firstIncompleteHour:
          type: string
          description: The first hour for which the data is still being collected and processed, presented in `YYYY-MM-DDThh:mm:ss[+|-]hh:mm` format (ISO-8601 extended offset date-time format). This field is populated only when the request's `dataState` is "`hourly_all`", data is grouped by "`HOUR`" and the requested date range contains incomplete data points. All values after the `first_incomplete_hour` may still change noticeably.
    ApiDimensionFilterGroup:
      description: A set of `dimension` value filters to test against each row. Only rows that pass all filter groups will be returned. All results within a filter group are either AND'ed or OR'ed together, depending on the group type selected. All filter groups are AND'ed together.
      properties:
        groupType:
          enum:
          - AND
          type: string
          description: Optional. The logic operator between filters of the same group.
        filters:
          description: Optional. A list of single-value filters in this group.
          items:
            $ref: '#/components/schemas/ApiDimensionFilter'
          type: array
      type: object
    SearchAnalyticsQueryResponse:
      type: object
      properties:
        responseAggregationType:
          enum:
          - AUTO
          - BY_PROPERTY
          - BY_PAGE
          - BY_NEWS_SHOWCASE_PANEL
          type: string
          description: How the results were aggregated.
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: An object that may be returned with your query results, providing context about the state of the data. See details in Metadata object documentation.
        rows:
          items:
            $ref: '#/components/schemas/ApiDataRow'
          description: A list of rows grouped by the key values in the order given in the query.
          type: array
      description: A list of rows, one per result, grouped by key. Metrics in each row are aggregated for all data grouped by that key either by page or property, as specified by the aggregation type parameter.
    SearchAnalyticsQueryRequest:
      type: object
      properties:
        dimensions:
          type: array
          description: '[Optional] Zero or more dimensions to group results by. Dimensions are the group-by values in the Search Analytics page. Dimensions are combined to create a unique row key for each row. Results are grouped in the order that you supply these dimensions.'
          items:
            type: string
            enum:
            - DATE
            - QUERY
            - PAGE
            - COUNTRY
            - DEVICE
            - SEARCH_APPEARANCE
            - HOUR
        endDate:
          type: string
          description: '[Required] End date of the requested date range, in YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal to the start date. This value is included in the range.'
        type:
          type: string
          enum:
          - WEB
          - IMAGE
          - VIDEO
          - NEWS
          - DISCOVER
          - GOOGLE_NEWS
          description: 'Optional. [Optional; Default is \"web\"] Type of report: search type, or either Discover or Gnews.'
        aggregationType:
          enum:
          - AUTO
          - BY_PROPERTY
          - BY_PAGE
          - BY_NEWS_SHOWCASE_PANEL
          description: '[Optional; Default is \"auto\"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help documentation to learn how data is calculated differently by site versus by page. **Note:** If you group or filter by page, you cannot aggregate by property. If you specify any value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your aggregation type if the requested type is invalid.'
          type: string
        dataState:
          type: string
          description: The data state to be fetched, can be full or all, the latter including full and partial data.
          enum:
          - DATA_STATE_UNSPECIFIED
          - FINAL
          - ALL
          - HOURLY_ALL
        startRow:
          format: int32
          type: integer
          description: '[Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number.'
        searchType:
          description: '[Optional; Default is \"web\"] The search type to filter for.'
          enum:
          - WEB
          - IMAGE
          - VIDEO
          - NEWS
          - DISCOVER
          - GOOGLE_NEWS
          type: string
        dimensionFilterGroups:
          type: array
          description: '[Optional] Zero or more filters to apply to the dimension grouping values; for example, ''query contains \"buy\"'' to see only data where the query string contains the substring \"buy\" (not case-sensitive). You can filter by a dimension without grouping by it.'
          items:
            $ref: '#/components/schemas/ApiDimensionFilterGroup'
        rowLimit:
          description: '[Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 25,000 (inclusive).'
          format: int32
          type: integer
        startDate:
          description: ' [Required] Start date of the requested date range, in YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or equal to the end date. This value is included in the range.'
          type: string
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    ApiDimensionFilter:
      properties:
        dimension:
          type: string
          enum:
          - QUERY
          - PAGE
          - COUNTRY
          - DEVICE
          - SEARCH_APPEARANCE
        expression:
          type: string
        operator:
          type: string
          enum:
          - EQUALS
          - NOT_EQUALS
          - CONTAINS
          - NOT_CONTAINS
          - INCLUDING_REGEX
          - EXCLUDING_REGEX
      description: A filter test to be applied to each row in the data set, where a match can return the row. Filters are string comparisons, and values and dimension names are not case-sensitive. Individual filters are either AND'ed or OR'ed within their parent filter group, according to the group's group type. You do not need to group by a specified dimension to filter against it.
      type: object
    ApiDataRow:
      type: object
      properties:
        clicks:
          type: number
          format: double
        impressions:
          type: number
          format: double
        keys:
          type: array
          items:
            type: string
        position:
          format: double
          type: number
        ctr:
          format: double
          type: number
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/webmasters: View and manage Search Console data for your verified sites
            https://www.googleapis.com/auth/webmasters.readonly: View Search Console data for your verified sites
externalDocs:
  url: https://developers.google.com/webmaster-tools/about
x-provenance:
  method: harvested
  publisher: Google
  source: https://searchconsole.googleapis.com/$discovery/rest?version=v1
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261110)