Skip to main content
skill CX Codex

suggest — Claude Code skill: what it does, how to install

Query autocomplete and suggestion skill powered by Brave Search API with sub-100ms response times and typo handling.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add brave/brave-search-skills --skill suggest -a claude-code
Open on GitHub

What suggest does

This skill connects agents to the https://api.search.brave.com/res/v1/suggest/search endpoint. It returns search suggestions as users type. Misspellings are handled automatically without a separate spellchecker.

Requests send query string q up to 400 characters and 50 words. You can specify lang, set country, or cap results with count between 1 and 20. Setting rich=true adds entity titles, summaries, and image links to the response. Without a paid Search subscription, rich entity data stays unavailable.

Every API call requires a BRAVE_SEARCH_API_KEY token passed via the X-Subscription-Token header. For search-as-you-type interfaces, the documentation recommends setting client debounce between 150 and 300 ms.

What it helps with

  • autocomplete search queries directly during user typing
  • clean up misspelled input without a standalone spellchecker
  • fetch enriched entity cards with descriptions and images
  • refine ambiguous user prompts before sending them to RAG

Example prompts for the agent

  • Fetch query suggestions for "how to " using Brave Search API
  • Run suggest endpoint for query "albert" with rich=true and country US
  • Get 10 search completions for misspelled phrase "machne learnng"

How to install suggest

1Skills CLI (Vercel)

npx skills add brave/brave-search-skills --skill suggest -a claude-code

2Manually: put the files in place

~/.claude/skills/suggest/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/suggest/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about suggest

How to install suggest in Claude Code?

Run npx skills add brave/brave-search-skills --skill suggest -a claude-code in your terminal.

What does the suggest skill do?

It queries the Brave Search autocomplete endpoint with sub-100ms latency. The skill returns search completions and handles common spelling typos on the fly.

What is required to fetch rich entity data?

You must pass the rich=true query parameter, which returns entity titles, descriptions, and images. This feature requires an active paid Search subscription plan.

Source text

SKILL.md · MIT
---
name: suggest
description: USE FOR query autocomplete/suggestions. Fast (<100ms). Returns suggested queries as user types. Supports rich suggestions with entity info. Typo-resilient.
---

# Suggest / Autocomplete

> **Requires API Key**: Get one at https://api.search.brave.com
>
> **Plan**: Included in the **Suggest** plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe

## Quick Start (cURL)

### Basic Suggestions
```bash
curl -s "https://api.search.brave.com/res/v1/suggest/search?q=how+to+" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
```

### With All Parameters
```bash
curl -s "https://api.search.brave.com/res/v1/suggest/search" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -G \
  --data-urlencode "q=albert" \
  --data-urlencode "country=US" \
  --data-urlencode "lang=en" \
  --data-urlencode "count=10" \
  --data-urlencode "rich=true"
```

## Endpoint

```http
GET https://api.search.brave.com/res/v1/suggest/search
```

**Authentication**: `X-Subscription-Token: <API_KEY>` header

**Optional Headers**:
- `Accept-Encoding: gzip` — Enable response compression

## Parameters

| Parameter | Type | Required | Default | Description |
|--|--|--|--|--|
| `q` | string | **Yes** | — | Suggest search query (1-400 chars, max 50 words) |
| `lang` | string | No | `en` | Language preference (2+ char language code, e.g. `fr`, `de`, `zh-hans`) |
| `country` | string | No | `US` | Search country (2-letter country code or `ALL`) |
| `count` | int | No | `5` | Number of suggestions (1-20). Actual results may be fewer |
| `rich` | bool | No | `false` | Enhance with entity info (title, description, image). Paid Search plan required |

## Response Fields

| Field | Type | Description |
|--|--|--|
| `type` | string | Always `"suggest"` |
| `query.original` | string | The original suggest search query |
| `results` | array | List of suggestions (may be empty) |
| `results[].query` | string | Suggested query completion |
| `results[].is_entity` | bool? | Whether the suggested enriched query is an entity (rich only) |
| `results[].title` | string? | The suggested query enriched title (rich only) |
| `results[].description` | string? | The suggested query enriched description (rich only) |
| `results[].img` | string? | The suggested query enriched image URL (rich only) |

Fields with `null` values are excluded from the response. Non-rich results contain only the `query` field.

### Rich Response Example (`rich=true`)
```json
{
  "type": "suggest",
  "query": { "original": "albert" },
  "results": [
    {
      "query": "albert einstein",
      "is_entity": true,
      "title": "Albert Einstein",
      "description": "German-born theoretical physicist",
      "img": "https://imgs.search.brave.com/..."
    },
    { "query": "albert einstein quotes", "is_entity": false }
  ]
}
```

## Use Cases

- **Search-as-you-type UI**: Real-time autocomplete dropdown. Debounce 150-300ms.
- **Query refinement for RAG**: Expand partial/ambiguous queries before calling `web-search` or `llm-context`.
- **Entity detection**: Use `rich=true` to detect entities with title, description, and image for preview cards.
- **Typo-tolerant input**: Get clean suggestions from misspelled input without separate spellcheck.

## Notes

- **Latency**: Designed for <100ms response times
- **Country/lang**: Hints for suggestion relevance, not strict filters
- **Typo handling**: Suggestions handle common typos without separate spellcheck

© brave · MIT · brave/brave-search-skills

Similar skills

Everything for Backend and APIs →

From the same set7

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor