Streptococcus pneumoniae strains comprise >90 serotypes. Here we describe establishment of a MassTag PCR assay designed to serotype S. pneumoniae and demonstrate its utility in tests using 31 paired lung aspirate and nasopharyngeal aspirate samples from children with pneumonia in the Gambia. Serotypes 1, 5, and 14 in were implicated in 90% of lung infections. With 5 exceptions, serotypes found in lung aspirates were also found in nasopharyngeal aspirates.