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): Rows per page. Range: [1, 25000]. Default: 25. cursor (string, optional): Opaque cursor from a previous response's pagination.nextCursor. Omit for the first page; never construct one by hand. Returns: data: array of { keys, clicks, impressions, ctr, position } rowCount: rows in this page (Search Console reports no grand total) pagination: { hasMore, nextCursor? } — nextCursor is absent on the last page responseAggregationType, firstIncompleteDate (if data is incomplete) Pagination: when pagination.hasMore is true, call again with the same parameters plus cursor set to pagination.nextCursor. A cursor only continues the exact call that returned it — changing the dates, dimensions or filters invalidates it, and the call is rejected rather than silently returning rows from a different query. IMPORTANT — when you need a complete, consistent result set, raise row_limit and take it in ONE call rather than crawling. Search Console sorts rows by clicks descending and orders ties "in an arbitrary way", and that tie order is not stable between calls. Since most rows on a typical property have 0 clicks, they are nearly all tied, so a multi-page crawl can repeat some rows and miss others. A single call has no such problem: one call, one ordering. row_limit goes up to 25000. Use the cursor for browsing, or when the result genuinely exceeds one page, and treat a crawled set as approximate rather than exact. 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.maxLength: 32
end_date string Required End date in YYYY-MM-DD format. Must be >= start_date.maxLength: 32
reason string Required Why this tool call is neededminLength: 1, maxLength: 500
Optional parameters (7)
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 Rows per page. Range: 1-25000. Default: 25. When pagination.hasMore is true, follow pagination.nextCursor rather than raising this — a large page can exceed the MCP client's response limit.min: 1, max: 25000
cursor string Optional Opaque cursor from a previous response's pagination.nextCursor. Pass it back with the same other parameters to fetch the next page; do not construct or edit it. Omit it for the first page.minLength: 1, maxLength: 512
connection_id string Optional Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs.

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

Next page

{
  "site_url": "https://example.com/",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "dimensions": [
    "query"
  ],
  "cursor": "<pagination.nextCursor from the previous response>",
  "reason": "Continue a crawl past the first page"
}

hopkin google ch-console-get-search-analytics --site-url https://example.com/ --start-date 2024-01-01 --end-date 2024-01-31 --dimensions query --cursor <pagination.nextCursor from the previous response>