# drinkfyi
[](https://crates.io/crates/drinkfyi)
[](https://opensource.org/licenses/MIT)
Beverage encyclopedia hub for cocktails, wine, beer, and more — API client for [drinkfyi.com](https://drinkfyi.com).
> **Try the interactive tools at [drinkfyi.com](https://drinkfyi.com)**
## Install
`cargo add drinkfyi`
## Quick Start
```rust
use drinkfyi::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let result = client.search("margarita").await?;
println!("{} results", result.total);
Ok(())
}
```
## Also Available
| **Python** | `pip install drinkfyi` | [PyPI](https://pypi.org/project/drinkfyi/) |
| **npm** | `npm install drinkfyi` | [npm](https://www.npmjs.com/package/drinkfyi) |
| **Go** | `go get github.com/fyipedia/drinkfyi-go` | [pkg.go.dev](https://pkg.go.dev/github.com/fyipedia/drinkfyi-go) |
| **Rust** | `cargo add drinkfyi` | [crates.io](https://crates.io/crates/drinkfyi) |
| **Ruby** | `gem install drinkfyi` | [rubygems](https://rubygems.org/gems/drinkfyi) |
## Embed Widget
Embed [DrinkFYI](https://drinkfyi.com) widgets on any website with [drinkfyi-embed](https://widget.drinkfyi.com):
```html
<script src="https://cdn.jsdelivr.net/npm/drinkfyi-embed@1/dist/embed.min.js"></script>
<div data-drinkfyi="entity" data-slug="margarita"></div>
```
Zero dependencies · Shadow DOM · 4 themes (light/dark/sepia/auto) · [Widget docs](https://widget.drinkfyi.com)
## Links
- [DrinkFYI](https://drinkfyi.com) — Main site
- [API Documentation](https://drinkfyi.com/developers/)
- [OpenAPI Spec](https://drinkfyi.com/api/openapi.json)
- [Glossary](https://drinkfyi.com/glossary/)
## License
MIT