A novel cavity ringdown spectrometer, incorporating a miniature continuous-wave swept-frequency laser that is widely tunable, requires less than 1 s to record wide-ranging absorption spectra with high sensitivity in a single rapid sweep of the laser frequency. The free spectral range of the ringdown cavity defines a sampling grid to measure absorbance-dependent ringdown times at successive cavity-resonance frequencies. The spectrometer has a single-ended transmitter-receiver configuration based on retro-reflected optical-heterodyne detection and exploiting fibre-optical telecommunications components. This swept-frequency approach to cavity ringdown spectroscopy yields a simple, low-cost, compact, rugged, versatile instrument for efficient sensing of gases. The performance of the spectrometer is demonstrated by measuring weak near-infrared rovibrational spectra of carbon dioxide gas within the 1.5-1.6 μm wavelength range.