Abstract
INTRODUCTION: Headache conditions impose a significant global socioeconomic burden; however, long-term trends in their prevalence remain underexplored. This study aimed to analyze the evolution in self-reported headache disorder (SRHD) in Spain from 2006 to 2023, focusing on its relationship with demographic factors (sex, age, and social class) and the potential impact of the COVID-19 pandemic. METHODS: A repeated cross-sectional study using seven national health surveys in Spain (2006–2023; 37,429 − 41,929 participants) analyzed SRHD adjusted by sex, age, social class, and education. Trends were tested with the Mann–Kendall method. RESULTS: SRHD prevalence declined from 14.5% in 2006 to 10.8% in 2023, showing a negative, non-significant trend (total τ = − 0.62, p = 0.07; physician-diagnosed τ = − 0.33, p = 0.38). The reduction was more evident among women, older adults, and individuals from lower socioeconomic groups. Prevalence was approximately 2.5-fold higher in women, peaked between 25 and 54 years, was lowest in the youngest (15–24) and oldest (> 75) groups, and decreased with higher social class and education. The 2020 data point, collected during the COVID-19 pandemic, deviated from the trend but was not a statistical outlier, and its exclusion reduced the magnitude of the downward slope without altering its non-significant nature. CONCLUSION: SRHD prevalence showed a non-significant decline over the past 17 years in Spain. The reduction was more evident among women, older adults, and lower socioeconomic groups, indicating that demographic and social determinants may shape these temporal dynamics. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1186/s12889-026-26744-3.