spellcheck
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSpellcheck
拼写检查
Requires API Key: Get one at https://api.search.brave.comPlan: Included in the Spellcheck plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
需要API Key: 可在 https://api.search.brave.com 获取套餐: 包含在拼写检查套餐中,详见 https://api-dashboard.search.brave.com/app/subscriptions/subscribe
Quick Start (cURL)
快速开始(cURL)
bash
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"bash
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
接口端点
http
GET https://api.search.brave.com/res/v1/spellcheck/searchAuthentication: header
X-Subscription-Token: <API_KEY>http
GET https://api.search.brave.com/res/v1/spellcheck/search身份验证: 请求头传入
X-Subscription-Token: <API_KEY>Parameters
参数
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | — | Query to spell check (1-400 chars, max 50 words) |
| string | No | | Language preference (2+ char language code, e.g. |
| string | No | | Search country (2-letter country code or |
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | — | 待拼写检查的查询词(1-400字符,最多50个单词) |
| string | 否 | | 语言偏好(2位及以上语言代码,例如 |
| string | 否 | | 搜索所属国家(2位国家代码或 |
Response Fields
返回字段
| Field | Type | Description |
|---|---|---|
| string | Always |
| string | The input query as submitted |
| array | Spell-corrected suggestions. May be empty when no correction is found |
| string | A corrected version of the query |
| 字段 | 类型 | 描述 |
|---|---|---|
| string | 固定为 |
| string | 用户提交的原始查询词 |
| array | 拼写纠正建议列表,未找到可纠正内容时可能为空 |
| string | 纠正后的查询词版本 |
Example Response
响应示例
json
{
"type": "spellcheck",
"query": {
"original": "artifical inteligence"
},
"results": [
{
"query": "artificial intelligence"
}
]
}json
{
"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
- 搜索前查询清理: 在决定调用哪个搜索端点之前先完成拼写检查
- "你是不是想找?" UI: 在执行搜索前向用户展示纠正后的搜索建议
- 批量查询标准化: 批量清理用户输入内容
Notes
注意事项
- Built-in alternative: Web Search and LLM Context have by default — use this standalone endpoint only when you need the correction before searching
spellcheck=true - Context-aware: Corrections consider the full query context, not just individual words
- 内置替代方案: 网页搜索和LLM Context接口默认开启 —— 仅当你需要在搜索前获取纠错结果时才使用此独立接口
spellcheck=true - 上下文感知: 纠错会参考完整的查询上下文,而不只是单独校验单个单词