Much of the world's agricultural production depends on the pollination services provided by wild bees. Yet, agriculture changes landscapes and soils in ways that alter bee habitat. Three-quarters of wild bee species nest underground, but little is known about their nesting requirements. In this study, we asked which soil factors influence the abundance, species richness and diversity of ground-nesting bees in agroecosystems around Ottawa, Canada. We used pan traps to sample the bee community at 131 total plots on 15 and 30 farms (mostly orchards and market gardens) throughout the summers of 2018 and 2019, respectively. Bees were sorted according to their nesting traits, and ground-nesters were identified to species-level. Soil properties (texture, hardness, slope and vegetation cover) were measured at each plot.