We report quasi-particle energy calculations of the electronic bandstructure as measured by valence-band photoemission for selected II–VI compounds and group III nitrides. By applying GW as perturbation to the ground state of the fictitious, non-interacting Kohn–Sham electrons of density-functional theory (DFT), we systematically study the electronic structure of zinc-blende GaN, ZnO, ZnS and CdS. Special emphasis is put on analysing the role played by the cation semicore d-electrons that are explicitly included as valence electrons in our pseudo-potential approach. Unlike in the majority of previous GW studies, which are almost exclusively based on ground state calculations in the local-density approximation (LDA), we combine GW with exact-exchange DFT calculations in the optimized-effective potential approach (OEPx). This is a much more elaborate and computationally expensive approach. However, we show that applying the OEPx approach leads to an improved description of the d-electron hybridization compared to the LDA. Moreover, we find that it is essential to use OEPx pseudo-potentials in order to treat core–valence exchange consistently. Our OEPx-based quasi-particle valence bandstructures are in good agreement with available photoemission data in contrast to the ones based on the LDA. We therefore conclude that for these materials, OEPx constitutes the better starting point for subsequent GW calculations.