The identification of species is a fundamental problem in analytical chemistry and biology. Mass spectrometers identify species by their molecular mass with extremely high sensitivity (<10−24 g). However, its application is usually limited to light analytes (<10−19 g). Here we demonstrate that by using nanomechanical resonators, heavier analytes can be identified by their mass and stiffness. The method is demonstrated with spherical gold nanoparticles and whole intact E. coli bacteria delivered by electrospray ionization to microcantilever resonators placed in low vacuum at 0.1 torr. We develop a theoretical procedure for obtaining the mass, position and stiffness of the analytes arriving the resonator from the adsorption-induced eigenfrequency jumps. These results demonstrate the enormous potential of this technology for identification of large biological complexes near their native conformation, a goal that is beyond the capabilities of conventional mass spectrometers.