In this talk, I will propose the use of the Earth as a transducer for ultralight dark-matter detection. In particular I will point out a novel signal of both kinetically mixed dark-photon dark matter and axionlike dark matter: a monochromatic oscillating magnetic field generated at the surface of the Earth. Similar to the signal in a laboratory experiment in a shielded box (or cavity), this signal arises because the lower atmosphere is a low-conductivity air gap sandwiched between the highly conductive interior of the Earth below and ionosphere or interplanetary medium above. For dark-photon dark matter, the kinetic mixing with the Standard Model photon allows dark matter to convert into an observable magnetic field inside this cavity, while for axion dark matter, the background geomagnetic field of the Earth allows the axion to convert through its coupling to photons. The magnetic field signal of ultralight dark matter in a laboratory detector is usually suppressed by the size of the detector. Crucially, in our case the suppression is by the radius of the Earth, and not by the (much smaller) height of the atmosphere. The magnetic field signal exhibits a global vectorial pattern that is spatially coherent across the Earth, which enables sensitive searches for this signal using unshielded magnetometers dispersed over the surface of the Earth. I will summarize the results of such a search using a publicly available dataset from the SuperMAG collaboration. The dark-photon dark matter constraints from this search are complementary to existing astrophysical bounds, and the axion dark matter constraints are comparable to the bounds obtained by the CAST helioscope. Future searches for this signal may improve the sensitivity over a wide range of masses for both ultralight dark-matter candidates.