PunkAPI (BrewDog) API
Data on BrewDog's beers — ingredients, brewing tips and food pairings.
What it does
PunkAPI serves BrewDog’s ‘DIY Dog’ recipe book as an API: around 325 beers with name, tagline, description, ABV, IBU, colour (EBC/SRM), ingredients (malt, hops, yeast), food pairings, brewer’s tips and a full mash/fermentation method.
Base URL
Authentication
The v2 API is key-less: /beers, /beers/{id}, /beers/random, with filters like abv_gt, ibu_lt, brewed_after, food. Note v2 is being wound down in favour of a v3 that requires an API key — check punkapi.com for current status.
Code examples
curl -s "https://api.punkapi.com/v2/beers?abv_gt=8&ibu_gt=60&per_page=3" curl -s "https://api.punkapi.com/v2/beers/random"
import requests
r = requests.get("https://api.punkapi.com/v2/beers",
params={"food": "spicy_food", "per_page": 5}, timeout=10)
for b in r.json():
print(b["name"], f'{b["abv"]}% ABV', "IBU", b["ibu"])Rate limits & quotas
v2: roughly 3,600 requests/hour per IP without a key, per_page up to 80. The dataset is fixed (the DIY Dog book), so cache the whole thing once. If v2 is retired you will need a v3 key.
Key response fields
| id / name / tagline | Beer identity |
| abv / ibu / ebc / srm / ph | Strength, bitterness, colour, acidity |
| ingredients.malt[] / hops[] / yeast | Recipe ingredients with amounts and timing |
| food_pairing[] | Suggested dishes |
| method.mash_temp[] / fermentation.temp / brewers_tips | How to brew it |
Common errors
| 404 | Unknown beer id (valid ids are ~1–325). |
| 429 | Hourly rate limit exceeded. |
| (v2 deprecation) | If v2 returns errors or redirects, the API moved to keyed v3 — register for a key. |
When to use it (and alternatives)
Fun for a beer-of-the-day widget, homebrew reference, or food-pairing feature. For real-world brewery locations use Open Brewery DB; for cocktails, TheCocktailDB.
FAQ
Is PunkAPI still free?
The classic v2 endpoints are still key-less for now, but the project has signalled a move to a v3 that needs an API key. Cache the dataset and watch punkapi.com for the cut-over.
How many beers are there?
About 325 — the complete BrewDog DIY Dog recipe archive. New beers are not being added.
Can I filter by food pairing?
Yes — ?food=spicy_food (spaces become underscores) does a fuzzy match against each beer’s food_pairing list.
New to APIs?
Short guides for working with this API — and any other.