spellcheck
作者: brave
用於拼字校正。若查詢有拼寫錯誤,則返回修正後的查詢。大多數搜尋端點已內建拼字檢查功能;僅在搜尋前進行查詢清理時使用此功能,或…
npx skills add https://github.com/brave/brave-search-skills --skill spellcheckSpellcheck
Requires API Key: Get one at https://api.search.brave.com
Plan: Included in the Spellcheck plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
Quick Start (cURL)
curl -s "https://api.search.brave.com/res/v1/spellcheck/search" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=artifical inteligence" \
--data-urlencode "lang=en" \
--data-urlencode "country=US"
Endpoint
GET https://api.search.brave.com/res/v1/spellcheck/search
Authentication: X-Subscription-Token: <API_KEY> header
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
q | string | Yes | — | Query to spell check (1-400 chars, max 50 words) |
lang | string | No | en | Language preference (2+ char language code, e.g. en, fr, de, pt-br, zh-hans). 51 codes supported |
country | string | No | US | Search country (2-letter country code or ALL) |
Response Fields
| Field | Type | Description |
|---|---|---|
type | string | Always "spellcheck" |
query.original | string | The input query as submitted |
results | array | Spell-corrected suggestions. May be empty when no correction is found |
results[].query | string | A corrected version of the query |
Example Response
{
"type": "spellcheck",
"query": {
"original": "artifical inteligence"
},
"results": [
{
"query": "artificial intelligence"
}
]
}
Use Cases
- Pre-search query cleanup: Check spelling before deciding which search endpoint to call
- "Did you mean?" UI: Show users a corrected suggestion before running the search
- Batch query normalization: Clean up user inputs in bulk
Notes
- Built-in alternative: Web Search and LLM Context have
spellcheck=trueby default — use this standalone endpoint only when you need the correction before searching - Context-aware: Corrections consider the full query context, not just individual words
來自 brave 的更多技能
pr
brave
Create a pull request for the current branch using `gh`.
official
add-best-practice
brave
在適當的文件中新增最佳實踐。檢查是否有重複。
official
check-upstream-flake
brave
檢查失敗的測試是否為 Chromium 的 LUCI Analysis 中已知的上游不穩定問題
official
clean-branches
brave
刪除已合併上游 PR 的本地分支。檢查 GitHub PR。
official
fix-bp-docs
brave
審計並修復最佳實踐文檔中的過時引用、重複內容及廢棄資訊
official
force-push-downstream
brave
強制推送一個分支及其所有下游分支到遠端。自動偵測
official
impl-review
brave
在 PR 上實作審查回饋。檢出分支,套用
official
make-ci-green
brave
為 brave/brave-core 的 PR 重新執行失敗的 CI 任務。偵測失敗階段並
official