Community‐acquired pneumonia (CAP) is the leading cause of child death worldwide. Viruses are the most common pathogens associated with CAP in children, but their incidence varies greatly. This study investigated the presence of respiratory syncytial virus (RSV), adenovirus, human rhinovirus (HRV), human metapneumovirus (HMPV), human coronavirus (HCoV‐OC43 and HCoV‐NL63), and influenza A virus (FluA) in children with CAP and the contributing risk factors. Here, children with acute respiratory infections were screened by pediatrics; and a total of 150 radiographically‐confirmed CAP patients (aged 3 months to 10 years) from two clinical centers in Sao Luis, Brazil were recruited. Patient's clinical and epidemiological data were recorded. Nasopharyngeal swab and tracheal aspirate samples were collected to extract viral nucleic acid. RSV, adenovirus, rhinovirus, FluA, HMPV, HCoV‐OC43, and HCoV‐NL63 were detected by real‐time polymerase chain reaction. The severe CAP was associated with ages between 3 and 12 months. Viruses were detected in 43% of CAP patients. Rhinovirus infections were the most frequently identified (68%). RSV, adenovirus, FluA, and coinfections were identified in 14%, 14%, 5%, and 15% of children with viral infection, respectively. Rhinovirus was associated with nonsevere CAP (P = .014); RSV, FluA, and coinfections were associated with severe CAP (P < .05). New strategies for prevention and treatment of viral respiratory infections, mainly rhinovirus and RSV infections, are necessary.