Did You Mean API - Dart/Flutter Client
Did You Mean suggests spelling corrections for misspelled search queries and phrases. Pass any text string to receive the original query along with a list of alternate spelling suggestions.
This is the Dart/Flutter client for the Did You Mean API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_didyoumean: ^1.2.2
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_didyoumean/apiverve_didyoumean.dart';
void main() async {
final client = DidyoumeanClient('YOUR_API_KEY');
try {
final response = await client.execute({
'query': 'what weather today is'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"query": "what weather today is",
"didYouMean": [
"what is the weather today",
"what's the weather like today",
"what will be the weather today"
]
}
}
API Reference
- API Home: Did You Mean API
- Documentation: docs.apiverve.com/ref/didyoumean
Authentication
All requests require an API key. Get yours at apiverve.com.
License
MIT License - see LICENSE for details.
Built with Dart for APIVerve
Libraries
- apiverve_didyoumean
- Did You Mean API client for Dart/Flutter