Species in the bacterial genus, Bartonella, can cause disease in both humans and animals. Previous reports of Bartonella in bats and ectoparasitic bat flies suggest that bats could serve as mammalian hosts and bat flies as arthropod vectors. We compared the prevalence and genetic similarity of bartonellae in individual Costa Rican bats and their bat flies using molecular and sequencing methods targeting the citrate synthase gene (gltA). Bartonellae were more prevalent in bat flies than in bats, and genetic variants were sometimes, but not always, shared between bats and their bat flies. The detected bartonellae genetic variants were diverse, and some were similar to species known to cause disease in humans and other mammals. The high prevalence and sharing of bartonellae in bat flies and bats support a role for bat flies as a potential vector for Bartonella, while the genetic diversity and similarity to known species suggest that bartonellae could spill over into humans and animals sharing the landscape.