# Untappd Beer ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/untappd/beer` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/untappd-beer | ## Description Read one Untappd beer, including ABV, IBU, and brewery. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/untappd/beer' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Lagunitas IPA ```json { "id": "4509", "abv": 6.2, "ibu": 51, "url": "https://untappd.com/beer/4509", "name": "IPA", "image": "https://assets.untappd.com/site/beer_logos/beer-4509_21190_sm.jpeg", "style": "IPA - American", "rating": 3.6845, "brewery": "Lagunitas Brewing Company", "abv_display": "6.2% ABV", "brewery_url": "https://untappd.com/LagunitasBrewingCo", "description": "A well-rounded, Highly drinkable India Pale Ale. A bit of Caramel Malt barley provides the richness that mellows out the twang of the hops, including Cascade, Centennial, Chinook and a splash of honorary ā€œCā€ hop, Simcoe.", "ibu_display": "51 IBU", "ratings_count": 813594, "total_checkins": 1970000, "unique_checkins": 893270, "monthly_checkins": 3193, "total_checkins_display": "1.97M+" } ``` ## Documentation ## Overview Read one beer page on Untappd. Pass the numeric id from search, or a `/b/` or `/beer/` URL. The response is a flat record with brewery, style, ABV, IBU, rating, description, and check-in counts. `4509` is Lagunitas Brewing Company's IPA: the same id, name, brewery, ABV `6.2`, and IBU `51` as the `ipa` search card. The card rating can show fewer decimal places than `rating` on this page. ## Quickstart ``` GET https://api.piloterr.com/v2/untappd/beer?query=4509 GET https://api.piloterr.com/v2/untappd/beer?query=https://untappd.com/b/lagunitas-brewing-company-ipa/4509 GET https://api.piloterr.com/v2/untappd/beer?query=4473 ``` GET and POST take the same `query`. `4473` is Guinness Draught from a `stout` search, with brewery Guinness, ABV `4.2`, and IBU `45`. ## Parameters | Parameter | Required | Example | |---|---|---| | `query` | yes | `4509` | `query` is required. A positive integer is the beer id and opens `/beer/{id}`. A URL must be on `untappd.com` and contain `/b/` or `/beer/`. A keyword, a search URL, or another host returns 400. ## Response fields | Field | Type | Meaning | |---|---|---| | `id` | string | Beer id | | `name` | string | Name | | `url` | string | Beer URL without a query string | | `brewery` | string or null | Brewery | | `brewery_url` | string or null | Brewery URL. The profile path can differ from the search card's brewery link | | `style` | string or null | Style | | `abv` | number or null | ABV | | `abv_display` | string or null | Printed ABV, such as `6.2% ABV` | | `ibu` | number or null | IBU | | `ibu_display` | string or null | Printed IBU, such as `51 IBU` | | `rating` | number or null | Average rating | | `ratings_count` | number or null | Ratings | | `description` | string or null | Description | | `total_checkins` | number or null | Floor of the total check-in label. `1.97M+` becomes `1970000` | | `total_checkins_display` | string or null | Printed total, such as `1.97M+` | | `unique_checkins` | number or null | Unique check-ins | | `monthly_checkins` | number or null | Monthly check-ins | | `image` | string or null | Label image | `abv` matches the number in `abv_display`. `ibu` matches the number in `ibu_display`. There is no `results` wrapper. ## Use cases - Store ABV `6.2`, IBU `51`, and brewery Lagunitas Brewing Company for beer `4509`. - Keep the description of that IPA next to the style `IPA - American`. - Track check-ins with the printed label `1.97M+` and the numeric floor `1970000`. ## Error codes | Code | Meaning | |---|---| | `400` | Empty query, a non-beer URL, or a domain outside untappd.com | | `401` | Missing API key | | `404` | No beer page for that id | | `500` | The fetch failed | ## Related endpoints [Untappd Search](https://www.piloterr.com/library/untappd-search)