Skip to main content

Beer knowledge API client — search beer styles, ingredients, and brewing terms from BeerFYI.

Project description

beerfyi

PyPI version Python License: MIT

Beer knowledge API client for Python. Search 112 beer styles, 82 hop varieties, 41 malts, 29 yeast strains, and brewing terminology from BeerFYI -- the complete beer style reference with 150 expert guides covering BJCP classifications, ingredient science, and brewing techniques.

Explore beer at beerfyi.com -- Beer Styles | Hops | Malts | Yeast | Brewing Guides

beerfyi demo -- beer style API search and lookup

Table of Contents

Install

pip install beerfyi[api]     # API client (httpx)
pip install beerfyi[cli]     # + CLI (typer, rich)
pip install beerfyi[mcp]     # + MCP server
pip install beerfyi[all]     # Everything

Quick Start

from beerfyi.api import BeerFYI

with BeerFYI() as api:
    # Search beer styles, hops, malts, yeast, glossary terms
    results = api.search("ipa")
    print(results)

    # Look up a glossary term
    term = api.glossary_term("ibu")
    print(term["definition"])

What You'll Find on BeerFYI

BeerFYI is a comprehensive beer reference covering 112 beer styles, 82 hop varieties, 41 malts, 29 yeast strains, and 150 expert guides. The database follows the Beer Judge Certification Program (BJCP) style guidelines -- the global standard for beer style classification used in homebrewing competitions and professional brewing.

Beer Style Categories

Beer styles are organized into broad families based on fermentation method, yeast type, and regional brewing traditions. 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, Belgian Tripel
Lager Bottom-fermented, cold conditioning (7-13C) Pilsner, Helles, Bock, Dunkel, Marzen
Wheat Significant wheat malt proportion (30-70%) Hefeweizen, Witbier, Berliner Weisse
Stout Roasted barley, dark color, rich body Dry Stout, Imperial Stout, Milk Stout, Oatmeal Stout
IPA Hop-forward, American craft innovation West Coast IPA, New England IPA, Double IPA, Session IPA
Sour Intentional acidity from wild yeast/bacteria Lambic, Gose, Flanders Red, Kettle Sour
Belgian Complex yeast character, phenols, esters Dubbel, Tripel, Quadrupel, Saison, Witbier
Wild/Spontaneous Open-air inoculation, Brettanomyces Lambic, Gueuze, American Wild Ale

Learn more: Browse 112 Beer Styles · Style Comparison Tool

Hop Varieties

BeerFYI catalogs 82 hop varieties with detailed profiles including alpha acid percentage, aroma descriptors, typical usage (bittering, flavor, aroma, dry-hop), and recommended beer styles. Hops provide bitterness to balance malt sweetness, contribute floral, citrus, pine, or tropical aromas, and act as a natural preservative.

Major hop-growing regions include the Pacific Northwest (Yakima Valley), Germany (Hallertau, Tettnang), England (Kent), Czech Republic (Saaz), and New Zealand (Nelson). Each region's terroir influences hop character -- Cascade from Yakima delivers different citrus notes than Cascade grown in other regions.

Learn more: Explore 82 Hop Varieties · Hop Search

Malts and Grains

The 41 malts in the database cover base malts (Pale, Pilsner, Munich, Vienna), specialty malts (Crystal, Caramel, Chocolate, Black Patent), and adjuncts (wheat, oats, rye, corn, rice). Malt provides fermentable sugars, body, color (measured in SRM/Lovibond), and flavor complexity.

The malting process -- steeping, germination, and kilning -- transforms raw barley into brewing malt. Temperature and duration of kilning determine color and flavor: light kilning produces pale malt (2-4 SRM), moderate kilning creates Munich malt (8-10 SRM), and high-temperature roasting yields chocolate malt (350-450 SRM).

Learn more: Browse 41 Malts · Brewing Glossary

Yeast Strains

BeerFYI tracks 29 yeast strains with fermentation temperature ranges, attenuation percentages, flocculation characteristics, and flavor contributions. Yeast is the most influential ingredient in beer -- the same wort fermented with different yeast strains produces fundamentally different beers.

Major yeast categories include clean ale strains (American, English), expressive Belgian strains (Abbey, Saison), clean lager strains (Bohemian, Bavarian), and wild cultures (Brettanomyces, Lactobacillus, Pediococcus).

Learn more: Yeast Strain Profiles · Beer Guides

Key Brewing Metrics

Metric Abbreviation Description
International Bitterness Units IBU Measures hop bitterness (0-120+)
Standard Reference Method SRM Measures beer color (1=pale straw, 40+=black)
Alcohol By Volume ABV Alcohol content percentage
Original Gravity OG Sugar content before fermentation
Final Gravity FG Residual sugar after fermentation
Attenuation % Percentage of sugar converted to alcohol

Learn more: Beer Style Parameters · Brewing Calculator

API Endpoints

All endpoints are free, require no authentication, and return JSON with CORS enabled.

