Magnetic impurities affect the spectrum of excitations of a superconductor and thus influence its impedance. We concentrate on the dissipative part of the surface impedance. We investigate its dependence on frequency, the density and strength of magnetic impurities, and the density and temperature of quasiparticles. Even a small concentration of weak magnetic impurities significantly modifies the excitation spectrum in the vicinity of the BCS gap. Therefore, we give special attention to the absorption threshold behavior at zero temperature and to the low-frequency absorption by quasiparticles. The discrete energy states introduced at low density of magnetic impurities may serve as traps for nonequilibrium quasiparticles, reducing the absorption in some range of low radiation frequencies.