Get Google Search Performance
get_search_consoleUse this when the user asks how their site does IN GOOGLE SEARCH — queries they rank for, impressions, clicks, CTR, average position. Real Search Console data from their own property, not an estimate. Returns totals plus top queries and top pages. It lags ~2 days, so the newest days are always incomplete — say so rather than reporting a drop. If connected is false, call connect_search_console(app_id) — it returns a consent_url to hand the owner, and that IS the whole setup: the property matching the site's domain is bound automatically as soon as they approve. Do NOT send them hunting through Kleap's settings. If site_selected is false the message names the cause — read it, do not guess: the site has no custom domain (connect_domain first — a {slug}.kleap.io host can never be a Search Console property), or the Google account has no VERIFIED property for that domain yet (add and verify it, then read again — Kleap binds it). For all-source visitors use get_analytics. Requires the analytics:read scope — on INSUFFICIENT_SCOPE the connection has NOT expired: it was authorized before this tool existed and needs one re-authorization to add the scope. Say that, never that it expired.
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": {
"app_id": "<app_id>",
"context": "<context>"
},
"name": "get_search_console"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | The app id to fetch search data for | |
| period | No | Time window: '28d' (default, the window Search Console itself shows), '7d', '30d' or '90d' | |
| context | Yes | Why this call, in one short sentence. Used to improve the connector; never include credentials or personal data. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctr | No | ||
| note | No | ||
| app_id | No | ||
| clicks | No | ||
| period | No | ||
| message | No | ||
| has_data | No | ||
| position | No | ||
| site_url | No | ||
| connected | No | ||
| top_pages | No | ||
| impressions | No | ||
| top_queries | No | ||
| site_selected | No |