query_search_analytics
Retrieve search analytics data including clicks, impressions, CTR, and position for a website. Filter by date range, dimensions, search type, and apply dimension filters to analyze performance.
Instructions
Query Search Analytics data for a website.
Args: site_url: The site to query, e.g. 'https://example.com/' or 'sc-domain:example.com'. start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. dimensions: Group results by these dimensions. Valid values: date, query, page, country, device, searchAppearance. Omit to get aggregate totals with no grouping. search_type: Type of search to filter by. Values: web (default), image, video, news, discover, googleNews. row_limit: Maximum number of rows to return (default 1000). start_row: Zero-based offset for pagination (default 0). data_state: Include only 'final' (default) confirmed data, or 'all'. aggregation_type: How to aggregate data. 'auto' (default), 'byPage', or 'byProperty'. dimension_filter_groups: List of filter groups to apply. Each group has 'groupType' ('and'/'or') and 'filters' list. Each filter: {dimension, expression, operator}. Operators: equals, notEquals, contains, notContains, beginsWith, notBeginsWith, endsWith, notEndsWith, isEmpty, isNotEmpty.
Returns: Dictionary with 'rows' (list of result rows) and 'responseAggregationType'. Each row contains dimension values in 'keys' plus: - clicks (total clicks) - impressions (total impressions) - ctr (click-through rate) - position (average search position)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| start_date | Yes | ||
| end_date | Yes | ||
| dimensions | No | ||
| search_type | No | web | |
| row_limit | No | ||
| start_row | No | ||
| data_state | No | final | |
| aggregation_type | No | ||
| dimension_filter_groups | No |