Abstract Expansion of instrumental and analytical methods for identifying harmful atmospheric impurities is an important environmental task. The work focuses on developing a comprehensive approach to detection of harmful impurities in atmospheric air based on absorption spectra of air containing harmful impurities measured along a path by pulsed terahertz spectroscopy methods. A neural network is developed for spectral data analysis; it is trained with specially generated arrays of model absorption spectra of gas mixtures of different qualitative and quantitative compositions. It is shown that the neural network is capable of identifying six gas components in concentrations of down to 0.01 ppm with accuracy of 90–95%. A series of experiments with real gases confirms the sensitivity of the THz spectroscopy method to low gas concentrations in the mixture. The results show the sufficiently high sensitivity of the combined method to both single gases and gas mixtures and, hence, its applicability to environmental monitoring.