Spellcheck

brave/brave-search-skills/skills/spellcheck

作者 brave62793e0c49ed无许可证183 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2周前更新

USE FOR spell correction. Returns corrected query if misspelled. Most search endpoints have spellcheck built-in; use this only for pre-search query cleanup or "Did you mean?" UI.

仅含说明Writing & Content
AI 生成的概览

调用 Brave Spellcheck API,返回拼写错误的搜索查询的更正版本。

功能
该技能说明如何用查询词、语言和国家参数调用 Brave Spellcheck 接口,以及如何读取 JSON 响应。它返回原始查询以及拼写更正建议,未找到更正时结果可能为空。它仅为说明文档,不附带脚本。
适用场景
适用于在执行搜索前清理或规范化用户查询,或需要向用户展示“您是不是要找?”建议的场景。它面向搜索前的查询清理,而不是已内置拼写检查的搜索。
运行要求
需要 Brave Search API 密钥(通过 X-Subscription-Token 请求头发送)、包含 Spellcheck 方案的订阅,以及对 api.search.brave.com 的网络访问。不包含脚本。

Spellcheck

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)

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/search

Authentication: X-Subscription-Token: <API_KEY> header

Parameters

ParameterTypeRequiredDefaultDescription
qstringYes—Query to spell check (1-400 chars, max 50 words)
langstringNoenLanguage preference (2+ char language code, e.g. en, fr, de, pt-br, zh-hans). 51 codes supported
countrystringNoUSSearch country (2-letter country code or ALL)

Response Fields

FieldTypeDescription
typestringAlways "spellcheck"
query.originalstringThe input query as submitted
resultsarraySpell-corrected suggestions. May be empty when no correction is found
results[].querystringA corrected version of the query

Example Response

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

Notes

  • Built-in alternative: Web Search and LLM Context have spellcheck=true by 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/brave-search-skills位于skills/spellcheck提交62793e0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架