Overview
Brave Search Spellcheck API provides advanced spell checking capabilities for search queries. It analyzes queries to detect spelling errors and suggests corrected alternatives, helping users get better search results even when they make typos or spelling mistakes.Key Features
Query Correction
Automatically detect and correct spelling errors in search queries
Contextual Suggestions
Intelligent corrections based on query context and search patterns
Fast Response
Low-latency spell checking for real-time query processing
Language Support
Multi-language spell checking with country-specific corrections
API Reference
Spellcheck API Documentation
View the complete API reference, including endpoints, parameters, and example
requests
Use Cases
Spellcheck API is perfect for:- Search Applications: Improve user experience by correcting typos before searching
- Query Suggestions: Offer spelling corrections in search interfaces
- Data Quality: Clean and normalize user-generated queries
- Autocorrect: Implement “Did you mean?” functionality
- Query Analysis: Identify and track common misspellings
Endpoint
Brave Spellcheck API is available at the following endpoint:To try the API on a Free plan, you’ll still need to subscribe — you simply
won’t be charged. Once subscribed, you can get an API key in the API
Keys section.
Getting Started
Get started immediately with a simple cURL request:Example Response
Common Examples
No Correction Needed
When the query is already spelled correctly:Multi-word Correction
The API handles corrections in multi-word queries:Integration Examples
JavaScript/TypeScript
Python
Best Practices
User Experience
- Show Suggestions Gracefully: Display “Did you mean?” suggestions without forcing corrections
- Preserve User Intent: Allow users to search for their original query if desired
- Highlight Differences: Visually indicate which parts of the query were corrected
Performance Optimization
- Debounce Requests: Implement debouncing (e.g., 200-300ms) to avoid excessive API calls
- Cache Results: Cache spellcheck results for frequently typed queries
- Async Loading: Check spelling asynchronously without blocking user input
Integration Patterns
Rate Limiting
- Implement client-side throttling to avoid hitting API rate limits
- Consider combining spellcheck with other search operations
- Monitor your API usage and adjust debounce timings accordingly
Changelog
This changelog outlines all significant changes to the Brave Search Spellcheck API in chronological order.2023-01-01
- Initial launch of Brave Search Spellcheck API
- Support for multi-language spell checking
- Context-aware query corrections