This work proposes the use of the refractive index sensitivity of non-radiating anapole modes of high-refractive-index nanoparticles arranged in planar metasurfaces as a novel sensing principle. The spectral position of anapole modes excited in hollow silicon nanocuboids is first investigated as a function of the nanocuboid geometry. Then, nanostructured metasurfaces of periodic arrays of nanocuboids on a glass substrate are designed. The metasurface parameters are properly selected such that a resonance with ultrahigh Q-factor, above one million, is excited at the target infrared wavelength of 1.55 µm. The anapole-induced resonant wavelength depends on the refractive index of the analyte superstratum, exhibiting a sensitivity of up to 180 nm/RIU. Such values, combined with the ultrahigh Q-factor, allow for refractometric sensing with very low detection limits in a broad range of refractive indices. Besides the sensing applications, the proposed device can also open new venues in other research fields, such as non-linear optics, optical switches, and optical communications.