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

# SEARCH.LISTINDEXES

> List search indexes in the database.

Use `SEARCH.LISTINDEXES` to list search indexes in the database.

`MATCH` filters index names with a glob-style pattern, while `LIMIT` and `OFFSET` page through the reply, which keeps the command usable on a database with many indexes. Only index names are returned; use [`SEARCH.DESCRIBE`](/docs/redis/commands/search/search-describe) to see an index's schema and settings.

See [Listing Indexes](/docs/redis/search/index-management#listing-indexes) for the feature guide.

## Syntax

```redis theme={"system"}
SEARCH.LISTINDEXES [MATCH <pattern>] [LIMIT <count>] [OFFSET <offset>]
```

## Arguments

| Argument | Description                                                     | Default           |
| -------- | --------------------------------------------------------------- | ----------------- |
| `MATCH`  | Filter index names by a glob-style pattern, such as `product*`. | All indexes       |
| `LIMIT`  | Maximum number of indexes to return. `0` returns all indexes.   | `0` (all indexes) |
| `OFFSET` | Number of indexes to skip for pagination.                       | `0`               |

## Response

Returns one entry per index, sorted by index name. Each entry is a map containing the index `name` and its backing `type` (`HASH`, `JSON`, or `STRING`). With RESP2, each map is encoded as an array of alternating keys and values.

```text theme={"system"}
[
  ["name", "productIdx", "type", "HASH"],
  ["name", "profileIdx", "type", "JSON"],
  ["name", "sessionIdx", "type", "STRING"]
]
```

## Examples

<Note>
  The high-level Search APIs do not currently expose `SEARCH.LISTINDEXES`. Use each client's generic command method for this command.
</Note>

<AccordionGroup>
  <Accordion title="Redis CLI" icon="terminal">
    ```bash theme={"system"}
    SEARCH.LISTINDEXES MATCH 'product*' LIMIT 10 OFFSET 0
    ```
  </Accordion>

  <Accordion title="@upstash/redis" icon="node-js" iconType="brands">
    ```ts theme={"system"}
    import { Redis } from "@upstash/redis";

    const redis = Redis.fromEnv();
    const indexes = await redis.exec<string[][]>([
      "SEARCH.LISTINDEXES",
      "MATCH",
      "product*",
      "LIMIT",
      10,
      "OFFSET",
      0,
    ]);
    ```
  </Accordion>

  <Accordion title="upstash_redis" icon="python" iconType="brands">
    ```python theme={"system"}
    from upstash_redis import Redis

    redis = Redis.from_env()
    indexes = redis.execute([
        "SEARCH.LISTINDEXES",
        "MATCH",
        "product*",
        "LIMIT",
        10,
        "OFFSET",
        0,
    ])
    ```
  </Accordion>

  <Accordion title="ioredis" icon="node-js" iconType="brands">
    ```ts theme={"system"}
    import IORedis from "ioredis";

    const redis = new IORedis(process.env.REDIS_URL!);
    const indexes = await redis.call(
      "SEARCH.LISTINDEXES",
      "MATCH",
      "product*",
      "LIMIT",
      10,
      "OFFSET",
      0,
    );
    ```
  </Accordion>

  <Accordion title="node-redis" icon="node-js" iconType="brands">
    ```ts theme={"system"}
    import { createClient } from "redis";

    const client = await createClient({ url: process.env.REDIS_URL })
      .on("error", console.error)
      .connect();
    const indexes = await client.sendCommand([
      "SEARCH.LISTINDEXES",
      "MATCH",
      "product*",
      "LIMIT",
      "10",
      "OFFSET",
      "0",
    ]);
    ```
  </Accordion>

  <Accordion title="curl">
    ```bash theme={"system"}
    curl -X POST https://YOUR_ENDPOINT.upstash.io \
      -H "Authorization: Bearer $UPSTASH_REDIS_REST_TOKEN" \
      -d '["SEARCH.LISTINDEXES", "MATCH", "product*", "LIMIT", "10", "OFFSET", "0"]'
    ```
  </Accordion>
</AccordionGroup>


## Related topics

- [Indices](/docs/redis/search/index-management.md)
- [SEARCH.LISTALIASES](/docs/redis/commands/search/search-listaliases.md)
- [Indexes](/docs/search/features/indexes.md)
- [Search](/docs/search/sdks/ts/commands/search.md)
