> ## 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.DESCRIBE

> Return metadata about a search index.

Use `SEARCH.DESCRIBE` to return metadata about a search index.

The reply reports how the index is defined, the key type and prefixes it covers, and the fields in its schema with their types and options, along with its current state such as the number of indexed documents. It is the way to confirm what an index actually indexes before writing queries against it, and to check whether a schema change was applied.

See [Describing an Index](/docs/redis/search/index-management#describing-an-index) for the feature guide.

The command accepts an index name or alias. When an alias is used, the response describes its target and reports the target's index name.

## Syntax

```redis theme={"system"}
SEARCH.DESCRIBE <name>
```

## Response

Returns index metadata as alternating field names and values. The response contains:

| Field            | Description                                                                                    |
| ---------------- | ---------------------------------------------------------------------------------------------- |
| `name`           | The index name.                                                                                |
| `type`           | The indexed Redis value type: `HASH`, `JSON`, or `STRING`.                                     |
| `prefixes`       | Key prefixes included in the index.                                                            |
| `language`       | Stemming language used by `TEXT` fields.                                                       |
| `indexSize`      | Current index size in bytes.                                                                   |
| `pendingUpdates` | Number of updates waiting to be indexed.                                                       |
| `schema`         | Field definitions, including `FROM`, `NOSTEM`, `NOTOKENIZE`, and `FAST` options where present. |

```text theme={"system"}
[
  "name", "products",
  "type", "JSON",
  "prefixes", ["product:"],
  "language", "english",
  "indexSize", 1234,
  "pendingUpdates", 0,
  "schema", [["name", "TEXT"], ["price", "F64", "FAST"]]
]
```

Returns `null` if the index does not exist.

## Examples

<AccordionGroup>
  <Accordion title="Redis CLI" icon="terminal">
    ```bash theme={"system"}
    SEARCH.DESCRIBE products
    ```
  </Accordion>

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

    const redis = Redis.fromEnv();
    const products = redis.search.index({ name: "products" });
    const description = await products.describe();
    ```
  </Accordion>

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

    redis = Redis.from_env()
    products = redis.search.index(name="products")
    description = products.describe()
    ```
  </Accordion>

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

    const redis = new IORedis(process.env.REDIS_URL!);
    const search = createSearch(redis);
    const products = search.index({ name: "products" });
    const description = await products.describe();
    ```
  </Accordion>

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

    const client = await createClient({ url: process.env.REDIS_URL })
      .on("error", console.error)
      .connect();
    const search = createSearch(client);
    const products = search.index({ name: "products" });
    const description = await products.describe();
    ```
  </Accordion>

  <Accordion title="curl">
    ```bash theme={"system"}
    curl -X POST https://YOUR_ENDPOINT.upstash.io \
      -H "Authorization: Bearer $UPSTASH_REDIS_REST_TOKEN" \
      -d '["SEARCH.DESCRIBE", "products"]'
    ```
  </Accordion>
</AccordionGroup>


## Related topics

- [SEARCH.LISTINDEXES](/docs/redis/commands/search/search-listindexes.md)
- [Indices](/docs/redis/search/index-management.md)
- [Search commands](/docs/redis/commands/search/overview.md)
- [Changelog](/docs/redis/overall/changelog.md)
- [SEARCH.AGGREGATE](/docs/redis/commands/search/search-aggregate.md)
