Novel compact x-ray sources based on inverse Compton scattering can generate brilliant hard x-rays in a laboratory setting. Their collimated intense beams with tunable well-defined x-ray energies make them well suited for x-ray spectroscopy techniques, which are typically carried out at large facilities. Here, we demonstrate a first x-ray absorption spectroscopy proof-of-principle experiment using an inverse Compton x-ray source with a flux of >1010 photons/s in <5% bandwidth. We measured x-ray absorption near edge structure and extended x-ray absorption fine structure at the silver K-edge (~25.5 keV) for a series of silver samples. We propose an energy-dispersive geometry specifically adapted to the x-ray beam properties of inverse Compton x-ray sources together with a fast concentration correction method that corrects sample inhomogeneities very effectively. The combination of our setup with the inverse Compton source generates x-ray absorption spectra with high energy resolution in exposure times down to one minute. Our results unravel the great benefit of inverse Compton scattering sources for x-ray absorption techniques in a laboratory environment, especially in the hard x-ray regime, which allows to probe absorption edges of high Z materials.