The near-edge fine structure of K-absorption spectra of nitrogen and oxygen atoms and L2, 3 absorption spectrum of potassium atoms in KNO3 ion-molecular crystals containing planar molecular anions NO3- as structural units is studied by the method of measurement of the quantum yield of the extrinsic X-ray photoeffect with the use of a RSM-500 X-ray spectrometer-monochromator and bremsstrahlung emission of an X-ray tube with a tungsten anode. Resonant features in the structure of nitrogen and oxygen spectra are identified within the framework of the quasi-molecular approach on the basis of the comparative analysis of K-absorption spectra of molecular anion NO3- in NaNO3 and KNO3 crystals, K-absorption spectrum of B, and electron-molecule scattering spectrum of BF3 molecule-isoelectronic and isostructural analog of the anion. As a result, the main absorption bands in the initial regions of the spectra were related to transitions of inner electrons to free molecular states of π- and σ-symmetries of the anion. The appearance of an internal structure of the σ-resonance in the N K-absorption spectrum of a NO3- quasi-molecule, which is absent in the B K-spectrum of a free BF3 molecule, is associated with a pyramidal deformation of planar anions in crystals and the appearance of free 3d-states of a potassium atom. Consideration is presented in favor of the fact that an inner vacancy in X-ray absorption probing of the conduction band of NaNO3 and KNO3 crystals does not result in radical changes of its structure. On the basis of the combined analysis of the spectra of KNO3 crystal obtained, characteristic features of its conduction band and the role of cation and anion states in the formation of its individual subbands are analyzed.