Skip to content
techrace/
TECHRACE DOCUMENTATION

Google Search Console

Connect Search Console properties and read search performance and URL inspection results.

Quick reference

PropertyValue
Platform valuesearchconsole
One connected accountOne Search Console property.
SupportedRead authorized property search performance
FeaturesAnalytics ✓
Provider approvalCompany OAuth app, Search Console API, verified customer property access and live validation
TokenAccess 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:

  1. In console.cloud.google.com create (or reuse) a project and a Web application OAuth client; copy its Client ID and Client secret.
  2. Enable the Google Search Console API.
  3. Authorized redirect URI: https://YOUR_DOMAIN/auth/callback/searchconsole
  4. 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.

PermissionRequested by defaultUsed for
https://www.googleapis.com/auth/webmasters.readonlyYesRead search performance (fixed; cannot be changed)

Connect an account

POST/api/v1/projects/{project_id}/connect-sessionsconnections:write

Create 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"
}
EOF

After 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

POST/api/v1/projects/{project_id}/analytics/search-console/queryanalytics:read

Clicks, 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
POST/api/v1/projects/{project_id}/analytics/search-console/inspectanalytics:read

Inspect how Google sees one URL of the property.

Limitations

  • Read-only.
  • One property is one connected account.

Common errors

ErrorMeaningFix
account_reconnection_requiredThe refresh token is no longer valid.Reconnect the property.