Suggest

by brave62793e0c49edNo license183 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 2 weeks ago

USE FOR query autocomplete/suggestions. Fast (<100ms). Returns suggested queries as user types. Supports rich suggestions with entity info. Typo-resilient.

Instructions onlySoftware Development
AI-generated overview

Wraps the Brave Suggest API to return query autocomplete suggestions as a user types.

What it does
Documents the Brave Suggest endpoint, its authentication header, query parameters, and response fields. It shows how to request basic or rich suggestions, including entity title, description, and image data. It also lists use cases such as search-as-you-type interfaces, query refinement for retrieval, entity detection, and typo-tolerant input.
When to use it
Use it when building autocomplete or search-as-you-type features, or when expanding partial or ambiguous queries before a web search or retrieval step. It also fits cases where entity previews or typo-tolerant suggestions are needed.
Requirements
A Brave Search API key sent in the X-Subscription-Token header, network access to api.search.brave.com, and a subscription that includes the Suggest plan; rich suggestions require a paid Search plan. It ships no scripts.

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

ParameterTypeRequiredDefaultDescription
qstringYes—Suggest search query (1-400 chars, max 50 words)
langstringNoenLanguage preference (2+ char language code, e.g. fr, de, zh-hans)
countrystringNoUSSearch country (2-letter country code or ALL)
countintNo5Number of suggestions (1-20). Actual results may be fewer
richboolNofalseEnhance with entity info (title, description, image). Paid Search plan required

Response Fields

FieldTypeDescription
typestringAlways "suggest"
query.originalstringThe original suggest search query
resultsarrayList of suggestions (may be empty)
results[].querystringSuggested query completion
results[].is_entitybool?Whether the suggested enriched query is an entity (rich only)
results[].titlestring?The suggested query enriched title (rich only)
results[].descriptionstring?The suggested query enriched description (rich only)
results[].imgstring?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

Source and attribution

Source:brave/brave-search-skillsinskills/suggestat commit62793e0

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal