{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/influship-com/json-schema/influship-com-search-request-schema.json",
  "title": "SearchRequest",
  "description": "AI-powered semantic search request",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/influship-com-openapi.json#/components/schemas/SearchRequest",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "Natural language search query"
    },
    "platforms": {
      "description": "Filter results to specific platforms",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Platform"
      }
    },
    "filters": {
      "description": "Additional filters",
      "$ref": "#/$defs/CommonFilters"
    },
    "limit": {
      "default": 25,
      "description": "Maximum results to return. Start with 5 for a small trial; default is 25.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "creator_kinds": {
      "description": "Restrict results to specific creator kinds (e.g. INFLUENCER vs THEME_PAGE). Omit for no filter.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "INFLUENCER",
          "THEME_PAGE"
        ]
      }
    }
  },
  "required": [
    "query"
  ],
  "$defs": {
    "CommonFilters": {
      "type": "object",
      "properties": {
        "followers": {
          "description": "Filter by follower count",
          "$ref": "#/$defs/FollowersFilter"
        },
        "engagement_rate": {
          "description": "Filter by engagement rate",
          "$ref": "#/$defs/EngagementRateFilter"
        },
        "verified": {
          "description": "Filter by verified status",
          "type": "boolean"
        }
      },
      "description": "Common filters for creator discovery"
    },
    "EngagementRateFilter": {
      "type": "object",
      "properties": {
        "min": {
          "description": "Minimum engagement rate (%)",
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "max": {
          "description": "Maximum engagement rate (%)",
          "type": "number",
          "minimum": 0,
          "maximum": 100
        }
      },
      "description": "Filter by engagement rate range"
    },
    "FollowersFilter": {
      "type": "object",
      "properties": {
        "min": {
          "description": "Minimum follower count",
          "type": "number",
          "minimum": 0
        },
        "max": {
          "description": "Maximum follower count",
          "type": "number",
          "minimum": 0
        }
      },
      "description": "Filter by follower count range"
    },
    "Platform": {
      "type": "string",
      "enum": [
        "instagram"
      ],
      "description": "Social media platform"
    }
  }
}