X-ray photoelectron spectra of core levels are reported for InP:Yb. Crystalline InP, doped with Yb to a level of 0.5 at.%, was grown by the synthesized solute diffusion method. An analysis of the core-level spectra of the constituent components, i.e. In 3d512 and P 2p, revealed a minor influence of the surface oxide species, mainly in the phosphate-like form. The spectrum of the Yb 4d core level was also recorded. The energy of the Yb 4d312 peak was found identical to that in Yb metal, whereas the 4d512 peak was found to be shifted to higher binding energies. This effect was found comparable to the case of advanced oxidation of Yb thus confirming its high reactivity, even as a bulk dopant. The data give also a rare experimental example of detection of bulk dopant atoms in a semiconductor matrix by X-ray photoelectron spectroscopy at the limit of detectability.