UMich Dining
v2.0.1Menus, traits, allergens, nutrition and hours of the ten University of Michigan dining halls.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_locations List dining halls
List the dining halls and their service periods for the day, with whether they are open now. openNow is evaluated at the current campus-local time. The entries are the halls and their service periods for the day. stale means a page was served from an expired cache entry; asOf is the age of the data. Cafes, markets, bakeries, grills, prices and meal plans are out of scope.
| Parameter | Type | Description |
|---|---|---|
date | string | The day to read. Defaults to today. |
hall | string | Keep only this hall. |
filter_dishes Filter dishes
Filter dining hall menus by allergen, trait, nutrient density, carbon, calories, sodium and name. All params optional. Allergens/traits are slugs; read key for codes. min_mhealthy: keep tiers >= (1-5). max_carbon: keep tiers <= (1 low, 2 medium, 3 high). nutrients: range per nutrient. query: case-insensitive substring. Rows are coded arrays; read key. stale means expired cache; asOf data age. Allergens advisory.
| Parameter | Type | Description |
|---|---|---|
date | string | A single day to filter. Cannot be combined with from/to. |
exclude_allergens | array | Keeps only the dishes that carry none of these allergens. |
from | string | The first day of a range to filter. |
hall | Halls: one, a list, or none for all. | |
include_nutrients | array | Nutrients to return, by key/name, or ["all"]. |
limit | integer | Rows to return (default 50, max 500). |
max_carbon | integer | The highest acceptable carbon footprint: 1 (low), 2 (medium) or 3 (high). The dishes the site did not tag are dropped. |
meal | string | Keeps only that meal. |
min_mhealthy | integer | The lowest acceptable nutrient-density tier. The dishes the site did not tag are dropped. |
nutrients | object | Range per nutrient, e.g. {"protein":{"min":20,"unit":"g"}}. A constraint drops dishes with no value. |
offset | integer | Pages of the range to skip. |
query | string | A case-insensitive substring of the dish name. |
require_traits | array | Keeps only the dishes that carry every one of these traits. |
sort_by | string | Sort field: a nutrient key, carbonFootprint, a micronutrient name, servingSize, mhealthyTier, or a ratio "numerator:denominator" (e.g. "protein:calories", "vitaminA:iron"). Legacy: proteinToCalorie, f… |
sort_order | string | The direction of the sort. It defaults to desc, so the biggest value comes first. |
station | string | Keeps only that station. |
to | string | The last day of a range to filter. Defaults to the last published day. |
list_nutrition_fields List nutrition fields
List the canonical nutrient identifiers, their units, the alternative units a threshold may be written in, and the Daily Value basis of the published micronutrients. A constraint on a nutrient excludes the dishes that publish no value for it, and a value the site writes as "trace" or "< 1%" is missing rather than zero. sortFields includes servingSize, mhealthyTier and ratio syntax "a:b".
get_hours Get dining hall hours
Get the service periods published for a dining hall on the requested day, plus the regular weekly schedule. Accepts one hall, a list, or none for all (like filter_dishes). today is the day's published service periods and regular is the weekly schedule. A hall that cannot be read is reported in the failures and the other halls are still returned. The response carries the weekday name of the requested date. stale means the data is from cache and may be slightly old, but is still the best available; asOf is the age. Re-call only if you need guaranteed-fresh data.
| Parameter | Type | Description |
|---|---|---|
date | string | The day to read. Defaults to today. |
hall | Halls: one, a list, or none for all. |
get_dining_occupancy Dining hall occupancy
Real-time occupancy for monitored dining halls: current count, patron flow, total capacity, and percent full. Only halls with sensors are returned.
| Parameter | Type | Description |
|---|---|---|
hall | Keep only this hall, or a list of halls. |
find_open_now Find halls that are open now
The dining halls that are serving at the given time of day, and the ids of the ones that are not, with the service periods of the day for the halls that are open. Without arguments the current campus-local time is used, and the response says which time it resolved. open carries the hall details and today's periods; closed carries hall ids only. stale means a page was served from an expired cache entry; asOf is the age of the data.
| Parameter | Type | Description |
|---|---|---|
at | string | The campus-local time of day to look at. Defaults to the current time. |
date | string | The day to look at. Defaults to today. |
get_item_nutrition Get a dish nutrition panel
Get the full nutrition panel of one dish. Name matched case-insensitively; exact match wins, else unique substring. Dish row uses the same coded layout as the sweep tools. Panel values are numbers with one units map; micronutrient amount is the derived amount, with the published percent behind it. asOf data age. Allergens advisory. Use this only when you need the full panel for a single dish. For multiple dishes, use filter_dishes with include_nutrients instead.
| Parameter | Type | Description |
|---|---|---|
hall * | string | The dining hall to read. |
item * | string | The dish name. |
date | string | Date YYYY-MM-DD. Site publishes today-3..+14 days. |
meal | string | Narrow the search to one meal. |
station | string | Narrow the search to one station. |