A magnetic bottle time-of-flight spectrometer has been used to perform spectroscopy of Kn+ and Rbn+ states with ionization degrees n of 2, 3 and 4. Energy levels are directly measured by detecting in coincidence the n electrons that are emitted as a result of single photon absorption. Experimental results are compared with the energies from the NIST atomic database and ab initio multiconfiguration Dirac–Fock calculations. Previously unidentified 3p4(3P)3d1 4D energy levels of K2+ are assigned.