Experimental oxygen K-edge spectra of ThO2 and CeO2 are presented and interpreted based on density functional theory (DFT). The contribution of d and f orbitals to the O K-edge spectrum is identified as well-distinguished peaks, the presence of which evidences the strong hybridization of Th and Ce metal centers with O orbitals. The sensitivity of the O K-edge to both f- and d-states in the absence of a core-hole on the metal ion results in an insightful overview of the electronic structure involved in the chemical bond. In particular, the large bandwidth of the Th 5f band as compared to the Ce 4f band is observed as a set of wider and more substantial set of peaks in the O K-edge, confirming the stronger hybridization of the former with O orbitals. The peak ascribed to the 5f band of ThO2 is found at higher energy than the 6d band, as predicted from DFT calculations on actinide dioxides. To highlight the sensitivity and the potential use of the O K-edge for the characterization of ThO2-based systems, the sensitivity of the spectrum to structural changes such as lattice expansion and size reduction are calculated and discussed.