The very likely answer to the question, "What do goats eat?" is: everything; but that is not necessarily so. Although these animals seemed to garner a disreputable image of heedless carnivores, you need to plan out carefully the goats' diet if you are planning to farm these animals for meat, milk or fiber. Goats being raised as pets should also be taught how to eat properly; otherwise, the animal might become destructive or eat its way to poor health.
In answer to the question, "What do goats eat?" goats eat both meat and plant-based food items. Commercially raised livestock need to have regular meals comprised of grains (energy,) proteins, vitamins and minerals. Most of the readily available goat feeds nowadays are formulated to have all these, which is great in supplementing the goats "fresh" diet. In other cases, a vet might provide separate goat supplements that can easily be added to their feeds.
Water should be provided to the goat at all times. These hoofed creatures can not sustain themselves for long without access to clean drinking water.
As a rule, domesticated goats eat the leaves of low shrubs, small trees and weeds. These animals do crop grasses, but only if no other food source is available. As a treat, farmers often provide fresh alfalfa to their diets, which is both palatable to and nutritious for the goats. These animals are also very likely to munch on ornamental plants, fruits and vegetables.
"So what do goats eat?" To help simplify matters, goats eat: acorns, apple trees, bamboo leaves and buds, banana trees, bay tree leaves, leaves and root of beets, bramble, broccoli plants, cabbages, entire cantaloupes, carrots, collard greens, cedar leaves and barks , cottonwoods, dandelions, small Douglas fir trees, ferns, entire grape plants, hibiscus, honeysuckle, jackfruit leaves, kudzu, mango leaves, maple leaves and bark, mints, mulberry plants, oak tree leaves, entire plants of raspberry, entire rose plants , cherry tomatoes, watermelons, etc.
On the other hand, it is also important to ask also, what food items are not good for these animals? Instead of asking, "What do goats eat?" it would be better to know what food items the goats must be discouraged from eating. Goats are naturally inquisitive, and may munch on a lot of poisonous (at least to them) food items. Some of these would include: leftover foods, moldy food items, avocadoes, boxwood trees, cassavas, choke cherry leaves and fruits, holly leaves and bark, lilacs, laurels, milkweeds, nightshades, oleanders, rhododendrons, leaves of the rhubarb plants, and all varieties of yew.