$npx -y skills add brave/brave-search-skills --skill suggestUSE FOR query autocomplete/suggestions. Fast (<100ms). Returns suggested queries as user types. Supports rich suggestions with entity info. Typo-resilient.
| 1 | # Suggest / Autocomplete |
| 2 | |
| 3 | > **Requires API Key**: Get one at https://api.search.brave.com |
| 4 | > |
| 5 | > **Plan**: Included in the **Suggest** plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe |
| 6 | |
| 7 | ## Quick Start (cURL) |
| 8 | |
| 9 | ### Basic Suggestions |
| 10 | ```bash |
| 11 | curl -s "https://api.search.brave.com/res/v1/suggest/search?q=how+to+" \ |
| 12 | -H "Accept: application/json" \ |
| 13 | -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" |
| 14 | ``` |
| 15 | |
| 16 | ### With All Parameters |
| 17 | ```bash |
| 18 | curl -s "https://api.search.brave.com/res/v1/suggest/search" \ |
| 19 | -H "Accept: application/json" \ |
| 20 | -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \ |
| 21 | -G \ |
| 22 | --data-urlencode "q=albert" \ |
| 23 | --data-urlencode "country=US" \ |
| 24 | --data-urlencode "lang=en" \ |
| 25 | --data-urlencode "count=10" \ |
| 26 | --data-urlencode "rich=true" |
| 27 | ``` |
| 28 | |
| 29 | ## Endpoint |
| 30 | |
| 31 | ```http |
| 32 | GET https://api.search.brave.com/res/v1/suggest/search |
| 33 | ``` |
| 34 | |
| 35 | **Authentication**: `X-Subscription-Token: <API_KEY>` header |
| 36 | |
| 37 | **Optional Headers**: |
| 38 | - `Accept-Encoding: gzip` — Enable response compression |
| 39 | |
| 40 | ## Parameters |
| 41 | |
| 42 | | Parameter | Type | Required | Default | Description | |
| 43 | |--|--|--|--|--| |
| 44 | | `q` | string | **Yes** | — | Suggest search query (1-400 chars, max 50 words) | |
| 45 | | `lang` | string | No | `en` | Language preference (2+ char language code, e.g. `fr`, `de`, `zh-hans`) | |
| 46 | | `country` | string | No | `US` | Search country (2-letter country code or `ALL`) | |
| 47 | | `count` | int | No | `5` | Number of suggestions (1-20). Actual results may be fewer | |
| 48 | | `rich` | bool | No | `false` | Enhance with entity info (title, description, image). Paid Search plan required | |
| 49 | |
| 50 | ## Response Fields |
| 51 | |
| 52 | | Field | Type | Description | |
| 53 | |--|--|--| |
| 54 | | `type` | string | Always `"suggest"` | |
| 55 | | `query.original` | string | The original suggest search query | |
| 56 | | `results` | array | List of suggestions (may be empty) | |
| 57 | | `results[].query` | string | Suggested query completion | |
| 58 | | `results[].is_entity` | bool? | Whether the suggested enriched query is an entity (rich only) | |
| 59 | | `results[].title` | string? | The suggested query enriched title (rich only) | |
| 60 | | `results[].description` | string? | The suggested query enriched description (rich only) | |
| 61 | | `results[].img` | string? | The suggested query enriched image URL (rich only) | |
| 62 | |
| 63 | Fields with `null` values are excluded from the response. Non-rich results contain only the `query` field. |
| 64 | |
| 65 | ### Rich Response Example (`rich=true`) |
| 66 | ```json |
| 67 | { |
| 68 | "type": "suggest", |
| 69 | "query": { "original": "albert" }, |
| 70 | "results": [ |
| 71 | { |
| 72 | "query": "albert einstein", |
| 73 | "is_entity": true, |
| 74 | "title": "Albert Einstein", |
| 75 | "description": "German-born theoretical physicist", |
| 76 | "img": "https://imgs.search.brave.com/..." |
| 77 | }, |
| 78 | { "query": "albert einstein quotes", "is_entity": false } |
| 79 | ] |
| 80 | } |
| 81 | ``` |
| 82 | |
| 83 | ## Use Cases |
| 84 | |
| 85 | - **Search-as-you-type UI**: Real-time autocomplete dropdown. Debounce 150-300ms. |
| 86 | - **Query refinement for RAG**: Expand partial/ambiguous queries before calling `web-search` or `llm-context`. |
| 87 | - **Entity detection**: Use `rich=true` to detect entities with title, description, and image for preview cards. |
| 88 | - **Typo-tolerant input**: Get clean suggestions from misspelled input without separate spellcheck. |
| 89 | |
| 90 | ## Notes |
| 91 | |
| 92 | - **Latency**: Designed for <100ms response times |
| 93 | - **Country/lang**: Hints for suggestion relevance, not strict filters |
| 94 | - **Typo handling**: Suggestions handle common typos without separate spellcheck |