POST /v1/score

Score any URL for AI readability — get penalties, benefits, and ranked recommendations.

Same engine as the public scanner at buildonto.dev/api/aio, but the API gates by Bearer token instead of a UI scanner and supports higher throughput. Subtractive penalty model — perfect = 100, each issue subtracts.

Endpoint

http
POST https://api.buildonto.dev/v1/score
Authorization: Bearer onto_sk_...
Content-Type: application/json

Request body

urlstringrequiredPublic URL to fetch and score.

Response

json
{
  "status": "success",
  "url": "https://stripe.com",
  "aio_score": 92,
  "grade": "Excellent",
  "hallucination_risk": "low",
  "insights": {
    "has_jsonld": true,
    "headings_ok": true,
    "robots_allowed": true,
    "uses_onto_sdk": false
  },
  "penalties": [ "Missing canonical link tag" ],
  "benefits": [ "Clean semantic HTML", "JSON-LD present" ],
  "recommendations": [
    { "priority": "Low", "title": "...", "description": "..." }
  ],
  "stats": { "raw_size": "605KB", "efficiency": "20.0%", "extraction_time_ms": 412 },
  "bot_preview": "# Stripe — Online payments…\n\n…"
}

Grade ranges

ScoreGradeHallucination risk
80–100Excellentlow
60–79Goodlow
40–59Needs workmedium
20–39AI-hostilehigh
0–19Invisiblehigh

Examples

bash
curl -X POST https://api.buildonto.dev/v1/score \
  -H "Authorization: Bearer $ONTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://stripe.com"}'