Cafeterias
Get a cafeteria’s menu and prices from the school’s own cafeteria number (cafeteria_menu), and a list of cafeteria numbers, names, buildings and locations (cafeteria_places). No login is needed. The school has no cafeteria list API, so the list is built by the library: it calls the menu answer for numbers 1 to max_place_id one after the other and collects the places. Common rules are on Common rules.
Request parameters
Section titled “Request parameters”| Parameter | Type | Required | Default | Meaning |
|---|---|---|---|---|
place_id (cafeteria_menu) |
string | required | none | The school’s cafeteria number. The library has no number table, so check cafeteria_places() |
max_place_id (cafeteria_places) |
integer | optional | 10 |
Number range 1 to max_place_id used to build the cafeteria list. Raise it when cafeterias are added (max 50; outside the range it is INVALID_INPUT with no request) |
- Naming: Python uses
snake_case, Node.js and Java usecamelCase(maxPlaceId). Node.js iscafeteriaMenu(placeId)andcafeteriaPlaces({ maxPlaceId }); Java iscafeteriaMenu(String placeId),cafeteriaPlaces()andcafeteriaPlaces(int maxPlaceId). - School request:
GET https://www.sejong.ac.kr/kor/unilife/cafeteria-info.do?mode=getMenuList&placeId=<number>, answer arrayitems. cafeteria_placescalls the same address for numbers 1 tomax_place_id, one at a time (no parallel requests). It is the only method where one call sends several requests.- For each number, one cafeteria is built from the first row of the answer. A number with no menu rows is not added. A
place_idappears once, and the result is in number order.
Response data structure
Section titled “Response data structure”Example of cafeteria_menu (field names in Python style; Node.js and Java use camelCase). School data changes, so the values are examples.
[ { "place_id": "1", "place_name": "Cafeteria name", "building_name": "Building name", "location": "6F", "date": "2026-03-02", "day": "Mon", "meal_type_id": "1", "meal_name": "Lunch", "menu_name": "soup · main dish · kimchi", "price": "7000" }, { "place_id": "3", "place_name": "Another cafeteria", "building_name": "Building name", "location": "B1", "date": "", "day": "", "meal_type_id": "", "meal_name": "", "menu_name": "ramen", "price": "3300" }]Example of cafeteria_places:
[ { "place_id": "1", "place_name": "Cafeteria name", "building_name": "Building name", "location": "6F", "extra": {} }]All fields are strings, and a missing value is an empty string. Depending on the cafeteria, the menu is either a dated weekly menu or a standing menu with no date. Rows of a standing-menu cafeteria have empty date, day, meal_type_id and meal_name.
Menu (CafeteriaMenuItem, no extra)
Section titled “Menu (CafeteriaMenuItem, no extra)”| Field | School key | Meaning |
|---|---|---|
place_id |
placeId |
Cafeteria number |
place_name |
placeName |
Cafeteria name |
building_name |
buildingName |
Building |
location |
location |
Location (for example 6F) |
date |
menuDate |
Menu date (empty for standing-menu cafeterias) |
day |
day |
Day of the week (empty for standing-menu cafeterias) |
meal_type_id |
mealTypeId |
Meal type number (1 lunch, 2 dinner) |
meal_name |
mealName |
Meal name (school’s own text) |
menu_name |
menuName |
Menu name |
price |
price |
Price (string, for example 5500) |
The library does not translate meal type numbers, so use the meal_name the school gives.
Cafeteria (CafeteriaPlace)
Section titled “Cafeteria (CafeteriaPlace)”| Field | Meaning |
|---|---|
place_id, place_name |
Cafeteria number, name |
building_name, location |
Building, location |
extra |
The remaining school fields, without the menu fields (date, day, meal, menu name, price) |
Failure behaviour
Section titled “Failure behaviour”- Cached per number for one day (86400 seconds by default). A school failure returns the last cached value, or an empty list. A failure with no cache returns an empty list without a request for 60 seconds (default).
- If any one request of
cafeteria_placesfails, the whole list fails. A partial list is never cached, so only part of the list cannot stay cached for a day. - Neither method raises for school-side problems. Only a
max_place_idoutside the range raisesINVALID_INPUT. - An empty
cafeteria_menudoes not prove the number is wrong. A number that does not exist and a day with no menu posted yet (holidays included) both return an empty list.
Known limits
Section titled “Known limits”- The school has no cafeteria list API, so a cafeteria whose number is above
max_place_idis not found. Raisemax_place_idwhen cafeterias are added. - A cafeteria with an empty menu (weekly menu not posted, holiday) is missing from the list until the next refresh (one day by default).
- A cafeteria with no menu number cannot appear in this list.
- Cafeteria numbers can change, so check
cafeteria_places()instead of hard-coding numbers. The library does not guess names from numbers. - Contract source: spec/PUBLIC_DATA.md
Example code
Section titled “Example code”List<CafeteriaPlace> places = publicData.cafeteriaPlaces(); // 10 requests by default (maxPlaceId raises it to 50), cached for a dayList<CafeteriaMenuItem> menu = publicData.cafeteriaMenu("1"); // menu of cafeteria 1places = public_data.cafeteria_places() # 10 requests by default (max_place_id raises it to 50), cached for a daymenu = public_data.cafeteria_menu("1") # menu of cafeteria 1const places = await publicData.cafeteriaPlaces(); // 10 requests by default (maxPlaceId raises it to 50), cached for a dayconst menu = await publicData.cafeteriaMenu('1'); // menu of cafeteria 1