A detector device includes a cooling air pathway for cooling an X-ray detector. The detector device furthermore includes a detector interior space surrounding the X-ray detector. The cooling air pathway runs through at least one subregion of the detector interior space. The detector device includes a pressure limitation unit with a limitation device arranged along the cooling air pathway. The limitation device is designed, based on an incoming cooling air flow, to route a limited volume flow along the cooling air pathway at the X-ray detector.