The adsorption of CO 2 and H 2 O by ZIF-8 thin films was investigated using X-ray photoelectron spectroscopy (XPS) and temperature-programmed desorption (TPD) in situ under low-temperature, low-pressure conditions. Using these two techniques, we demonstrate the ability to clearly distinguish molecules that exhibit significant adsorption in the pore structure of ZIF-8, from molecules that adsorb predominantly at outer surface sites. In particular, CO 2 was found to penetrate into the pore structure, while H 2 O resided predominantly at the surface. CO 2 uptake was quantified, and mobility within the films was investigated. The ability to distinguish surface processes from those that primarily occur in the bulk is key to understanding the properties of nanoporous materials.