This paper investigates how variability in partial foraging preferences for patch types can be used as a behavioral indicator of the energetic value of that patch type, and of overall food availability in the territory. The species studied was the lesser spotted woodpecker (Dendrocopos minor) and the patch types it uses are four groups of tree species (oak Quercus robur, birch Betula pendula, B. pubescens, alder Alnus glutinosa, and lime Tilia cordata), in which it feeds upon wood-living insect larvae. We partition the variation in foraging preferences into three scales. Firstly, within territories, the foraging preference for a tree species group was positively related to the prey density in that species group. That is, the preferences measure the patch types' energetic profit-abilities. This result should be general in cases like the present, where the costs of using different alternatives do not differ substantially. It may therefore be the preferred behavioral indicator in determining the relative benefits associated with different alternatives. Secondly, between the seven years of study, much of the variation in tree species group preferences was attributable to measured fluctuations in the density of one important prey species (Argyresthia goedarthella, Argyresthidae, Lepidoptera), which occurred in some years on birch, in others on alder, and in one year was virtually absent. Thus, in concordance with the previous result, the values of these tree species groups fluctuated between years according to prey density. Thirdly, between territories, we found that the preference for one tree species, lime, was higher in areas where it was more abundant. We attribute this to the fact that the density (per patch) of at least one important prey species (Stenostola dubia, Cerambycidae, Coleoptera) on lime increased with the abundance of its host tree species in the territory. That is, the overall food availability was higher in territories where lime was more common. Hence, the preference for lime estimates overall food availability. This conclusion is strengthened by two additional facts: the preference for lime correlates positively (1) with the average giving-up density of food, which has previously been shown to estimate overall food availability in the territories, and (2) with reproductive success, at least during the early stages of reproduction.