Google Search Console API
  1. searchanalytics
Google Search Console API
  • urlInspection
    • /v1/urlInspection/index:inspect
      POST
  • urlTestingTools
    • /v1/urlTestingTools/mobileFriendlyTest:run
      POST
  • sites
    • /webmasters/v3/sites
      GET
    • /sites
      GET
    • /webmasters/v3/sites/{siteUrl}
      DELETE
    • /sites/{siteUrl}
      DELETE
    • /webmasters/v3/sites/{siteUrl}
      GET
    • /sites/{siteUrl}
      GET
    • /webmasters/v3/sites/{siteUrl}
      PUT
    • /sites/{siteUrl}
      PUT
  • searchanalytics
    • /webmasters/v3/sites/{siteUrl}/searchAnalytics/query
      POST
    • /sites/{siteUrl}/searchAnalytics/query
      POST
  • sitemaps
    • /webmasters/v3/sites/{siteUrl}/sitemaps
      GET
    • /sites/{siteUrl}/sitemaps
      GET
    • /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
      DELETE
    • /sites/{siteUrl}/sitemaps/{feedpath}
      DELETE
    • /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
      GET
    • /sites/{siteUrl}/sitemaps/{feedpath}
      GET
    • /webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}
      PUT
    • /sites/{siteUrl}/sitemaps/{feedpath}
      PUT
  1. searchanalytics

/sites/{siteUrl}/searchAnalytics/query

POST
/sites/{siteUrl}/searchAnalytics/query
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.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://searchconsole.googleapis.com//sites//searchAnalytics/query' \
--header 'Content-Type: application/json' \
--data-raw '{
    "aggregationType": "AUTO",
    "dataState": "DATA_STATE_UNSPECIFIED",
    "dimensionFilterGroups": [
        {
            "filters": [
                {
                    "dimension": "QUERY",
                    "expression": "string",
                    "operator": "EQUALS"
                }
            ],
            "groupType": "AND"
        }
    ],
    "dimensions": [
        "DATE"
    ],
    "endDate": "string",
    "rowLimit": 0,
    "searchType": "WEB",
    "startDate": "string",
    "startRow": 0,
    "type": "WEB"
}'
Response Response Example
{
    "responseAggregationType": "AUTO",
    "rows": [
        {
            "clicks": 0,
            "ctr": 0,
            "impressions": 0,
            "keys": [
                "string"
            ],
            "position": 0
        }
    ]
}

Request

Path Params

Body Params application/json

Examples

Responses

🟢200Successful response
application/json
Body

Modified at 2022-09-12 11:46:11
Previous
/webmasters/v3/sites/{siteUrl}/searchAnalytics/query
Next
/webmasters/v3/sites/{siteUrl}/sitemaps
Built with