Most wildlife species are urban avoiders, but some became urban utilizers and dwellers successfully living in cities. Often, they are assumed to be attracted into urban areas by easily accessible and highly energetic anthropogenic food sources. We macroscopically analysed stomachs of 247 wild boar (Sus scrofa, hereafter WB) from urban areas of Berlin and from the surrounding rural areas. From the stomach contents we determined as predictors of food quality modulus of fineness (MOF,), percentage of acid insoluble ash (AIA) and macronutrients such as amount of energy and percentage of protein, fat, fibre and starch. We run linear mixed models to test: (1) differences in the proportion of landscape variables, (2) differences of nutrients consumed in urban vs. rural WB and (3) the impact of landscape variables on gathered nutrients. We found only few cases of anthropogenic food in the qualitative macroscopic analysis. We categorized the WB into five stomach content categories but found no significant difference in the frequency of those categories between urban and rural WB. The amount of energy was higher in stomachs of urban WB than in rural WB. The analysis of landscape variables revealed that the energy of urban WB increased with increasing percentage of sealing, while an increased human density resulted in poor food quality for urban and rural WB. Although the percentage of protein decreased in areas with a high percentage of coniferous forests, the food quality increased. High percentage of grassland decreased the percentage of consumed fat and starch and increased the percentage of fibre, while a high percentage of agricultural areas increased the percentage of consumed starch. Anthropogenic food such as garbage might serve as fallback food when access to natural resources is limited. We infer that urban WB forage abundant, natural resources in urban areas. Urban WB might use anthropogenic resources (e.g. garbage) if those are easier to exploit and more abundant than natural resources. This study shows that access to natural resources still is mandatory and drives the amount of protein, starch, fat or fibre in wild boar stomachs in urban as well as rural environments.