Google Search Console Data Sync in Go
Sync your Google Search Console data to correlate traditional search performance (clicks, impressions, CTR, position) with AI-readiness metrics. After syncing, you can identify pages where low ACRI scores correlate with declining traffic.
Endpoint
POST /api/v1/gsc/sync
Go Code
body := strings.NewReader(`{"site_url":"https://example.com","date_range":"last_90_days"}`)
req, _ := http.NewRequest("POST", "https://seodiff.io/api/v1/gsc/sync", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SEODIFF_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var result map[string]any
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println("Status:", result["status"])Example Response
{"status":"synced","pages_imported":1247,"date_range":{"start":"2025-01-01","end":"2025-03-31"}}All requests require an API key in the Authorization: Bearer header. Get your API key →
Same Endpoint, Other Languages
More Go Examples
Evaluate pSEO Pages
Test programmatic pages against assertion rules. The core agentic evaluation endpoint.
Scan a Website
Enqueue a surface scan for diff detection and SEO regression identification.
Validate in CI/CD Pipeline
CI-friendly endpoint that blocks deployments when SEO regressions are detected.
Trigger Deep Audit
Start a comprehensive multi-page crawl with PageRank, link analysis, and pSEO diagnostics.
Validate llms.txt File
Test your llms.txt file against the specification and get actionable fixes.