Many ab initio calculations, in particular in solid state physics, rely on the antiresonant approximation. In this paper we discuss the derivation, the validity, and the accuracy of this approximation, analyzing how the optical properties of several bulk semiconducting materials and surfaces can be affected. We present accurate results for different spectroscopic quantities in the linear and nonlinear responses and we analyze the discrepancies between approximated and exact formulas. An investigation is made of the effect of the approximation on absorption spectra for different materials, showing the reliability of the approximation even in the presence of local field and excitonic effects. The energy loss is shown to be drastically affected. The effect of the band gap of materials on the quality of the approximation is also discussed. Finally, we report on the influence of the antiresonant approximation on second harmonic generation spectra.