suggest

โดย brave

ใช้สำหรับการเติมข้อความค้นหา/คำแนะนำอัตโนมัติ รวดเร็ว (<100ms) ส่งคืนข้อความค้นหาที่แนะนำขณะที่ผู้ใช้พิมพ์ รองรับคำแนะนำแบบละเอียดพร้อมข้อมูลเอนทิตี ทนทานต่อการพิมพ์ผิด

npx skills add https://github.com/brave/brave-search-skills --skill suggest

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

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

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

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)

{
  "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

Skills เพิ่มเติมจาก brave

pr
brave
Create a pull request for the current branch using `gh`.
make-ci-green
brave
เรียกใช้ CI jobs ที่ล้มเหลวอีกครั้งสำหรับ PR brave/brave-core ตรวจจับขั้นตอนที่ล้มเหลวและ
local-place-search
brave
ใช้สำหรับค้นหาสถานที่ในโลกทางกายภาพ เช่น ธุรกิจ จุดสนใจ (POIs) ที่อยู่ถนน เมือง และถนนหนทาง ผลลัพธ์ประกอบด้วยที่อยู่ พิกัด คะแนนรีวิว เวลาเปิดทำการ…
impl-review
brave
นำข้อเสนอแนะจากการตรวจสอบไปปรับใช้กับ Pull Request โดยเช็คเอาท์สาขาและนำไปใช้
bx
brave
ใช้สำหรับการค้นหาเว็บ วิจัย RAG การอ้างอิง การเรียกดู การค้นหา การตรวจสอบข้อเท็จจริง เอกสารประกอบ และ AI แบบเอเจนต์ ครบวงจร ปรับให้เหมาะสมสำหรับเอเจนต์ AI…
images-search
brave
ใช้สำหรับค้นหารูปภาพ คืนค่ารูปภาพพร้อมชื่อเรื่อง, URL ต้นทาง, และรูปขนาดย่อ รองรับตัวกรอง SafeSearch สูงสุด 200 ผลลัพธ์
llm-context
brave
ใช้สำหรับ RAG/LLM grounding. ส่งคืนเนื้อหาเว็บที่สกัดไว้ล่วงหน้า (ข้อความ ตาราง โค้ด) ซึ่งปรับให้เหมาะสมสำหรับ LLMs. GET + POST. ปรับ max_tokens/count ตามความซับซ้อน.…
local-descriptions
brave
ใช้สำหรับรับคำอธิบายข้อความ POI ที่สร้างโดย AI ต้องใช้รหัส POI ที่ได้จากการค้นหาเว็บ (พร้อม result_filter=locations) ส่งคืนคำอธิบายในรูปแบบ markdown…