google_search_console_get_top_queries

Get Top Search Queries

Google

Description

Get top queries with clicks, impressions, CTR, and position. Automatically identifies high-opportunity queries (position 4-20, impressions >100, CTR <5%). Args: site_url (string, required): The Search Console property URL. days (int, optional): Number of days to look back. Range: [1, 90]. Default: 28. start_date / end_date (string, optional): Explicit date range (overrides days). page_filter (string, optional): Filter to queries for a specific URL (exact match). device (string, optional): Filter by device type. Valid: desktop, mobile, tablet. search_type (string, optional): web (default), image, video, news. row_limit (int, optional): Queries per page. 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: top query rows for this page highOpportunityQueries: queries with ranking potential (position 4-20, impressions >100, CTR <5%), derived from this page only — not from the whole result set rowCount: rows in this page pagination: { hasMore, nextCursor? } — nextCursor is absent on the last page site_url, dateRange 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, including the date window it resolved to — so a crawl that spans midnight on a relative range (days) is rejected rather than paging a window that has since shifted. Start again from the first page if that happens. IMPORTANT — when you need a complete, consistent result set, raise row_limit and take it in ONE call rather than crawling. Search Console sorts by clicks descending and orders ties "in an arbitrary way", and that tie order is not stable between calls; on a typical property most queries have 0 clicks and are therefore all tied, so a multi-page crawl can repeat some and miss others. Use the cursor for browsing, and treat a crawled set as approximate rather than exact.

Read-onlyOpen-world

Usage

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "google_search_console_get_top_queries",
    "arguments": {
      "site_url": "https://example.com/",
      "days": 28,
      "reason": "Get top queries for last 28 days"
    }
  }
}

Parameters

NameTypeRequiredDescription
site_url string Required The Search Console property URL (e.g. sc-domain:example.com or just example.com).minLength: 1
reason string Required Why this tool call is neededminLength: 1, maxLength: 500
Optional parameters (9)
NameTypeRequiredDescription
days integer Optional Number of days to look back. Default: 28. Range: 1-90.min: 1, max: 90
start_date string Optional Override start date (YYYY-MM-DD). Takes precedence over days if both provided.maxLength: 32
end_date string Optional Override end date (YYYY-MM-DD). Takes precedence over days if both provided.maxLength: 32
page_filter string Optional Filter to queries driving traffic to this page (absolute URL or relative path, e.g. "/blog").minLength: 1
device string Optional Filter by device type.
desktop mobile tablet
search_type string Optional Filter by search type. Default: web.
web image video news discover googleNews
row_limit integer Optional Queries per page. Range: 1-25000. Default: 25. When pagination.hasMore is true, follow pagination.nextCursor rather than raising this.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

Last 28 days

{
  "site_url": "https://example.com/",
  "days": 28,
  "reason": "Get top queries for last 28 days"
}

hopkin google ch-console-get-top-queries --site-url https://example.com/ --days 28

Filter by page

{
  "site_url": "https://example.com/",
  "days": 28,
  "page_filter": "https://example.com/blog",
  "reason": "Queries for blog section"
}

hopkin google ch-console-get-top-queries --site-url https://example.com/ --days 28 --page-filter https://example.com/blog

Next page

{
  "site_url": "https://example.com/",
  "days": 28,
  "cursor": "<pagination.nextCursor from the previous response>",
  "reason": "Continue past the first 25 queries"
}

hopkin google ch-console-get-top-queries --site-url https://example.com/ --days 28 --cursor <pagination.nextCursor from the previous response>