@fyipedia/beerfyi
v0.1.0
Published
TypeScript API client for BeerFYI -- beer styles, hops, malts, yeast, and BJCP classifications. Zero dependencies.
Maintainers
Readme
beerfyi
TypeScript API client for BeerFYI -- the complete beer style reference with 112 BJCP-classified beer styles, 82 hop varieties, 41 malts, 29 yeast strains, and 150 expert guides. Search styles, ingredients, compare beer profiles, and explore brewing science through a typed REST API. Zero dependencies, uses native fetch.
Explore beer at beerfyi.com -- Styles | Hops | Malts | API Docs
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Reference
- TypeScript Types
- Learn More About Beer
- Also Available for Python
- Beverage FYI Family
- License
Install
npm install @fyipedia/beerfyiWorks in Node.js, Deno, Bun, and browsers (ESM).
Quick Start
import { BeerFYI } from "@fyipedia/beerfyi";
const api = new BeerFYI();
// Search beer styles, hops, malts, yeast, glossary terms
const results = await api.search("ipa");
console.log(results.total);
// Get beer style detail with BJCP parameters
const style = await api.style("new-england-ipa");
console.log(style.abv_min, style.abv_max); // 6.0 9.0
console.log(style.ibu_min, style.ibu_max); // 25 60
// Get hop variety detail
const hop = await api.hop("citra");
console.log(hop.aroma_descriptors); // ["citrus", "tropical", "grapefruit"]
// Compare two styles
const comparison = await api.compare("west-coast-ipa", "new-england-ipa");
// Random beer style
const random = await api.random();What You Can Do
Beer Style Categories
Beer styles follow the Beer Judge Certification Program (BJCP) guidelines -- the global standard for beer style classification. Each style has defined parameters for appearance, aroma, flavor, and mouthfeel:
| Category | Description | Notable Styles | |----------|-------------|----------------| | Ale | Top-fermented, warm fermentation (15-24C) | Pale Ale, IPA, Stout, Porter | | Lager | Bottom-fermented, cold conditioning (7-13C) | Pilsner, Helles, Bock, Dunkel | | Wheat | Significant wheat malt proportion (30-70%) | Hefeweizen, Witbier | | IPA | Hop-forward, American craft innovation | West Coast, NEIPA, Double IPA | | Sour | Intentional acidity from wild yeast/bacteria | Lambic, Gose, Flanders Red | | Belgian | Complex yeast character, phenols, esters | Dubbel, Tripel, Saison |
Learn more: Browse 112 Beer Styles -- Style Comparison
Hop Varieties
82 hop varieties with alpha acid percentages, aroma descriptors, and recommended beer styles. Hops provide bitterness, floral/citrus/pine aromas, and act as a natural preservative. Major growing regions include Yakima Valley, Hallertau, Kent, Saaz, and Nelson.
Learn more: Explore 82 Hop Varieties
Malts and Grains
41 malts covering base malts (Pale, Pilsner, Munich), specialty malts (Crystal, Chocolate, Black Patent), and adjuncts (wheat, oats, rye). Temperature and duration of kilning determine color (2-450 SRM) and flavor.
Learn more: Browse 41 Malts
Key Brewing Metrics
| Metric | Abbreviation | Description | |--------|-------------|-------------| | International Bitterness Units | IBU | Hop bitterness (0-120+) | | Standard Reference Method | SRM | Beer color (1=pale, 40+=black) | | Alcohol By Volume | ABV | Alcohol content percentage | | Original Gravity | OG | Sugar before fermentation | | Attenuation | % | Sugar converted to alcohol |
API Reference
| Method | Description |
|--------|-------------|
| search(query) | Search styles, hops, malts, yeast, glossary |
| glossaryTerm(slug) | Get glossary term definition |
| style(slug) | Beer style detail with BJCP parameters |
| hop(slug) | Hop variety detail with alpha acids |
| malt(slug) | Malt detail with color, flavor |
| yeast(slug) | Yeast strain detail |
| brewery(slug) | Brewery detail |
| compare(slugA, slugB) | Compare two beer styles |
| random() | Random beer style |
TypeScript Types
import type { SearchResult, GlossaryTerm, StyleDetail, HopDetail, MaltDetail, YeastDetail, BreweryDetail, CompareResult, RandomResult } from "@fyipedia/beerfyi";Learn More About Beer
- Reference: Styles | Hops | Malts | Yeast
- Guides: Brewing Guides | Glossary
- API: Developer Docs | OpenAPI Spec
- Python: PyPI Package
Also Available for Python
pip install beerfyiSee the Python package on PyPI.
Beverage FYI Family
Part of the FYIPedia open-source developer tools ecosystem -- world beverages from cocktails to sake.
| Package | PyPI | npm | Description | |---------|------|-----|-------------| | cocktailfyi | PyPI | npm | 636 cocktails, ABV, calories -- cocktailfyi.com | | vinofyi | PyPI | npm | Wines, grapes, regions, food pairings -- vinofyi.com | | beerfyi | PyPI | npm | 112 beer styles, hops, malts, BJCP -- beerfyi.com | | brewfyi | PyPI | npm | 72 coffee varieties, brew methods -- brewfyi.com | | whiskeyfyi | PyPI | npm | 80 whiskey expressions, distilleries -- whiskeyfyi.com | | teafyi | PyPI | npm | 60 tea varieties, teaware -- teafyi.com | | nihonshufyi | PyPI | npm | 80 sake, rice varieties -- nihonshufyi.com |
License
MIT
