vinofyi
v0.1.0
Published
TypeScript API client for VinoFYI -- wines, grapes, regions, wineries, and food pairings. Zero dependencies.
Maintainers
Readme
vinofyi
TypeScript API client for VinoFYI -- the comprehensive wine encyclopedia with 777 grape varieties, 100K wines, 2,299 regions, 30K wineries, and 230 expert guides. Search wines, grapes, regions, wineries, compare varieties, and explore food pairings through a typed REST API. Zero dependencies, uses native fetch.
Explore wine at vinofyi.com -- Wines | Grapes | Regions | API Docs
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Reference
- TypeScript Types
- Learn More About Wine
- Also Available for Python
- Beverage FYI Family
- License
Install
npm install vinofyiWorks in Node.js, Deno, Bun, and browsers (ESM).
Quick Start
import { VinoFYI } from "vinofyi";
const api = new VinoFYI();
// Search wines, grapes, regions, glossary terms
const results = await api.search("pinot noir");
console.log(results.total); // number of matches
console.log(results.results[0].name); // "Pinot Noir"
// Get grape variety detail
const grape = await api.grape("cabernet-sauvignon");
console.log(grape.color); // "red"
console.log(grape.flavor_profile); // ["blackcurrant", "cedar", ...]
// Look up wine terminology
const term = await api.glossaryTerm("terroir");
console.log(term.definition);
// Compare two grapes
const comparison = await api.compare("pinot-noir", "cabernet-sauvignon");
// Food and wine pairing
const pairing = await api.pairing("steak", "red");What You Can Do
Wine Types
Wine is classified into six major categories based on production method, color, and residual sugar. Each type encompasses distinct winemaking techniques and flavor profiles:
| Type | Description | Key Characteristics | |------|-------------|---------------------| | Red | Extended skin contact during fermentation | Tannins, body, aging potential | | White | Pressed before fermentation, minimal skin contact | Acidity, aromatics, freshness | | Rose | Brief skin contact produces pink hue | Light body, versatile food pairing | | Sparkling | Secondary fermentation creates carbonation | Methode champenoise, Charmat | | Fortified | Spirit added during or after fermentation | Higher ABV (15-22%), Port, Sherry | | Dessert | Late harvest or dried grapes | Residual sugar, Sauternes, Ice Wine |
Learn more: Wine Types -- Wine Encyclopedia
Grape Varieties
VinoFYI catalogs 777 grape varieties with detailed profiles including origin, flavor descriptors, ideal growing conditions, and notable wine regions. Major international varieties include Cabernet Sauvignon, Merlot, Pinot Noir, Chardonnay, Sauvignon Blanc, and Riesling. Indigenous varieties like Nebbiolo (Piedmont), Tempranillo (Rioja), and Assyrtiko (Santorini) reflect centuries of regional adaptation.
Key attributes tracked: skin color, berry size, ripening period, climate preference, and typical flavor profile (primary, secondary, tertiary aromas).
Learn more: Browse 777 Grape Varieties -- Grape Search
Wine Regions and Terroir
2,299 wine regions organized hierarchically from country to specific appellations. Terroir -- the complete natural environment (climate, soil, altitude, aspect) -- explains why a Pinot Noir from Burgundy tastes fundamentally different from one grown in Oregon's Willamette Valley.
Major producing countries include France, Italy, Spain, the United States, Argentina, Chile, Australia, Germany, Portugal, and South Africa. Each country's appellation system (AOC, DOC, AVA, GI) defines quality standards and geographic boundaries.
Learn more: Explore Wine Regions -- Country Profiles
API Reference
| Method | Description |
|--------|-------------|
| search(query) | Search wines, grapes, regions, wineries, glossary |
| glossaryTerm(slug) | Get glossary term definition |
| wine(slug) | Wine detail with full profile |
| grape(slug) | Grape variety detail |
| region(slug) | Region detail with climate, soils |
| winery(slug) | Winery detail |
| compare(slugA, slugB) | Compare two grapes or wines |
| pairing(food, style) | Food and wine style pairing |
| vintage(region, year?) | Vintage chart data |
TypeScript Types
import type { SearchResult, GlossaryTerm, WineDetail, GrapeDetail, RegionDetail, WineryDetail, CompareResult, PairingResult, VintageResult } from "vinofyi";Learn More About Wine
- Reference: Wines | Grapes | Regions | Wineries
- Guides: Wine Guides | Wine Glossary
- API: Developer Docs | OpenAPI Spec
- Python: PyPI Package
Also Available for Python
pip install vinofyiSee 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
