{
  "openapi": "3.0.3",
  "info": {
    "title": "Spindora Anahtar Kelime Aylık Aranma Hacmi API",
    "version": "1.0.0",
    "description": "Estimate monthly keyword search volume. Sync POST /estimate. Requires X-Spindora-Key (sp_kvol_*). Monthly user-level quota. Mandatory attribution: Powered by Spindora.",
    "contact": {
      "url": "https://www.spindorai.com/developers/keyword-volume-api"
    }
  },
  "servers": [
    {
      "url": "https://www.spindorai.com/api/public-keyword-volume"
    }
  ],
  "security": [{ "SpindoraApiKey": [] }],
  "components": {
    "securitySchemes": {
      "SpindoraApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Spindora-Key",
        "description": "API key from https://www.spindorai.com/api-keys (Anahtar Kelime Aylık Aranma Hacmi API tab, prefix sp_kvol_)"
      }
    },
    "schemas": {
      "KeywordVolumeRequest": {
        "type": "object",
        "required": ["keyword"],
        "properties": {
          "keyword": { "type": "string", "minLength": 2, "maxLength": 120, "example": "seo aracı" },
          "language": { "type": "string", "enum": ["tr", "en"], "default": "tr" },
          "country": { "type": "string", "default": "TR", "example": "TR" },
          "include_trends": { "type": "boolean", "default": true },
          "locale": { "type": "string", "enum": ["tr", "en"], "default": "tr" }
        }
      },
      "KeywordVolumeResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "keyword": { "type": "string" },
          "trend_score": { "type": "integer" },
          "estimated_volume": { "type": "integer" },
          "estimated_volume_range": { "type": "string" },
          "secondary_estimated_volume_range": { "type": "string", "nullable": true },
          "confidence_score": { "type": "integer" },
          "previous_estimated_volume": { "type": "integer", "nullable": true },
          "previous_estimated_volume_range": { "type": "string", "nullable": true },
          "change_percent": { "type": "number", "nullable": true },
          "history": { "type": "array", "items": { "type": "object" } },
          "related_keywords": { "type": "array", "items": { "type": "object" } },
          "attribution": { "type": "object" }
        }
      }
    }
  },
  "paths": {
    "/estimate": {
      "post": {
        "summary": "Estimate keyword monthly search volume",
        "operationId": "estimateKeywordVolume",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/KeywordVolumeRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Volume estimate",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/KeywordVolumeResponse" }
              }
            }
          },
          "401": { "description": "Invalid API key" },
          "403": { "description": "Plan expired" },
          "429": { "description": "Monthly quota exceeded" }
        }
      }
    }
  },
  "x-spindora-notes": [
    "Create keys at https://www.spindorai.com/api-keys → Anahtar Kelime Aylık Aranma Hacmi API tab.",
    "Monthly plans: Free 50, Starter 100, Pro 200, Pro+ 400, Enterprise 800 (user-level, shared across keys).",
    "Show Powered by Spindora attribution near results."
  ]
}
