Check a list of trip stops against a user’s history (cache)
untappd_trip_checkPlan a brewery or bar crawl in one call: check visited venues for you or a group, count beers had at each brewery, and list not-had beers by style and global rating.
Instructions
Plan a brewery/bar crawl in ONE call: for each place (venue_id, name + city/state, lat/lng, and/or brewery_id) return whether the user has been there (dates, total visits, matched venues incl. "(duplicate of …)" copies — from the cached venue history, run untappd_sync_user_venues first), and for a brewery_id: how many of its beers they have had and the top 4 (top_n) NOT-had beers by Untappd global rating, optionally filtered by style (out-of-production beers skipped unless include_out_of_production). Has-had and visits come from the cache ONLY; the only API calls are brewery/beer_list fetches for a brewery whose list is not cached or is past its 7-day TTL, at most api_budget (default 5; 0 = strictly cache-only, a stale list is then used and flagged) under the ~100 calls/hour guard — a missing list sets another_run_needed. Beer lists are global facts: Untappd's have_had on that endpoint is the AUTHENTICATED account's and is never used. Favorites (breweries liked on Untappd via untappd_sync_brewery_likes, derived from the cached history, or added with untappd_favorite_add) are flagged on matched venues, the brewery and beers; prefer_favorites (default true) lifts wishlisted beers (+0.5) and a favorite brewery's beers (+0.25); and a stop within near_favorite_radius_m (default 2000 m) of a favorite venue gets near_favorites + a "Near a favorite" hint. For a GROUP pass usernames + mode ("none_had" default / "any_not_had"). Returns has-had and venue freshness blocks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | With usernames: "none_had" (default) lists beers new to everyone; "any_not_had" beers someone still needs | |
| style | No | Case-insensitive substring filter on the beer style (e.g. "ipa") | |
| top_n | No | Not-had beers listed per brewery stop (default 4) | |
| places | Yes | The stops (1–25); each needs venue_id, name, lat+lng, or brewery_id | |
| username | No | Untappd username. Omit to use your own configured account (UNTAPPD_USERNAME). | |
| usernames | No | Check a GROUP (1–10) instead of one user; use instead of username | |
| api_budget | No | Max brewery/beer_list calls for missing or stale lists (default 5; 0 = cache only) | |
| max_matches | No | Most matched venues listed per user per stop (default 5) | |
| prefer_favorites | No | Boost wishlisted beers (+0.5) and favorite-brewery beers (+0.25) (default true) | |
| near_favorite_radius_m | No | Radius for the "near a favorite" hint in metres (default 2000) | |
| include_out_of_production | No | Also rank beers Untappd marks out of production (default false) |