API
Every dashboard action is a JSON endpoint. Create a key, send it as a bearer token, and drive audits, crawls and reports from your own code or agent.
Authentication
Create a key under Account → API keys. A key acts as its creator inside the workspace it was created in. Send it on every request:
Authorization: Bearer sfa_…
Keys can be revoked at any time. Anything using a revoked key gets 401.
Base URL and conventions
https://seofixagent.com/api. Requests and responses are JSON. Credits are charged exactly as in the dashboard, and the same refunds apply. Errors carry { "error": "..." }; 402 means the workspace is out of credits and includes balance.
Audits
POST /api/audit { "url": "https://example.com/" }
GET /api/audit → recent audits
GET /api/audit?id=123 → full result + previous run + history
DELETE /api/audit?id=123
POST /api/audit/share { "id": 123 } → { "url": "https://seofixagent.com/r/<token>" }
GET /api/audit/pdf?id=123 → application/pdf
GET /api/prompt?auditId=123 → { "prompt": "..." }
The audit result contains score, grade, counts, checks[] (id, category, title, status, weight, detail, fix), page, graph, aiReadiness and redirectHops.
Crawls
POST /api/crawl { "url": "https://example.com/", "limit": 100 } → { "id": "…", "status": "queued" }
GET /api/crawl?id=… → crawl, pages[], issues[], analysis, comparison
DELETE /api/crawl?id=… → stop
GET /api/crawl/pdf?id=… → application/pdf
Poll GET until crawl.status is done, stopped, cancelled or failed. issues[] groups failing checks with the affected pages; comparison diffs against the previous crawl of the same site.
Monitoring, keywords, rankings, AI visibility
GET/POST/PATCH/DELETE /api/schedules
GET /api/keywords?q=seed
POST /api/keywords/metrics { "keywords": ["…"], "locationCode": 2840 }
GET/POST/DELETE /api/rankings
GET/POST/DELETE /api/ai-visibility
GET /api/gsc
GET /api/vitals (POST { "url", "strategy": "mobile" })
GET /api/me → balance, workspace, plan
GET /api/account/export → everything in the workspace as JSON
Example: audit and print the failures
curl -s https://seofixagent.com/api/audit \
-H "Authorization: Bearer $SEOFIXAGENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/"}' \
| jq '.checks[] | select(.status=="fail") | {title, detail, fix}'
Rate limits
Per workspace: 10 audits, 3 crawl starts, 15 keyword searches and 5 vitals checks per minute. 429 carries the limit in error.