Method Endpoint Description
GET /api/v1/styles/ List all 112 beer styles
GET /api/v1/styles/{slug}/ Beer style detail with BJCP parameters
GET /api/v1/hops/ List all 82 hop varieties
GET /api/v1/hops/{slug}/ Hop variety detail with alpha acids
GET /api/v1/malts/ List all 41 malts
GET /api/v1/malts/{slug}/ Malt detail with color, flavor
GET /api/v1/yeast/ List all 29 yeast strains
GET /api/v1/yeast/{slug}/ Yeast strain detail
GET /api/v1/glossary/ List all brewing terminology
GET /api/v1/glossary/{slug}/ Glossary term definition
GET /api/v1/search/?q={query} Search across all content
GET /api/v1/compare/{slug1}/{slug2}/ Compare two beer styles
GET /api/v1/random/ Random beer style
GET /api/v1/guides/ List all 150 guides
GET /api/v1/guides/{slug}/ Guide detail
GET /api/v1/openapi.json OpenAPI 3.1.0 specification

Example

curl -s "https://beerfyi.com/api/v1/styles/new-england-ipa/"
{
  "slug": "new-england-ipa",
  "name": "New England IPA",
  "category": "IPA",
  "description": "A hazy, juicy, hop-forward ale emphasizing tropical fruit and citrus aromas with soft bitterness and a creamy mouthfeel.",
  "abv_min": 6.0,
  "abv_max": 9.0,
  "ibu_min": 25,
  "ibu_max": 60,
  "srm_min": 3,
  "srm_max": 7,
  "og_min": 1.060,
  "og_max": 1.085,
  "recommended_hops": ["Citra", "Mosaic", "Galaxy", "El Dorado"],
  "url": "https://beerfyi.com/styles/new-england-ipa/"
}

Full API documentation: beerfyi.com/developers/. OpenAPI 3.1.0 spec: beerfyi.com/api/v1/openapi.json.

Command-Line Interface

# Search beer styles, hops, malts, yeast
beerfyi search "ipa"
beerfyi search "cascade hops"
beerfyi search "belgian"

# Look up brewing terms
beerfyi term "ibu"
beerfyi term "attenuation"

# Search by ingredient
beerfyi search "citra"
beerfyi search "crystal malt"

The CLI displays results in formatted tables with rich terminal output.

MCP Server (Claude, Cursor, Windsurf)

Run as an MCP server for AI-assisted beer queries:

python -m beerfyi.mcp_server

Claude Desktop (~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "beerfyi": {
      "command": "uvx",
      "args": ["--from", "beerfyi[mcp]", "python", "-m", "beerfyi.mcp_server"]
    }
  }
}

Tools: beer_search, beer_glossary_term

API Client

from beerfyi.api import BeerFYI

with BeerFYI() as api:
    # Search across styles, hops, malts, yeast, glossary
    results = api.search("stout")

    # Look up brewing terminology
    term = api.glossary_term("dry-hopping")
    print(term["definition"])

    # Compare two beer styles
    comparison = api.compare("west-coast-ipa", "new-england-ipa")

    # Get a random beer style
    random_style = api.random()

Learn More About Beer

Beverage FYI Family

Part of the FYIPedia open-source developer tools ecosystem -- world beverages from cocktails to sake.

Site Domain Focus
CocktailFYI cocktailfyi.com 636 cocktails, ABV, calories, flavor profiles
VinoFYI vinofyi.com Wines, grapes, regions, wineries, food pairings
BeerFYI beerfyi.com 112 beer styles, hops, malts, yeast, BJCP
BrewFYI brewfyi.com 72 coffee varieties, roasting, 21 brew methods
WhiskeyFYI whiskeyfyi.com 80 whiskey expressions, distilleries, regions
TeaFYI teafyi.com 60 tea varieties, teaware, brewing guides
NihonshuFYI nihonshufyi.com 80 sake, rice varieties, 50 breweries

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beerfyi-0.1.3.tar.gz (570.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beerfyi-0.1.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file beerfyi-0.1.3.tar.gz.

File metadata

  • Download URL: beerfyi-0.1.3.tar.gz
  • Upload date:
  • Size: 570.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for beerfyi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0a6d87bdb2a0b8119015b367f48a6c9488ce2fcd82806bafe729e57c5c1d42f7
MD5 0c2214e0d25729ebbc1b00e4d4e7c09d
BLAKE2b-256 d7d7f3ef8ab45abe2bcb263b52d476d3f6fd28bb8447b623d5e0a25b69159435

See more details on using hashes here.

File details

Details for the file beerfyi-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: beerfyi-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for beerfyi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d6a2f44e894e69762b59d0213b9cad5a5c89de49868143dd715c7761d06008dd
MD5 026cdebc79207a042b7750061051e9ea
BLAKE2b-256 098242436274e7ce24098d6bc74c774c5753149a295f7485bda93737c11eadc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page