IntroductionUnderstanding the birds’ breeding strategies in urban habitats is vital for ensuring their continued existence. Therefore, more research must be conducted on bird breeding and urban adaptation strategies in urban green spaces. This study aimed to address this gap by investigating the influence of landscape factors on the selection of bird nest sites. MethodsData on the presence and absence of magpie (Pica pica) and gray magpie (Cyanopica cyana) nests were collected through field surveys conducted in the campus of Nanjing Forestry University during the 2023 breeding season. Generalized additive models (GAMs) incorporating landscape variables were employed to assess the effects of these predictors on nest occurrence. The model with the lowest Akaike’s information criterion value was selected among the candidate GAMs.ResultsBelow is a summary of the main results. Nest tree height (TH), distance from the central lawn (D), and tree coverage (TC) within the sampled area were identified as the primary landscape factors influencing nest site choice. Conversely, factors such as the shortest distance to the water source, herb coverage, shrub coverage, percentage of buildings, and percentage of hard pavement did not significantly impact on nest site selection. Furthermore, the nesting potential of magpies and grey magpies initially increased with tree height, reaching a maximum at ca. TH=25 meters after which it began to decline. The nesting occurrence rate showed an initial decrease tendency with increasing distance from the central lawn, reaching a minimum at D=400 meters, and then increased with further distance. Additionally, nesting potential decreased initially with increasing of TC in the range of 0–20%, fluctuated evenly between 20–60% TC, and decreased rapidly when TC exceeded 60%.DiscussionThis study provides valuable insights into the selection of nest sites by birds in urban habitats, specifically with respect to landscape factors. The understanding of the impact of urban green spaces on urban birds and the underlying mechanisms of their behavior contributes to the conservation of wild birds and promotes the harmonious development of urban areas.