The microbial cause of community-acquired pneumonia can be identified by noninvasive means in the majority of cases, usually within a few days of presentation. The Gram stain and culture of a pretreatment sputum sample are the most useful tests, but have significant limitations. Methods for detecting pneumococcal antigen in respiratory secretions are particularly helpful in patients who have received antibiotics before evaluation. Testing for specific pathogens such as L. pneumophila, M. pneumoniae, or C. pneumoniae should be guided by clinical suspicion in individual circumstances. Invasive procedures are most helpful in patients suspected of having infection with opportunistic or resistant pathogens, and in those whose initial management has been unsuccessful.