Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kingwill101/duckduckgo_search
Search using the DuckDuckGo api
https://github.com/kingwill101/duckduckgo_search
dartlang duckduckgo duckduckgo-search
Last synced: 4 months ago
JSON representation
Search using the DuckDuckGo api
- Host: GitHub
- URL: https://github.com/kingwill101/duckduckgo_search
- Owner: kingwill101
- License: mit
- Created: 2024-06-01T00:56:59.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-07-08T12:45:06.000Z (7 months ago)
- Last Synced: 2024-09-29T16:02:39.144Z (4 months ago)
- Topics: dartlang, duckduckgo, duckduckgo-search
- Language: Dart
- Homepage: https://pub.dev/packages/duckduckgo_search
- Size: 33.2 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# duckduckgo_search
Search using the DuckDuckGo api
## Features
- searching for text.
- search suggestions.
- quick answers## Installation
Add the following dependency to your `pubspec.yaml` file:
```yaml
dependencies:
duduckgo_search: ^0.1.1
```Then, run `flutter pub get` or `dart pub get` to install the package.
### Usage
Import the package in your Dart file:
```
import 'package:duduckgo_search/duduckgo_search.dart';
```Perform a search:
```dart
void main() async {
final results = await DuckDuckGoSearch.text('dartlang');
for (var result in results) {
print(result.title);
print(result.url);
print(result.body);
print('---');
}
}
```Request search suggestions:
```dart
void main() async {
final results = await DuckDuckGoSearch.suggestions('dartlang');
for (var suggestion in results) {
print(suggestion);
}
}
```quick answer:
```dart
void main() async {
final answer = await DuckDuckGoSearch.answer('who is miles davis');
print(answer.answerAbstract);
}
```### Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.### License
This project is licensed under the MIT License. See the LICENSE file for details.Changelog
See the CHANGELOG file for version history.### Acknowledgements
This library is a Dart port of the Python [duckduckgo_search](https://github.com/deedy5/duckduckgo_search/) library.