nihonshufyi
v0.1.0
Published
TypeScript API client for NihonshuFYI -- sake grades, rice varieties, breweries, and Japanese brewing traditions. Zero dependencies.
Maintainers
Readme
nihonshufyi
TypeScript API client for NihonshuFYI -- the comprehensive sake reference with 80 sake expressions, 10 rice varieties, 50 breweries, 9 sake grades, and 101 expert guides covering the tokutei meishoshu classification, polishing ratios, koji cultivation, and parallel multiple fermentation. Zero dependencies, uses native fetch.
Explore sake at nihonshufyi.com -- Sake | Rice | Breweries | API Docs
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Reference
- TypeScript Types
- Learn More About Sake
- Also Available for Python
- Beverage FYI Family
- License
Install
npm install nihonshufyiWorks in Node.js, Deno, Bun, and browsers (ESM).
Quick Start
import { NihonshuFYI } from "nihonshufyi";
const api = new NihonshuFYI();
// Search sake, breweries, rice, glossary
const results = await api.search("junmai daiginjo");
// Get sake detail with polishing ratio
const dassai = await api.sake("dassai-23");
console.log(dassai.polishing_ratio); // 23
console.log(dassai.grade); // "Junmai Daiginjo"
// Get rice variety detail
const yamada = await api.rice("yamada-nishiki");
console.log(yamada.characteristics);
// Compare two sake expressions
const comparison = await api.compare("dassai-23", "kubota-manju");What You Can Do
Sake Grade Classification
The tokutei meishoshu (special designation sake) system classifies premium sake by polishing ratio and whether distilled alcohol is added:
| Grade | Polishing | Alcohol Added | Characteristics | |-------|----------|---------------|-----------------| | Junmai Daiginjo | 50% or less | No | Pinnacle, highly aromatic, elegant | | Daiginjo | 50% or less | Yes (small) | Fragrant, refined, light | | Junmai Ginjo | 60% or less | No | Fruity, floral, balanced | | Ginjo | 60% or less | Yes (small) | Aromatic, crisp, delicate | | Tokubetsu Junmai | 60% or less | No | Rice character, umami | | Junmai | No requirement | No | Wide range of styles | | Honjozo | 70% or less | Yes | Light, smooth, approachable |
The "junmai" prefix means pure rice -- no distilled alcohol added.
Learn more: Sake Grades -- Sake Encyclopedia
Rice Polishing (Seimaibuai)
Polishing ratio is the percentage of rice grain remaining after milling. Outer layers contain proteins and fats that produce off-flavors:
| Polishing | Result | |-----------|--------| | 70% | Honjozo level -- balanced | | 60% | Ginjo level -- fruity esters | | 50% | Daiginjo level -- highly aromatic | | 23% | Extreme polishing (Dassai 23) |
Sake Rice Varieties
10 sake-specific rice varieties (sakamai) with larger grains, prominent starch core (shinpaku), and lower protein:
| Variety | Origin | Character | |---------|--------|-----------| | Yamada Nishiki | Hyogo | "King of sake rice," elegant | | Gohyakumangoku | Niigata | Clean, crisp, tanrei karakuchi | | Miyama Nishiki | Nagano | Light, dry | | Omachi | Okayama | Rich, deep, umami |
Key Sake Concepts
| Concept | Description | |---------|-------------| | Nihonshu-do (SMV) | Positive = dry, negative = sweet | | Nama | Unpasteurized, fresh, must refrigerate | | Genshu | Undiluted, 17-20% ABV | | Koshu | Aged sake, amber, nutty | | Nigori | Cloudy, coarsely filtered, creamy | | Toji | Master brewer |
API Reference
| Method | Description |
|--------|-------------|
| search(query) | Search sake, breweries, rice, glossary |
| glossaryTerm(slug) | Get glossary term definition |
| sake(slug) | Sake detail with grade, tasting notes |
| brewery(slug) | Brewery detail with location, history |
| grade(slug) | Sake grade detail |
| rice(slug) | Rice variety detail |
| yeast(slug) | Yeast strain detail |
| compare(slugA, slugB) | Compare two sake expressions |
| random() | Random sake expression |
TypeScript Types
import type { SearchResult, GlossaryTerm, SakeDetail, BreweryDetail, GradeDetail, RiceDetail, YeastDetail, CompareResult, RandomResult } from "nihonshufyi";Learn More About Sake
- Reference: Sake | Rice | Breweries
- Guides: Sake Guides | Glossary
- API: Developer Docs | OpenAPI Spec
- Python: PyPI Package
Also Available for Python
pip install nihonshufyiSee 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 -- 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
