{
  "success": true,
  "data": {
    "title": "Roblox Group Search API v2.0",
    "description": "An optimized Cloudflare Worker proxy for searching Roblox groups with enhanced performance and thumbnails",
    "version": "2.0.0",
    "features": [
      "Concurrent role fetching with batching",
      "Group thumbnails for all groups",
      "Smart caching with compression",
      "Circuit breaker pattern for reliability",
      "Rate limiting with exponential backoff",
      "Request deduplication",
      "Performance monitoring",
      "Cache management with selective reset",
      "User group membership lookup"
    ],
    "endpoints": {
      "/search": {
        "method": "GET",
        "description": "Search for Roblox groups by keyword (includes roles and thumbnails for each group)",
        "parameters": {
          "keyword": {
            "type": "string",
            "required": true,
            "description": "The keyword or phrase to search for (2-50 characters)",
            "example": "gaming"
          },
          "limit": {
            "type": "integer",
            "required": false,
            "description": "Number of results per request",
            "options": [
              10,
              25,
              50,
              100
            ],
            "default": 10
          },
          "prioritizeExactMatch": {
            "type": "boolean",
            "required": false,
            "description": "Whether to prioritize exact matches",
            "default": false
          },
          "cursor": {
            "type": "string",
            "required": false,
            "description": "Paging cursor for pagination"
          }
        },
        "example": "/search?keyword=gaming&limit=25&prioritizeExactMatch=true"
      },
      "/group/{groupId}": {
        "method": "GET",
        "description": "Get detailed information about a specific group including roles and thumbnail",
        "parameters": {
          "groupId": {
            "type": "integer",
            "required": true,
            "description": "The Roblox group ID",
            "example": 12345678,
            "location": "path"
          }
        },
        "example": "/group/12345678"
      },
      "/health": {
        "method": "GET",
        "description": "Check API health and circuit breaker status"
      },
      "/user/{userId}/groups": {
        "method": "GET",
        "description": "Get a user's group membership information including roles, thumbnails, and notification preferences",
        "parameters": {
          "userId": {
            "type": "integer",
            "required": true,
            "description": "The Roblox user ID",
            "example": 12345678,
            "location": "path"
          },
          "includeLocked": {
            "type": "boolean",
            "required": false,
            "description": "Whether to include locked groups",
            "default": false
          },
          "includeNotificationPreferences": {
            "type": "boolean",
            "required": false,
            "description": "Whether to include notification preferences",
            "default": false
          },
          "discoveryType": {
            "type": "integer",
            "required": false,
            "description": "Discovery type filter",
            "options": [
              0,
              1
            ],
            "default": 0
          }
        },
        "example": "/user/12345678/groups?includeLocked=true&includeNotificationPreferences=true&discoveryType=0"
      },
      "/cache/reset": {
        "method": "POST | DELETE",
        "description": "Reset cache for a specific keyword or all cache entries",
        "authentication": "Optional: Bearer token in Authorization header or X-API-Key header",
        "parameters": {
          "keyword": {
            "type": "string",
            "required": false,
            "description": "Specific keyword to clear from cache. If omitted, clears all cache entries (requires auth)",
            "example": "gaming"
          }
        },
        "examples": {
          "Clear specific keyword": "POST /cache/reset?keyword=gaming",
          "Clear all cache (auth required)": "DELETE /cache/reset"
        }
      }
    },
    "response_format": {
      "success": "boolean",
      "data": "RobloxGroupSearchResponse | any",
      "error": "string | null",
      "message": "string | null",
      "metadata": {
        "cached": "boolean",
        "processingTime": "number (ms)",
        "rateLimitRemaining": "number",
        "rateLimitReset": "number (timestamp)"
      }
    },
    "thumbnail_info": {
      "size": "150x150",
      "format": "Png",
      "description": "All groups include thumbnail data with imageUrl, state, and version fields"
    },
    "rate_limits": {
      "requests_per_minute": 100,
      "headers": {
        "X-RateLimit-Limit": "Total requests allowed per window",
        "X-RateLimit-Remaining": "Requests remaining in current window",
        "X-RateLimit-Reset": "Timestamp when rate limit resets"
      },
      "exemptions": "Cache reset endpoint with valid authentication bypasses rate limits"
    }
  },
  "metadata": {
    "cached": false,
    "processingTime": 0
  }
}