history_sql
Query historical Google Search Console data with read-only SELECT statements to analyze clicks, impressions, position, queries, pages, countries, and devices beyond the 16-month limit.
Instructions
Run a read-only SELECT on the history database. Table rows (site, search_type, date, query, qkey, page,
country, device, clicks, impressions, position); sync_days. qkey is the multilingual match key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "history_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |