An apparatus and method for rapidly and accurately identifying and quantifying analytes in a complex mixture is disclosed. The apparatus comprises an ultra-sensitive cavity-enhanced spectrometer coupled to data-collection and analysis devices. The method comprises the use of a database containing the absorption cross-sections of various analytes to numerically determine the composition of the sample.