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

# Get Indexes

> Returns indexes for a given user ID, with option to include deleted items



## OpenAPI

````yaml GET /indexes
openapi: 3.0.1
info:
  title: Moonshine API
  description: Video Understanding API
  version: 1.0.0
servers:
  - url: https://api.usemoonshine.com
security: []
paths:
  /indexes:
    get:
      description: >-
        Returns indexes for a given user ID, with option to include deleted
        items
      parameters:
        - name: userid
          in: query
          description: The user ID to fetch media groups for
          required: true
          schema:
            type: string
        - name: deleted
          in: query
          description: When set to 'true', includes deleted media groups
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
      responses:
        '200':
          description: Media groups response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    index_id:
                      type: string
                      description: Unique identifier for the media index
                    name:
                      type: string
                      description: Name of the media index
                    count:
                      type: integer
                      description: Number of videos in the index
                    created:
                      type: string
                      format: date-time
                      description: Creation timestamp
                    total_duration:
                      type: integer
                      description: Total duration of all videos in seconds
                    deleted:
                      type: boolean
                      description: Whether the index is deleted
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string

````