{
  "openapi": "3.1.0",
  "info": {
    "title": "sagasu18 Public Catalog Metadata API",
    "version": "2026-05-07",
    "summary": "Crawler-safe public metadata search for sagasu18.",
    "description": "sagasu18 exposes public catalog metadata search and status endpoints. It does not host media files, does not sell x402 API calls, and does not require payment for the listed public discovery endpoints."
  },
  "servers": [
    {
      "url": "https://www.sagasu18.com"
    }
  ],
  "paths": {
    "/api/search": {
      "get": {
        "summary": "Search public catalog metadata",
        "description": "Search crawler-safe public catalog metadata and return official source links. Generic /api crawling remains closed; this endpoint is explicitly allowed in robots.txt.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Search query."
          },
          {
            "name": "platforms",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Comma-separated platform ids, for example fc2ppv,myfans,candfans,dlsite."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "required": false
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "cache"
              ]
            },
            "required": false,
            "description": "Use cache mode when an automated reader wants a low-cost deterministic sample."
          }
        ],
        "responses": {
          "200": {
            "description": "Public metadata search results."
          },
          "429": {
            "description": "Rate limited; retry later."
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "summary": "Service health and platform capability status",
        "responses": {
          "200": {
            "description": "Service and acquisition capability status."
          }
        }
      }
    },
    "/ai-review.txt": {
      "get": {
        "summary": "Automated-reader safe public status",
        "responses": {
          "200": {
            "description": "Plain text crawler-safe service summary."
          }
        }
      }
    }
  }
}
