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