> ## 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.
</Note>

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).

<CardGroup cols={2}>
  <Card title="SEARCH.CREATE" href="/docs/redis/commands/search/search-create">Create a search index</Card>
  <Card title="SEARCH.REINDEX" href="/docs/redis/commands/search/search-reindex">Rebuild a search index from the current data</Card>
  <Card title="SEARCH.DROP" href="/docs/redis/commands/search/search-drop">Remove a search index</Card>
  <Card title="SEARCH.DESCRIBE" href="/docs/redis/commands/search/search-describe">Return metadata about a search index</Card>
  <Card title="SEARCH.WAITINDEXING" href="/docs/redis/commands/search/search-waitindexing">Wait until pending index updates are visible</Card>
  <Card title="SEARCH.LISTINDEXES" href="/docs/redis/commands/search/search-listindexes">List search indexes in the database</Card>
  <Card title="SEARCH.QUERY" href="/docs/redis/commands/search/search-query">Search documents with a JSON filter</Card>
  <Card title="SEARCH.COUNT" href="/docs/redis/commands/search/search-count">Count matching documents</Card>
  <Card title="SEARCH.AGGREGATE" href="/docs/redis/commands/search/search-aggregate">Compute analytics over matching documents</Card>
  <Card title="SEARCH.ALIASADD" href="/docs/redis/commands/search/search-aliasadd">Add or update an index alias</Card>
  <Card title="SEARCH.ALIASDEL" href="/docs/redis/commands/search/search-aliasdel">Remove an index alias</Card>
  <Card title="SEARCH.LISTALIASES" href="/docs/redis/commands/search/search-listaliases">List index aliases</Card>
</CardGroup>

`SEARCH.QUERY`, `SEARCH.COUNT`, `SEARCH.AGGREGATE`, `SEARCH.DESCRIBE`, `SEARCH.WAITINDEXING`, and `SEARCH.REINDEX` 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)
- [SEARCH.LISTINDEXES](/docs/redis/commands/search/search-listindexes.md)
- [SEARCH.WAITINDEXING](/docs/redis/commands/search/search-waitindexing.md)
