The World Organisation for Animal Health continues to be concerned about the spread of atypical human-animal trypanosomiasis. Trypanosoma lewisi is one of the rodent-origin zoonotic trypanosomiasis. Despite the fact that many cases of T. lewisi in humans have been documented in several nations, the study of this pathogenic parasite in Indonesia remains limited. The objective of this investigation was to use a molecular approach to detect T. lewisi in rats captured in livestock pens and residential areas. In Pondok Ranggon Village, Cipayung District, East Jakarta, 14 traps were placed in dairy cattle pens and a total of 50 traps were installed outside and inside houses in Lhoksukon and Ceubrek Villages, Lhoksukon District, North Aceh. The captured rats were identified, sedated, and examined for ectoparasites. The blood of rats was then analysed using Giemsa-stained thin blood films and PCR with TRYP1R and TRYP1S primers. The majority of the Rattus species captured in three locations were R. tanezumi (62.07%), followed by R. norvegicus (6.90%) and R. exulans (3.4%). Xenopsylla cheopis were predominant insect found in the present study (60%), followed by Laelaps echidninus (20%), Laelaps nutalli (12%), and Ornithonyssus bacoti (8%). According to the total flea index, rats captured from cattle pens had fewer fleas than rats from other locations. The molecular analysis revealed that T. lewisi was present in 46.15% of rats captured in human settlements and 66.67% of rats captured in the dairy cattle pens. PCR result also demonstrated that positive T. lewisi found higher in inside house (66.67%) compared to outside house (28.57%). It indicates that trypanosome infections are prevalent in rats from domestic environments and cattle pens, and that R. tanezumi can potentially serve as a source of parasites for both animals and humans through fleas acting as vectors.