{
  "openapi": "3.1.0",
  "info": {
    "title": "SEOAIO free readiness audit",
    "version": "1.1.0",
    "description": "Runs SEOAIO's free AI readiness audit on one domain: a crawl of the site's own public pages that checks whether AI engines can reach, read and attribute it, and returns the measured scores, findings and an action plan.\n\nIt asks no AI engine anything, so nothing in the response says whether an engine cites or recommends the site. That takes sampled answers, which SEOAIO's paid plans and the Deep Scan run. Always show notMeasured with a result. Absent means not measured, never zero.\n\nNo key is needed. Each call is a real crawl and spends one unit of a daily free allowance: 3 per domain and 30 per connection. Nothing on the audited site is changed.",
    "contact": {
      "email": "contact@seoaio.ai",
      "url": "https://seoaio.ai/contact"
    },
    "termsOfService": "https://seoaio.ai/terms"
  },
  "servers": [
    {
      "url": "https://seoaio.ai"
    }
  ],
  "externalDocs": {
    "description": "API documentation",
    "url": "https://seoaio.ai/api-docs"
  },
  "paths": {
    "/api/public/v1/audit": {
      "post": {
        "operationId": "runReadinessAudit",
        "summary": "Run the free AI readiness audit on a domain",
        "description": "POST only: the call crawls the domain you name, so it is never exposed on GET, where a link previewer could fire it. Responses are never cached.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "The site to audit, such as example.com.",
                    "examples": [
                      "example.com"
                    ]
                  },
                  "client": {
                    "type": "string",
                    "description": "Optional free text naming your integration, such as my-app/1.0.0. Logged, never trusted."
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The audit ran. status says whether the whole page was read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditResult"
                }
              }
            }
          },
          "400": {
            "description": "invalid_body, invalid_domain, unreachable or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditError"
                }
              }
            }
          },
          "402": {
            "description": "quota_exhausted: today's free allowance for this domain or connection is spent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many calls in a minute; try again shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AuditResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "apiVersion": {
            "type": "string"
          },
          "measuredAt": {
            "type": "string",
            "format": "date-time"
          },
          "domain": {
            "type": "string"
          },
          "fetchedUrl": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "partial",
              "failed"
            ],
            "description": "partial means part of the page could not be read; notMeasured says which part."
          },
          "score": {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "grade": {
                "type": "null"
              },
              "measures": {
                "type": "string",
                "description": "What the number is. Read it before showing the number."
              },
              "deprecated": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "value",
              "label",
              "grade",
              "measures",
              "deprecated"
            ],
            "additionalProperties": false,
            "description": "DEPRECATED. A retired 60/40 blend of the two component scores, kept only because v1 promised the field. It is not an AI visibility score. Show components instead."
          },
          "components": {
            "type": "array",
            "description": "The measured scores, each a count of on-page checks passed, with its provenance.",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "number"
                },
                "provenance": {
                  "type": "string"
                },
                "passed": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "total": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "key",
                "label",
                "value",
                "provenance",
                "passed",
                "total"
              ],
              "additionalProperties": false
            }
          },
          "aeoReadiness": {
            "type": "object",
            "properties": {
              "passed": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "score": {
                "type": "number"
              }
            },
            "required": [
              "passed",
              "total",
              "score"
            ],
            "additionalProperties": false
          },
          "findings": {
            "type": "array",
            "maxItems": 25,
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "benefit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "severity": {
                  "type": "string"
                },
                "detail": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "provenance": {
                  "type": "string"
                }
              },
              "required": [
                "title",
                "benefit",
                "severity",
                "detail",
                "provenance"
              ],
              "additionalProperties": false
            }
          },
          "actionPlan": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "benefit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "predictedImpact": {
                  "type": "number",
                  "description": "A prediction, not a measurement."
                },
                "confidence": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "deprecated": true,
                  "description": "DEPRECATED in 1.1.0. Null on every audit run since 2026-11-18: it was the rule's confidence word written as a percentage, which no reading produced. Read ruleConfidence."
                },
                "ruleConfidence": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "high",
                    "medium",
                    "low",
                    null
                  ],
                  "description": "Added in 1.1.0. high, medium or low: the rule registry's confidence in the source behind the fix, a published rule and not a measurement. Null for a technical fix, which has none."
                }
              },
              "required": [
                "title",
                "benefit",
                "predictedImpact",
                "confidence",
                "ruleConfidence"
              ],
              "additionalProperties": false
            }
          },
          "authority": {
            "type": [
              "object",
              "null"
            ],
            "description": "The site's place in Common Crawl's domain graph. state is ranked (measured), absent (measured: no links found) or unavailable (not measured, with the reason).",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "ranked",
                  "absent",
                  "unavailable"
                ]
              },
              "release": {
                "type": "string"
              },
              "nodes": {
                "type": "integer"
              },
              "domainLookedUp": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "row": {
                "type": "object"
              }
            },
            "required": [
              "state"
            ]
          },
          "notMeasured": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What this run did NOT measure, as sentences. Always includes that no AI engine was asked anything. Show these with the result; leaving them out turns a readiness check into a claim of visibility."
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 12
          },
          "measurementIntegrity": {
            "type": "object",
            "properties": {
              "everyNumberMeasured": {
                "type": "boolean"
              },
              "nothingChangedOnYourSite": {
                "type": "boolean"
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "everyNumberMeasured",
              "nothingChangedOnYourSite",
              "note"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "ok",
          "apiVersion",
          "measuredAt",
          "domain",
          "fetchedUrl",
          "status",
          "score",
          "components",
          "aeoReadiness",
          "findings",
          "actionPlan",
          "authority",
          "notMeasured",
          "notes",
          "measurementIntegrity"
        ],
        "additionalProperties": false
      },
      "AuditError": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "apiVersion": {
            "type": "string"
          },
          "error": {
            "type": "string",
            "enum": [
              "invalid_body",
              "invalid_domain",
              "unreachable",
              "failed",
              "quota_exhausted",
              "method_not_allowed",
              "rate_limited"
            ]
          },
          "message": {
            "type": "string",
            "description": "A sentence for a person, safe to show as is."
          },
          "example": {
            "type": "object",
            "description": "Sent with method_not_allowed only: the request to make instead."
          }
        },
        "required": [
          "ok",
          "apiVersion",
          "error",
          "message"
        ],
        "additionalProperties": false
      }
    }
  }
}