> ## 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 commands

> Commands for creating, querying, and managing Upstash Redis Search indexes.

> [!NOTE]
>
> Upstash Redis Search uses `SEARCH.*` commands. They are separate from and incompatible with the `FT.*` commands in the open-source RediSearch module.

For Search commands, use the Upstash [`@upstash/redis`](/docs/redis/sdks/ts/overview) or [`upstash-redis`](/docs/redis/sdks/py/overview) SDK,
or the redis-js wrappers [`@upstash/search-redis`](/docs/redis/search/adapters/node-redis) for node-redis and [`@upstash/search-ioredis`](/docs/redis/search/adapters/ioredis) for ioredis.

For feature guides and tutorials, start with the [Upstash Redis Search introduction](/docs/redis/search/introduction).

> **[SEARCH.CREATE](/docs/redis/commands/search/search-create)**
>
> Create a search index

> **[SEARCH.DROP](/docs/redis/commands/search/search-drop)**
>
> Remove a search index

> **[SEARCH.DESCRIBE](/docs/redis/commands/search/search-describe)**
>
> Return metadata about a search index

> **[SEARCH.WAITINDEXING](/docs/redis/commands/search/search-waitindexing)**
>
> Wait until pending index updates are visible

> **[SEARCH.LISTINDEXES](/docs/redis/commands/search/search-listindexes)**
>
> List search indexes in the database

> **[SEARCH.QUERY](/docs/redis/commands/search/search-query)**
>
> Search documents with a JSON filter

> **[SEARCH.COUNT](/docs/redis/commands/search/search-count)**
>
> Count matching documents

> **[SEARCH.AGGREGATE](/docs/redis/commands/search/search-aggregate)**
>
> Compute analytics over matching documents

> **[SEARCH.ALIASADD](/docs/redis/commands/search/search-aliasadd)**
>
> Add or update an index alias

> **[SEARCH.ALIASDEL](/docs/redis/commands/search/search-aliasdel)**
>
> Remove an index alias

> **[SEARCH.LISTALIASES](/docs/redis/commands/search/search-listaliases)**
>
> List index aliases

`SEARCH.QUERY`, `SEARCH.COUNT`, `SEARCH.AGGREGATE`, `SEARCH.DESCRIBE`, and `SEARCH.WAITINDEXING` accept either an index name or alias. `SEARCH.DROP` always treats its argument as a literal index name. This makes it possible to switch an alias to a replacement index and then drop the old index without dropping the replacement.

## REST API Usage

All search commands can be sent via the Upstash REST API using a JSON array POST body.
Each element of the array corresponds to a token in the command.

```bash theme={"system"}
curl -X POST https://YOUR_ENDPOINT.upstash.io \
  -H "Authorization: Bearer $UPSTASH_REDIS_REST_TOKEN" \
  -d '["COMMAND", "arg1", "arg2", ...]'
```

The JSON filter and aggregation arguments are passed as string values within the array (not as nested JSON objects):

```bash theme={"system"}
# Correct — filter is a string inside the array
["SEARCH.QUERY", "products", "{\"name\": \"wireless\"}", "LIMIT", "10"]

# Incorrect — filter is a nested object
["SEARCH.QUERY", "products", {"name": "wireless"}, "LIMIT", "10"]
```

Pass JSON filter and aggregation arguments as string values inside the array, not as nested JSON objects.
Search commands also work through the `/pipeline` endpoint for batching multiple commands in a single HTTP request.


## Related topics

- [Search](/docs/search/sdks/py/commands/search.md)
- [SEARCH.CREATE](/docs/redis/commands/search/search-create.md)
- [Command Reference](/docs/redis/search/command-reference.md)
- [Troubleshooting](/docs/redis/search/troubleshooting.md)
- [Redis® API Compatibility: supported commands, modules, and protocols](/docs/redis/overall/compatibility.md)


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