{
  "openapi": "3.0.3",
  "info": {
    "title": "OpenNOD API",
    "description": "Scan any domain for AI agent readiness. Returns a NOD Score (0-100) across 75 checks in 7 categories.",
    "version": "1.0.0",
    "contact": {
      "name": "OpenNOD",
      "url": "https://opennod.ai/about"
    },
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    }
  },
  "servers": [
    {
      "url": "https://opennod.ai",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/scan": {
      "post": {
        "summary": "Scan a domain",
        "description": "Scans the given domain and returns a NOD Score with category breakdowns. Results are cached for 24 hours.",
        "operationId": "scanDomain",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Domain to scan (e.g., example.com)",
                    "example": "stripe.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scan results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nod_score": {
                      "type": "number",
                      "description": "Composite score 0-100",
                      "example": 42.5
                    },
                    "label": {
                      "type": "string",
                      "enum": ["Agent Invisible", "Agent Aware", "Agent Accessible", "Agent Ready", "Agent Native"],
                      "example": "Agent Accessible"
                    },
                    "url": {
                      "type": "string",
                      "example": "https://stripe.com"
                    },
                    "categories": {
                      "type": "object",
                      "description": "Per-category score breakdowns"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid domain"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    }
  }
}
