The invention relates to an aptamer that binds to protein A, G or L, protein A-, G- or L-containing substances, and also to protein A-, G- or L-containing microorganisms, in particular Staphylococcus aureus, Streptococcus or Peptostreptococcus, methods for detection and enrichment of protein A, G or L, protein A-, G- or L-containing substances or protein A-, G- or L-containing microorganisms in which the aptamer is used, and also a kit, a biosensor, a lateral flow assay device and a measuring instrument which contain such an aptamer and can be used in said methods.