> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Index Suggestions

> Get index suggestions based on filter usage patterns.



## OpenAPI

````yaml get /v1/analytics/indexes/suggestions
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/analytics/indexes/suggestions:
    get:
      tags:
        - Analytics
        - Analytics - Indexes
      summary: Get Index Suggestions
      description: Get index suggestions based on filter usage patterns.
      operationId: get_index_suggestions_v1_analytics_indexes_suggestions_get
      parameters:
        - name: hours
          in: query
          required: false
          schema:
            type: integer
            maximum: 720
            minimum: 1
            description: Time window in hours to analyze (max 30 days)
            default: 24
            title: Hours
          description: Time window in hours to analyze (max 30 days)
        - name: min_count
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 1
            description: Minimum query count threshold for suggestions
            default: 100
            title: Min Count
          description: Minimum query count threshold for suggestions
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexSuggestionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    IndexSuggestionsResponse:
      properties:
        namespace_id:
          type: string
          title: Namespace Id
          description: Namespace being analyzed
        analysis_period:
          type: string
          title: Analysis Period
          description: Time period analyzed (e.g., '24h', '7d')
        suggestions:
          items:
            $ref: '#/components/schemas/IndexSuggestion'
          type: array
          title: Suggestions
          description: List of index suggestions
        auto_create_enabled:
          type: boolean
          title: Auto Create Enabled
          description: Whether auto-indexing is enabled for this namespace
        next_auto_create_run:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Auto Create Run
          description: Next scheduled auto-creation run (if enabled)
      type: object
      required:
        - namespace_id
        - analysis_period
        - suggestions
        - auto_create_enabled
      title: IndexSuggestionsResponse
      description: Response containing index suggestions for a namespace.
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IndexSuggestion:
      properties:
        field_name:
          type: string
          title: Field Name
          description: Field name to index
        query_count_24h:
          type: integer
          title: Query Count 24H
          description: Number of queries using this field in last 24 hours
        query_count_7d:
          anyOf:
            - type: integer
            - type: 'null'
          title: Query Count 7D
          description: Number of queries in last 7 days
        suggested_type:
          type: string
          title: Suggested Type
          description: Suggested index type (keyword, integer, float, etc.)
        is_indexed:
          type: boolean
          title: Is Indexed
          description: Whether field is already indexed
        first_seen:
          type: string
          format: date-time
          title: First Seen
          description: First time field was seen in filters
        last_seen:
          type: string
          format: date-time
          title: Last Seen
          description: Most recent usage
        estimated_performance_gain:
          anyOf:
            - type: string
            - type: 'null'
          title: Estimated Performance Gain
          description: Estimated query performance improvement (e.g., '60-80%')
      type: object
      required:
        - field_name
        - query_count_24h
        - suggested_type
        - is_indexed
        - first_seen
        - last_seen
      title: IndexSuggestion
      description: Suggestion for creating a payload index.
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````