google_search_console_get_search_analytics

Get Search Analytics Data

Google

Description

Query Google Search Console search analytics data. Returns clicks, impressions, CTR, and position. Args: site_url (string, required): The Search Console property URL. start_date (string, required): Start date in YYYY-MM-DD format. end_date (string, required): End date in YYYY-MM-DD format (must be >= start_date). dimensions (array, optional): Group by dimensions. Valid: query, page, device, country, date, searchAppearance. Note: searchAppearance cannot be combined with query, page, device, or country — only with date. search_type (string, optional): web (default), image, video, news, discover, googleNews. dimension_filter_groups (array, optional): Filter by dimension values. Note: Cannot combine aggregate_by=byPage with a page dimension filter. aggregate_by (string, optional): auto (default), byPage, byProperty, byNewsShowcasePanel. row_limit (int, optional): Number of rows to return. Range: [1, 25000]. Default: 25. start_row (int, optional): 0-based row offset for pagination. Default: 0. Returns: data: array of { keys, clicks, impressions, ctr, position } rowCount, responseAggregationType, firstIncompleteDate (if data is incomplete) Note: Data freshness lag — recent dates (last 3+ days) may be incomplete. Check firstIncompleteDate in response.

Read-onlyOpen-world

Usage

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "google_search_console_get_search_analytics",
    "arguments": {
      "site_url": "https://example.com/",
      "start_date": "2024-01-01",
      "end_date": "2024-01-31",
      "reason": "Get overall search performance"
    }
  }
}

Parameters

NameTypeRequiredDescription
site_url string Required The Search Console property URL (e.g. sc-domain:example.com or just example.com).minLength: 1
start_date string Required Start date in YYYY-MM-DD format.
end_date string Required End date in YYYY-MM-DD format. Must be >= start_date.
reason string Required Why this tool call is neededminLength: 1, maxLength: 500
Optional parameters (6)
NameTypeRequiredDescription
dimensions array Optional Group results by these dimensions. searchAppearance can only be combined with date.
search_type string Optional Filter by search type. Default: web.
web image video news discover googleNews
dimension_filter_groups array Optional Filter rows by dimension values.
aggregate_by string Optional Aggregation level. byPage cannot be combined with page dimension filters.
auto byPage byProperty byNewsShowcasePanel
row_limit integer Optional Number of rows to return. Range: 1-25000. Default: 25.min: 1, max: 25000
start_row integer Optional Zero-based row offset for pagination. Default: 0.min: 0

Examples

Basic query

{
  "site_url": "https://example.com/",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "reason": "Get overall search performance"
}

hopkin google ch-console-get-search-analytics --site-url https://example.com/ --start-date 2024-01-01 --end-date 2024-01-31

By query

{
  "site_url": "https://example.com/",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "dimensions": [
    "query"
  ],
  "reason": "Get top queries"
}

hopkin google ch-console-get-search-analytics --site-url https://example.com/ --start-date 2024-01-01 --end-date 2024-01-31 --dimensions query

By page

{
  "site_url": "https://example.com/",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "dimensions": [
    "page"
  ],
  "reason": "Get top pages"
}

hopkin google ch-console-get-search-analytics --site-url https://example.com/ --start-date 2024-01-01 --end-date 2024-01-31 --dimensions page