Quick reference
| Property | Value |
|---|---|
| Platform value | searchconsole |
| One connected account | One Search Console property. |
| Supported | Read authorized property search performance |
| Features | Analytics ✓ |
| Provider approval | Company OAuth app, Search Console API, verified customer property access and live validation |
| Token | Access token plus refresh token (renewed automatically) |
Before you start
The person connecting needs:
- A Google account with access to a verified Search Console property.
You (the platform owner) need:
- In console.cloud.google.com create (or reuse) a project and a Web application OAuth client; copy its Client ID and Client secret.
- Enable the Google Search Console API.
- Authorized redirect URI: https://YOUR_DOMAIN/auth/callback/searchconsole
- On the OAuth consent screen, add your Google account as a test user while the app is unverified.
Permissions (scopes)
Techrace puts these permissions in the login link. The person approves them on the provider's own screen; only approved permissions are granted.
| Permission | Requested by default | Used for |
|---|---|---|
https://www.googleapis.com/auth/webmasters.readonly | Yes | Read search performance (fixed; cannot be changed) |
Connect an account
/api/v1/projects/{project_id}/connect-sessionsconnections:writeCreate a connect link with provider "searchconsole" and send the person's browser to the returned url. return_url is the page in your app where they land afterwards (https, or http://localhost while testing).
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/connect-sessions" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"provider": "searchconsole",
"return_url": "https://your-app.com/integrations/done"
}
EOFAfter approval the person lands on your return_url with ?connected=searchconsole&customer_id=…&connection_id=…, or ?error=access_denied|expired|failed&provider=searchconsole. Your webhook also receives account.connected. Keep the connection_id: every call below uses it.
Search performance
/api/v1/projects/{project_id}/analytics/search-console/queryanalytics:readClicks, impressions, CTR and position for the connected property. See the Analytics group in the API reference for all fields.
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/analytics/search-console/query" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"connection_id": "$CONNECTION_ID",
"since": "2026-11-01",
"until": "2026-11-07"
}
EOF/api/v1/projects/{project_id}/analytics/search-console/inspectanalytics:readInspect how Google sees one URL of the property.
Limitations
- Read-only.
- One property is one connected account.
Common errors
| Error | Meaning | Fix |
|---|---|---|
account_reconnection_required | The refresh token is no longer valid. | Reconnect the property. |