We consider the nonstationary circuit QED architecture in which a single-mode cavity interacts with N>1 identical qubits, and some system parameters undergo a weak external perturbation. It is shown that in the dispersive regime one can engineer the two-photon exchange interaction by adjusting the frequency of harmonic modulation to (approximately) $2|Delta _{-}|$, where $Delta _{-}$ is the average atom--field detuning. Closed analytic description is derived for the weak atom-field coupling regime, and numeric simulations indicate that the phenomenon can be observed in the present setups.