Background Community-acquired pneumonia (CAP) is one of the leading causes of morbidity and mortality in the children worldwide. In this study, we aim to describe the aetiology of viral infection of pediatric community-acquired pneumonia in mainland China. Methods During Nov. 2014 and Jun. 2016, the prospective study was conducted at thirteen hospitals. The hospitalized children under 18 years old who met the criteria for CAP were enrolled. The throat swabs or nasopharyngeal aspirates were collected from cases and screened the eighteen respiratory viruses using multiplex PCR assay. Results Viral pathogens were present in 56.6% (1539/2721) of enrolled cases, with the detection rate of single virus in 39.8% cases and multiple viruses in 16.8% cases. The most frequently detected virus was RSV (15.2%, 413/2721). The highest detection rate of virus was in < 6 m age group (70.7%). RSV, HMPV, HPIVs and Flu B showed the similar prevalence pattern both in northern and south China, but HPIVs, Flu A, HBoV, HAdV and HCoVs showed the distinct circulating patterns in northern and south China. HEV/HRV (27.6%, 27/98), HBoV (18.4%, 18/98), RSV (16.3%, 16/98) and HMPV (14.3%, 14/98) were the most commonly detected virus in severe pneumonia children with signal virus infection. Conclusions In conclusion, viral pathogens are frequently detected in pediatric CAP cases and may therefore play a vital role in the aetiology of CAP. RSV was the most important virus in hospitalized children with CAP in mainland China.