ARTICLE Functional diversity of farmland bees across ruralurban landscapes in a tropical megacity Gabriel Marcacci 1 | Ingo Grass 2 | Vikas S. Rao 3 | Shabarish Kumar S 4 | K. B. Tharini 3 | Vasuki V. Belavadi 3 | Nils Nölke 5 | Teja Tscharntke 6,7 | Catrin Westphal 1,7 1 Functional Agrobiodiversity, Department of Crop Sciences, University of Göttingen, Göttingen, Germany 2 Ecology of Tropical Agricultural Systems, University of Hohenheim, Stuttgart, Germany 3 Agricultural Entomology, University of Agricultural Sciences, Bangalore, India 4 Department of Apiculture, University of Agricultural Sciences, Bangalore, India 5 Forest Inventory and Remote Sensing, Faculty of Forest Sciences and Forest Ecology, University of Göttingen, Göttingen, Germany 6 Agroecology, Department of Crop Sciences, University of Göttingen, Göttingen, Germany 7 Centre of Biodiversity and Sustainable Land Use (CBL), University of Göttingen, Göttingen, Germany Correspondence Gabriel Marcacci Email: gabriel.marcacci@uni- goettingen.de Funding information Deutsche Forschungsgemeinschaft, Grant/Award Numbers: 493487387, 405945293, 289781364 Handling Editor: Claudio Gratton Abstract Urbanization poses a major threat to biodiversity and food security, as expanding cities, especially in the Global South, increasingly compete with natural and agricultural lands. However, the impact of urban expansion on agricultural biodiversity in tropical regions is overlooked. Here we assess how urbanization affects the functional response of farmland bees, the most impor- tant pollinators for crop production. We sampled bees across three seasons in 36 conventional vegetable-producing farms spread along an urbanization gra- dient in Bengaluru, an Indian megacity. We investigated how landscape and local environmental drivers affected different functional traits (sociality, nesting behavior, body size, and specialization) and functional diversity (func- tional dispersion) of bee communities. We found that the functional responses to urbanization were trait specific with more positive than negative effects of gray area (sealed surfaces and buildings) on species richness, functional diver- sity, and abundance of most functional groups. As expected, larger, solitary, cavity-nesting, and, surprisingly, specialist bees benefited from urbanization. In contrast to temperate cities, the abundance of ground nesters increased in urban areas, presumably because larger patches of bare soil were still available beside roads and buildings. However, overall bee abundance and the abun- dance of social bees (85% of all bees) decreased with urbanization, threatening crop pollination. Crop diversity promotes taxonomic and functional diversity of bee communities. Locally, flower resources promote the abundance of all functional groups, and natural vegetation can maintain diverse pollinator com- munities throughout the year, especially during the noncropping season. However, exotic plants decrease functional diversity and bee specialization. To safeguard bees and their pollination services in urban farms, we recommend (1) preserving seminatural vegetation (hedges) around cropping fields to pro- vide nesting opportunities for aboveground nesters, (2) promoting farm-level crop diversification of beneficial crops (e.g., pulses, vegetables, and spices), Received: 15 November 2021 Revised: 18 April 2022 Accepted: 13 May 2022 DOI: 10.1002/eap.2699 This is an open access article under the terms of the Creative Commons Attribution-NonCommercial-NoDerivs License, which permits use and distribution in any medium, provided the original work is properly cited, the use is non-commercial and no modifications or adaptations are made. © 2022 The Authors. Ecological Applications published by Wiley Periodicals LLC on behalf of The Ecological Society of America. Ecological Applications. 2022;e2699. https://onlinelibrary.wiley.com/r/eap 1 of 18 https://doi.org/10.1002/eap.2699