Two kinds of aptasensors for ampicillin (AMP) are described. The assay strategies include the use of gold nanoparticles (AuNPs) that were modified with (a) a thiolated aptamer (T-Apt), and (b) a non-thiolated polyadenine aptamer (polyA Apt). The AuNPs and the aptamers were brought to interaction prior to addition of AMP. T-Apt and polyA Apt are adsorbed on the AuNPs by different mechanisms. The adsorbed aptamer was able to bind the target while preventing non-specific interactions. Remarkably different optical absorbances (measured at 520 and 680 nm) are produced the absence and presence of AMP. The assay can selectively recognize AMP even in the presence of species of similar chemical structure. The T-Apt based assay has a linear response in the 1–600 nMAMP concentration range and a 0.1 nM limit of detection. The respective data for the polyA Apt assay are 1–400 nM and 0.49 nM.