https://github.com/jaemk/ddg
A DuckDuckGo API wrapper library in Rust
https://github.com/jaemk/ddg
Last synced: 1 day ago
JSON representation
A DuckDuckGo API wrapper library in Rust
- Host: GitHub
- URL: https://github.com/jaemk/ddg
- Owner: jaemk
- License: other
- Created: 2017-11-10T02:32:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-12T01:02:33.000Z (over 7 years ago)
- Last Synced: 2025-04-02T14:51:42.474Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ddg: A DuckDuckGo Instant Answers wrapper library.
This library provides a strongly typed wrapper around the DuckDuckGo Instant
Answers API. Most of the documentation comes from the
[DuckDuckGo Instant Answers API Documentation](https://duckduckgo.com/api)
This library comes with reqwest by default for convenience, however it can be
disabled. If disabled the library will fallback to hyper for `IntoUrl` so it
can be used with your own hyper client implementation.### [Documentation](https://docs.rs/ddg/)
### Example
```rust
use ddg::Query;
const APP_NAME: &'static str = "ddg_example_app";
// Search for Rust and we want to strip out any HTML content in the answers.
let query = Query::new("Rust", APP_NAME).no_html();let response = query.execute().unwrap();
println!("{:?}", response);
```