INTRODUCTION: This study investigated temporal changes in rotavirus group A (RVA) prevalence, epidemiological characteristics, and genotype distribution patterns among diarrhea outpatients in Shanghai Municipality, China. METHODS: We conducted prospective active surveillance of diarrheal disease in pediatric and adult outpatients in Shanghai. Stool specimens were analyzed for five viral and twelve bacterial pathogens. Real-time reverse transcription polymerase chain reaction (rRT-PCR) was employed for RVA detection, followed by genotyping of RVA-positive specimens through partial amplification of VP7 and VP4 genes. RESULTS: The study analyzed 2,331 diarrhea cases in children aged 0-14 years and 8,418 cases in individuals aged ≥15 years between January 2017 and December 2023. Overall RVA positivity rates decreased significantly from 7.43% in 2017 to 1.19% in 2023 ( CONCLUSIONS: RVA prevalence has shown a marked decline since 2018-2019, accompanied by a shift in age distribution toward older children. The diminishing dominance of G9P[8] strains coincided with the emergence of G8P[8] strains. Continued epidemiological and genetic surveillance of rotavirus diarrhea, coupled with real-world effectiveness evaluations of domestic vaccines, remains crucial for optimizing rotavirus immunization strategies.