Scan a Website in Go
Submit a URL for surface scanning. Returns a scan ID and status URL for polling. The scan captures page snapshots, detects changes from previous scans, and identifies SEO regressions.
Endpoint
POST /api/v1/scan
Go Code
body := strings.NewReader(`{"url":"https://example.com","config":{"depth":2,"max_pages":50}}`)
req, _ := http.NewRequest("POST", "https://seodiff.io/api/v1/scan", 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
{"id":"s_abc123","status":"queued","status_url":"/api/v1/scans/s_abc123/status","created_at":"2025-03-15T10:30:00Z"}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.
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.
Google Search Console Data Sync
Pull GSC performance data into SEODiff for correlation with AI-readiness metrics.