Wavelike, bosonic dark matter candidates like axions and dark photons can be detected using microwave cavities known as haloscopes. Traditionally, haloscopes consist of tunable copper cavities operating in the TM010 mode, but ohmic losses have limited their performance. In contrast, superconducting radio frequency (SRF) cavities can achieve quality factors of ∼1010, perhaps 5 orders of magnitude better than copper cavities, leading to more sensitive dark matter detectors. In this paper, we first derive that the scan rate of a haloscope experiment is proportional to the loaded quality factor QL, even if the cavity bandwidth is much narrower than the dark matter halo line shape. We then present a proof-of-concept search for dark photon dark matter using a nontunable ultrahigh-quality SRF cavity. We exclude dark photon dark matter with kinetic mixing strengths of χ>1.5×10−16 for a dark photon mass of mA′=5.35 μeV, achieving the deepest exclusion to wavelike dark photons by almost an order of magnitude. Published by the American Physical Society 2024