Trophic interactions govern biomass fluxes in ecosystems, and stability in food webs. Knowledge of how trophic interaction strengths are affected by differences among habitats is crucial for understanding variation in ecological systems. Here we show how substantial variation in consumption-rate data, and hence trophic interaction strengths, arises because consumers tend to encounter resources more frequently in three dimensions (3D) (for example, arboreal and pelagic zones) than two dimensions (2D) (for example, terrestrial and benthic zones). By combining new theory with extensive data (376 species, with body masses ranging from 5.24 × 10(-14) kg to 800 kg), we find that consumption rates scale sublinearly with consumer body mass (exponent of approximately 0.85) for 2D interactions, but superlinearly (exponent of approximately 1.06) for 3D interactions. These results contradict the currently widespread assumption of a single exponent (of approximately 0.75) in consumer-resource and food-web research. Further analysis of 2,929 consumer-resource interactions shows that dimensionality of consumer search space is probably a major driver of species coexistence, and the stability and abundance of populations.