A combined X-ray and scanning tunneling microscopy (STM) instrument is presented that enables the local detection of X-ray absorption on surfaces in a gas environment. To suppress the collection of ion currents generated in the gas phase, coaxially shielded STM tips were used. The conductive outer shield of the coaxial tips can be biased to deflect ions away from the tip core. When tunneling, the X-ray-induced current is separated from the regular, ‘topographic’ tunneling current using a novel high-speed separation scheme. We demonstrate the capabilities of the instrument by measuring the local X-ray-induced current on Au(1 1 1) in 800 mbar Ar.