{
  "openapi": "3.1.0",
  "info": {
    "title": "DomChecker API",
    "description": "Real-time domain availability API featuring Hybrid Resolution Engine (RDAP/WHOIS/DNS) with Trust Layer metrics.",
    "version": "1.2.0"
  },
  "servers": [
    {
      "url": "https://domchecker.ru/api/v1"
    }
  ],
  "paths": {
    "/check.php": {
      "get": {
        "operationId": "checkDomain",
        "summary": "Check domain availability (Single or Bulk)",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "description": "Single domain to check (e.g. example.com)",
            "schema": { "type": "string" }
          },
          {
            "name": "domains",
            "in": "query",
            "description": "Comma-separated list of domains (max 100)",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "count": { "type": "integer" },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "domain": { "type": "string" },
                          "punycode": { "type": ["string", "null"] },
                          "status": { 
                            "type": "string",
                            "enum": ["available", "taken", "reserved", "unknown", "unsupported"]
                          },
                          "source": { "type": "string", "description": "rdap, whois, dns, heuristic or none" },
                          "confidence": { "type": "number", "format": "float", "description": "Score from 0.0 to 1.0 representing data accuracy" },
                          "flags": { "type": "array", "items": { "type": "string" } },
                          "latency_ms": { "type": "integer" },
                          "price_rub": { "type": ["integer", "null"] },
                          "release_date": { "type": ["string", "null"], "format": "date" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
