Fasciola hepatica is an internal parasite of both human and veterinary relevance. In order to control fasciolosis, a multitude of attempts to predict the risk of infection such as risk maps or forecasting models have been developed. These attempts mainly focused on the influence of geo-climatic and meteorological features. Predicting bovine fasciolosis on farm level taking into account farm-specific settings yet remains challenging. In the present study, a new methodology for this purpose, a data-driven machine learning approach using a random forest classification algorithm was applied to a cross-sectional data set of farm characteristics, management regimes, and farmer aspects within two structurally different dairying regions in Germany in order to identify factors relevant for the occurrence of F. hepatica that could predict farm-level bulk tank milk positivity. The resulting models identified farm-specific key aspects in regard to the presence of F. hepatica. In study region North, farm-level production parameters (farm-level milk yield, farm-level milk fat, farm-level milk protein), leg hygiene, body condition (prevalence of overconditioned and underconditioned cows, respectively) and pasture access were identified as features relevant in regard to farm-level F. hepatica positivity. In study region South, pasture access together with farm-level lameness prevalence, farm-level prevalence of hock lesions, herd size, parity, and farm-level milk fat appeared to be important covariates. The stratification of the analysis by study region allows for the extrapolation of the results to similar settings of dairy husbandry. The local, region-specific modelling of F. hepatica presence in this work contributes to the understanding of on-farm aspects of F. hepatica appearance. The applied technique represents a novel approach in this context to model epidemiological data on fasciolosis which allows for the identification of farms at risk and together with additional findings in regard to the epidemiology of fasciolosis, can facilitate risk assessment and deepen our understanding of on-farm drivers of the occurrence of F. hepatica.