We consider the following X‐ray free electron lasers Schrödinger equation where denotes the magnetic potential such that the magnetic field is ‐periodic, is periodic and non‐negative, . Using the variational method, based on a profile decomposition of the Cerami sequence in , we obtain the existence of the ground state solution for suitable . When is small, we also obtain the non‐existence. Furthermore, we give a description of the asymptotic behavior of the ground states as .