We review spherical and inhomogeneous analytic solutions of the field equations of Einstein and of scalar-tensor gravity, including Brans-Dicke theory, non-minimally (possibly conformally) coupled scalar fields, Horndeski, and beyond Horndeski/DHOST gravity. The zoo includes both static and dynamic solutions, asymptotically flat, and asymptotically Friedmann-Lema^itre-Robertson-Walker ones. We minimize overlap with existing books and reviews and we place emphasis on scalar field spacetimes and on geometries that are general within certain classes. Relations between various solutions, which have largely emerged during the last decade, are pointed out.