Top search queries
get_top_queriesRetrieves the top search queries for a property, sorted by clicks, and returns clicks, impressions, CTR, and average position. Streamlines access to search analytics data.
Instructions
Convenience wrapper over search_analytics for the most common ask: the top search queries for a property, sorted by clicks descending (the API's default order). Each row has keys[0] = the query string plus clicks, impressions, ctr (a FRACTION 0..1) and position. Dates are calendar dates in Pacific Time, end_date inclusive; final data lags ~2-3 days. Anonymized long-tail queries are never returned. Same endpoint and quota as search_analytics — use search_analytics directly for other dimensions, pagination, fresh data or regex filters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many top queries to return (1..25000; default 100). | |
| device | No | Only count traffic from this device class. | |
| country | No | Only count traffic from this country — ISO 3166-1 alpha-3 code, e.g. "usa". | |
| end_date | Yes | Last date of the range, YYYY-MM-DD, Pacific Time, inclusive. | |
| site_url | Yes | The property EXACTLY as registered in Search Console. Two formats: URL-prefix — a full URL with scheme and trailing slash, e.g. "https://example.com/" (http/https and www/non-www are different properties), or domain property — "sc-domain:example.com" (no scheme, no slash). A mismatched value returns 403/404; list_sites shows the exact registered values. | |
| start_date | Yes | First date of the range, YYYY-MM-DD, Pacific Time. | |
| page_filter | No | Only count traffic to pages whose URL CONTAINS this substring, e.g. "/blog/". |