Lameness in dairy cows poses a significant challenge to improving animal well-being and optimizing economic efficiency in the dairy industry. To address this, employing automated animal surveillance for early lameness detection and prevention through activity sensors proves to be a promising strategy. In this study, we analyzed activity (accelerometer) data and additional cow-individual and farm-related data from a longitudinal study involving 4860 Holstein dairy cows on six farms in Germany during 2015–2016. We designed and investigated various statistical models and chose a logistic regression model with mixed effects capable of detecting lameness with a sensitivity of 77%. Our results demonstrate the potential of automated animal surveillance and hold the promise of significantly improving lameness detection approaches in dairy livestock