Heterogeneous chemical reactions at vapor/solid interfaces play an important role in many processes in the environment and technology. Ambient pressure X-ray photoelectron spectroscopy (APXPS) is a valuable tool to investigate the elemental composition and chemical specificity of surfaces and adsorbates on the molecular scale at pressures of up to 130 mbar. In this review we summarize the historical development of APXPS since its introduction over forty years ago, discuss different approaches to minimize scattering of electrons by gas molecules, and give a comprehensive overview about the experimental systems (vapor/solid interfaces) that have been studied so far. We also present several examples for the application of APXPS to environmental science, heterogeneous catalysis, and electrochemistry.