Evaluate pSEO Pages in Go

Submit a list of URLs and assertion rules. SEODiff crawls each page, evaluates every assertion, and returns a pass/fail verdict with per-page diagnostics. Supports async mode for LLM tool-call timeouts and baseline diffing for regression detection.

Endpoint

POST /api/v1/agent/evaluate

Go Code

body := strings.NewReader(`{"urls":["https://example.com/city/springfield","https://example.com/city/shelbyville"],"assertions":[{"rule":"has_h1"},{"rule":"no_placeholders"},{"rule":"min_word_count","value":300},{"rule":"has_schema"}],"wait":true}`)
req, _ := http.NewRequest("POST", "https://seodiff.io/api/v1/agent/evaluate", 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

{"evaluation_id":"eval_abc123","status":"passed","pages_evaluated":2,"pass_rate":100,"duration_ms":1240,"summary":"All 2 pages passed 4 assertions.","metrics":{"avg_word_count":587,"avg_acri":74,"schema_coverage":"100%","h1_coverage":"100%","meta_desc_coverage":"100%"}}
Authentication

All requests require an API key in the Authorization: Bearer header. Get your API key →

Same Endpoint, Other Languages

More Go Examples

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.

Google Search Console Data Sync

Pull GSC performance data into SEODiff for correlation with AI-readiness metrics.

Start testing in 30 seconds

Get an API key and run your first evaluation with a single cURL command.

Get API Key or Read full API docs