# aspire docs search command

## Name

`aspire docs search` - Search Aspire documentation by keywords.

## Synopsis

```bash title="Aspire CLI"
aspire docs search <query> [options]
```

<AsciinemaPlayer
  src="/casts/aspire-docs-search.cast"
  poster="npt:0:01"
  rows={25}
  loop={false}
  speed={.5}
/>

## Description

The `aspire docs search` command performs a keyword-based search across the Aspire documentation on [aspire.dev](https://aspire.dev). Results are ranked by relevance and include the page title, slug, matching section, and a relevance score.

The slugs returned in search results can be passed to the [`aspire docs get`](../aspire-docs-get/) command to retrieve the full content of a matching page.

## Arguments

- **`<query>`**

  The search query. Use keywords to describe what you're looking for. For best results, include relevant terms such as API names, configuration keys, or feature names.

## Options

The following options are available:

- **`--format <Table|Json>`**

  Output format. Choose `Table` for a human-readable table or `Json` for machine-readable JSON output. Defaults to `Table`.

- **`-n, --limit <limit>`**

  Maximum number of search results to return. Defaults to `5`, with a maximum of `10`.

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-log-level.md" />

- <Include relativePath="reference/cli/includes/option-non-interactive.md" />

- <Include relativePath="reference/cli/includes/option-nologo.md" />

- <Include relativePath="reference/cli/includes/option-banner.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- Search for documentation about Redis:

  ```bash title="Aspire CLI"
  aspire docs search "redis"
  ```

- Search with a custom result limit:

  ```bash title="Aspire CLI"
  aspire docs search "service defaults" --limit 3
  ```

- Search and output results in JSON format:

  ```bash title="Aspire CLI"
  aspire docs search "deployment" --format Json
  ```

## See also

- [aspire docs command](../aspire-docs/)
- [aspire docs list command](../aspire-docs-list/)
- [aspire docs get command](../aspire-docs-get/)