Background: Avian predators are known to take prey in proportion to their availability in different ecological settings, but additional causes of variation in species representation remain unclear. Species recorded in predator diets may reflect both novel predator adaptive strategies as well as the composition of prey communities. Assemblages of regurgitated owl pellets typically contain diverse species of small vertebrates, and analysis of their contents provides a way to document changes in both prey populations and predator strategies over time. Furthermore, pellet assemblages can provide valuable information on species (including cryptic species) not captured using conventional trapping methods. Objectives: The study aimed to compare historical and current small mammal prey diversity in Western Barn Owl pellets and trapping surveys in Nairobi Urban Environment (NUE) and Tsavo East National Park (TENP) to assess patterns of prey selection in relation to two different habitats and evaluate the potential for using owl diets to monitor changes in ecosystem health over time. Methods: This study conducted dietary analysis of the Western Barn Owl [Tyto alba (Scopoli, 1769)] in the NUE and TENP. We compared prey composition in Western Barn Owl pellets residing in these two localities and assessed small mammal populations through trapping in the same areas. A total of 795 complete and previously disintegrated Western Barn Owl pellets retrieved from both localities were analysed. The NUE dataset consisted of two nest sites, which included 371 complete pellets collected in 2020–2021 and disintegrated pellets collected in 2005, as records of recent and past diversity to compare with trap results. For TENP we analysed 424 Western Barn Owl pellets from four nests collected in 2020–2021. Trapping surveys for small mammals were conducted for two seasons between December 2020 and August 2021 across suspected owl foraging habitats and around the nest sites in both locations. Results: Small mammals formed the principal prey for all owls across the sites, with other taxa such as birds, reptiles, invertebrates and amphibians present in lower abundance. Variation in diet was significant between the two sites, which we infer was primarily determined by prey availability. Comparison of pellet and trapping data showed significant differences in recorded species diversity across habitats. Conclusions: Our study involved understanding how different environmental conditions affect Western Barn Owl diet. The results demonstrate dietary variation across biogeographical regions with both urban and natural habitats, suggesting that small mammal communities co-existing in a given ecological region can adapt to local environmental conditions. Species richness in the owl diet was greater in the urban habitat, likely because of increased prey diversity as well as the adaptability of Western Barn Owls as predators in this environment.