Raw onion (generic) has 40 kcal per 100 g. The base-level onion entry covering all non-specific varieties. Cook or eat raw — the calorie difference is negligible.
How should I track Onions, raw?
For consistent tracking of Onions, raw, weigh it raw. Cooking method changes both weight and calorie density — steaming barely changes anything, but roasting with oil or frying can double the calories. A systematic review (Whitton et al., Adv Nutr 2022) found vegetables are omitted from food logs 2–85% of the time, often because people assume they are "free" calorically. While most vegetables are indeed low-calorie, the fats added during cooking are not. Log the oil, butter, or dressing separately to keep your tracking accurate.