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

# List Indexes

Returns the names of all indexes on the CyborgDB service.

```go theme={null}
func (c *Client) ListIndexes(ctx context.Context) ([]string, error)
```

### Returns

A `[]string` of index names. Empty when the service has no indexes.

### Errors

<AccordionGroup>
  <Accordion title="*AuthenticationError">
    The client's `apiKey` is missing or invalid (HTTP `401`), or is a per-user key: listing indexes requires the root key (HTTP `403`).
  </Accordion>

  <Accordion title="*ServiceError">
    The service returns `5xx`.
  </Accordion>

  <Accordion title="*TransportError">
    The service can't be reached.
  </Accordion>
</AccordionGroup>

See [Errors](../errors).

### Example Usage

```go theme={null}
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/cyborginc/cyborgdb-go"
)

func main() {
    client, err := cyborgdb.NewClient("http://localhost:8000", "your-api-key")
    if err != nil {
        log.Fatal(err)
    }

    indexes, err := client.ListIndexes(context.Background())
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(indexes)
    // Output: [documents embeddings semantic-search]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.