Predicting the incidence of syphilis in China using Baidu search index and an ARIMAX model Authors: Jianbo Yuan, Zuyi Chen, Yanqiong Yuan, ShiXu Li, Jinlie Long, Renqing Yan, Xinpeng Zhang, Lian Huang, Jian Huang, Jida Li, Junqiong Huang Published: 2026 ABSTRACT BackgroundExisting studies have confirmed the value of Internet search data in predicting infectious disease trends. This study aims to develop a predictive model using the Baidu Index to examine the relationship between the search volume of syphilis-related keywords and the prevalence of syphilis in China.MethodsWe collected daily reported syphilis case counts and Baidu search volumes for syphilis-related keywords from January 2011 to March 2025. Keywords highly correlated with syphilis incidence were identified using Spearman rank correlation and time series cross-correlation analysis, and were incorporated into a composite search index (CSI). Based on monthly case numbers and the CSI, we developed an autoregressive integrated moving average (ARIMA) model and an ARIMAX model with the CSI as an external regressor. Model performance was evaluated using mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE).ResultsFrom January 2011 to March 2025, a total of 7,289,225 syphilis cases were reported in China, with a monthly average of 42,627 cases. Six keywords with a time lag of 0 months were included in the CSI. The ARIMAX (2,0,0)(2,1,0)₁₂ + CSI (Lag = 0) model outperformed the seasonal ARIMA (2,0,0)(2,1,0)₁₂ model, with lower MAE (5184.36 vs. 9007.81), RMSE (6010.31 vs. 10,328.01), and MAPE (10.0% vs. 16.0%).ConclusionThe ARIMAX model incorporating Baidu search data demonstrates superior predictive accuracy for syphilis incidence. It can serve as an effective tool for early warning and prediction, providing a valuable supplement to conventional surveillance systems.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12879-026-13325-3. Introduction Syphilis is a chronic infectious disease caused by Treponema pallidum, primarily transmitted through sexual contact [1]. Additionally, congenital syphilis can be passed from mother to fetus during pregnancy or childbirth [2]. As of 2019, the number of syphilis cases worldwide had reached 49.71 million, reflecting a 60.83% increase since 1990 and imposing a substantial global health burden [3]. In China, the incidence of syphilis has continued to rise over the past few decades, with an average annual growth rate of 11.88% between 2004 and 2019 [4]. In response to this growing challenge, the Chinese Ministry of Health launched the National Syphilis Prevention and Control Plan (2010–2020) in June 2010, aiming to strengthen syphilis control efforts and curb its transmission [5]. This was followed in 2011 by another national initiative focused on preventing mother-to-child transmission of HIV, syphilis, and hepatitis B [6]. Although these programs yielded positive outcomes, the incidence of syphilis has rebounded in recent years, indicating that significant challenges remain in syphilis prevention and control. Given China’s large population and high number of infections, reducing the spread of syphilis should be a public health priority. This will require enhancing case detection, diagnosis, and treatment, optimizing the current control system, and increasing financial investment. Conventional disease surveillance systems currently in place lack the capacity to accurately predict or promptly identify new syphilis cases. As a consequence, there is a need to develop novel surveillance models that can improve early warning and monitoring. The ARIMA model, a classical time series analysis method, is widely used in infectious disease surveillance due to its intuitiveness, flexibility, and reliability [7]. Numerous studies have confirmed its applicability and effectiveness in predicting notifiable infectious diseases [8–10]. However, disease occurrence is often influenced by multiple factors. By incorporating exogenous variables, the ARIMAX model—an extension of ARIMA—can improve the accuracy of incidence predictions and provide a more comprehensive depiction of disease trends [11]. With advances in technology, an increasing number of individuals search for health-related information online before seeking medical care. This behavior offers new opportunities for early disease monitoring by tracking the frequency of specific search keywords. In China, Baidu dominates the search engine market. By the end of 2020, the number of internet users in China had reached 904 million [12]. The Baidu Search Index (BSI) provides insights into public search behaviors and reflects real-world demand for information related to specific queries [13, 14]. Previous studies have demonstrated the value of BSI in early warning models for infectious diseases such as hepatitis C, scarlet fever, COVID-19, and pulmonary tuberculosis. Incorporating BSI has been shown to significantly enhance the predictive performance of time series models [7, 14–16]. It remains unclear whether the ARIMAX model can be effectively applied to predict syphilis incidence in China, or whether BSI can improve syphilis forecasting. Consequently, this study aims to develop a time series prediction model based on monthly reported syphilis cases and BSI data, tailored to China’s context. Such a model could help overcome the limitations of conventional surveillance systems, enable timely responses to public health emergencies, and offer government and medical institutions a new tool for monitoring syphilis incidence. Methods Data source The epidemiological surveillance data in this study were obtained from the National Health Commission of the People’s Republic of China [17]. The dataset includes monthly records of new syphilis cases from January 2011 to March 2025, comprising a total of 171 months. It contains only aggregate case statistics with no access to patients’ personal or private information. Furthermore, no missing values were present in the data. Our data come from internet search logs; consequently, there is unavoidable selection bias caused by the ‘digital divide.’ Young people may rely more on social media than conventional search engines, resulting in incomplete data capture. Older people may use devices less frequently or have different search habits. Due to the technical anonymity of the data source, we cannot adjust for device type or user age. The Baidu Search Index (BSI) data were derived from the daily search query volume of registered users on the Baidu Index official website [18]. Daily search volumes for syphilis-related keywords from January 2011 to March 2025 were collected and aggregated into monthly counts. To ensure validity of time-series analysis, Baidu search index data and Chinese CDC syphilis incidence data were strictly aligned by month from January 2011 to March 2025, avoiding time bias due to mismatched observation periods. Establish a keyword database To ensure the completeness and accuracy of the keyword database, we employed a three-step approach to identify and filter syphilis-related keywords: Keyword Collection: Keyword Collection: Keyword Collection: An initial keyword library was built through multi-source data aggregation: ① Syphilis-related syndrome phrases were crawled from mainstream search engines using the ChinaZ website [19]; ② High-frequency user query terms were extracted from the Baidu Index Demand Graph [18]; ③ Professional terminology was supplemented by referencing the Syphilis Prevention and Control Guidelines (2024 Edition); ④ Additional related terms were expanded using Baidu Baike [20] and the Baidu Health Medical Dictionary [21].(2)Keyword Screening: (2)Keyword Screening: Keyword Screening: Using the Baidu Index platform [18], we quantitatively analyzed the average daily search volume of each candidate keyword between January 1, 2011, and March 31, 2025. Keywords were excluded if they met either of the following criteria: ① Historical search volume was approaching zero; ② The term showed low relevance to syphilis.(3)Keyword Classification: (3)Keyword Classification: Keyword Classification: Based on previous studies [22, 23], the keywords were categorized into five groups: comprehensive, etiology, examination, symptoms, and prevention/treatment. It should be noted that this classification was used only for structured data presentation and does not affect the statistical validity of subsequent analyses. Keyword screening Statistical analyses were performed using SPSS 23.0 (IBM) and R 4.3.0. p-value of less than 0.05 was considered statistically significant. Keywords were screened according to the following two criteria: Spearman rank correlation analysis was conducted between the monthly mean search volume sequence of each keyword and the monthly incidence sequence of syphilis. Keywords were retained only if the absolute value of the rank correlation coefficient (rₛ) exceeded 0.6 with a p-value < 0.05. Cross-correlation analysis was performed on the time series, requiring the maximum cross-correlation coefficient (CCF) to be greater than 0.5 with a p-value < 0.05. The lag value (Lag) corresponding to the maximum CCF was also recorded. Spearman rank correlation analysis was conducted between the monthly mean search volume sequence of each keyword and the monthly incidence sequence of syphilis. Keywords were retained only if the absolute value of the rank correlation coefficient (rₛ) exceeded 0.6 with a p-value < 0.05. Spearman rank correlation analysis was conducted between the monthly mean search volume sequence of each keyword and the monthly incidence sequence of syphilis. Keywords were retained only if the absolute value of the rank correlation coefficient (rₛ) exceeded 0.6 with a p-value < 0.05. Cross-correlation analysis was performed on the time series, requiring the maximum cross-correlation coefficient (CCF) to be greater than 0.5 with a p-value < 0.05. The lag value (Lag) corresponding to the maximum CCF was also recorded. Cross-correlation analysis was performed on the time series, requiring the maximum cross-correlation coefficient (CCF) to be greater than 0.5 with a p-value < 0.05. The lag value (Lag) corresponding to the maximum CCF was also recorded. Calculation of the comprehensive search index for syphilis Finally, six keywords related to syphilis were included. Group based on Lag and calculate the weight proportion of keywords respectively in combination with the Spearman correlation coefficient. The calculation formula for the comprehensive index is as follows: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\rm{Weigh}}{{\rm{t}}_{ki}} = \rho ki/\sum\limits_{i = 1}^n {\rho ki} $$\end{document}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\eqalign{ & {\rm{TP}}\;{\rm{Comprehensive}}\,{\rm{Search}}\,{\rm{Inde}}{{\rm{x}}_k} \cr & = \sum\limits_{i = 0}^n {wedightk:keywordki} \cr}$$\end{document} Among them, “k” represents the potential time lag in months; “n” represents the number of keywords included in the same time lag; “ρki” represents the Spearman rank correlation coefficient corresponding to each keyword (i) based on a specific time lag (k). weightki and keywordki respectively represent the weight of the keyword (i) in its lag period and the Baidu search index. The best results are achieved when the Spearman rank correlation index between the comprehensive search index of syphilis and the number of epidemic cases reaches 0.8 or above. The final specifical formula is: Syphilis comprehensive search index = (The transmission routes of syphilis * 0.647 + Early symptoms of syphilis * 0.644 + Syphiloderm * 0.736 + Benzathine penicillin * 0.731 + Penicillin G * 0.623 + Penicillin sodium * 0.750)/(0.647 + 0.644 + 0.736 + 0.731 + 0.623 + 0.750) Model description As a classical time series analysis method in the field of public health, the ARIMA model is generally expressed as ARIMA(p,d,q). Considering the temporal autocorrelation of the data and the seasonal transmission characteristics of syphilis, the model can be extended to a seasonal ARIMA model, denoted as ARIMA(p,d,q)(P,D,Q)s. In this notation, p represents the order of the autoregressive (AR) component, d denotes the degree of differencing required to achieve stationarity, and q indicates the order of the moving average (MA) component. Correspondingly, P, D, and Q represent the seasonal counterparts of the AR, differencing, and MA components, respectively, while s denotes the seasonal period. The values of p and q can be determined by examining the autocorrelation function (ACF) and partial autocorrelation function (PACF) plots, while d and D can be determined based on the required level of differencing [19]. The ARIMAX model is an extension of the ARIMA model that incorporates exogenous variables. In this study, the BSI index was introduced as an exogenous variable, and combined with the time series of syphilis cases to construct a multivariate time series model. Stationarity test of time series To assess the long-term trend and seasonal fluctuations in the monthly reported cases of syphilis, we not only plotted the time series data from January 2011 to March 2025 but also conducted formal stationarity tests using the Augmented Dickey-Fuller (ADF) test and the Ljung-Box Q test. If a time series is found to be non-stationary, it can be transformed into a stationary series through techniques such as differencing or time series decomposition. Splitting of training and test sets Based on the stationary time series, the dataset was divided into a training set (90.1%, covering 154 months from January 2011 to October 2023) and a test set (9.9%, covering 17 months from November 2023 to March 2025). Additionally, to evaluate the impact of the COVID-19 pandemic on the prediction of syphilis incidence, the dataset was further partitioned into two subsets: the pre-pandemic training set (January 2011–December 2019) and the pandemic and post-pandemic validation set (January 2020–March 2025). The validation set was further divided into five sub-periods for subgroup analysis: 2020–2021, 2021–2022, 2022–2023, 2023–2024, and January 2024–March 2025. Model construction and evaluation In this study, the optimal parameter configurations for the ARIMA and ARIMAX models were determined using the Akaike Information Criterion (AIC) minimization principle. The modeling process was conducted in two stages: first, the auto.arima function was employed for automatic model fitting; second, based on the diagnostic interpretation of ACF and PACF plots, manual parameter adjustments were made using the arima function. For model diagnostics, the least squares method (LSM) was applied to test the significance of the estimated parameters. Additionally, residual diagnostics were performed using multiple approaches, including the Ljung-Box test, QQ normal probability plot, residual time plot, and residual ACF/PACF plots. Model performance was evaluated using a set of statistical indicators, including the coefficient of determination (R2), mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). The final ARIMA and ARIMAX models that passed all diagnostic checks were used to forecast the incidence of syphilis. All model construction and parameter estimation procedures were based on the training set. Model prediction performance evaluation This study employed the ARIMA and ARIMAX models to predict and analyze the incidence trends of syphilis. Specifically, the models were used to generate predictions based on the test set data, which were subsequently compared with the actual observed values. To quantitatively assess the predictive accuracy of the models, three key performance indicators were selected: mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). Lower values of these metrics indicate smaller deviations between the predicted and actual values, reflecting higher predictive accuracy. A flowchart summarizing the research methodology is presented in Fig. 1. Fig. 1Flow chart Flow chart Results Descriptive analysis From January 2011 to March 2025, the average monthly incidence rate of syphilis was 42,627.05 cases (SD = 8,127.42). Although the incidence of syphilis declined in 2020, it has since exhibited a sharp upward trend. The keyword database comprises 62 keywords, which are categorized into the following groups: syphilis comprehensive category, etiology, symptoms, and prevention and treatment (Supplementary Table 1). Correlation analysis between Baidu search index and syphilis Spearman rank correlation analysis revealed strong temporal correlations (rs > 0.6; Table 1) between the Baidu Search Index (BSI) and seven key keywords related to reported syphilis cases. The remaining keywords demonstrated weak correlations or lacked statistical significance. Time series plots of highly correlated keywords, the Baidu comprehensive index, and the average monthly incidence of syphilis were generated, including “syphilis rash” (Fig. 2c) and “penicillin sodium” (Fig. 2). Compared with reported syphilis cases, the overall trends of these two keywords align closely with actual incidence patterns. Table 1Preliminarily screened 7 Baidu search index keywords related to syphilisKeywordsarsbSearch volume meanSDP ValueThe transmission routes of syphilis0.647434.413263.439<0.01Early symptoms of syphilis0.644490.927548.079<0.01Syphiloderm0.736511.028198.373<0.01Benzacin penicillin0.731427.339144.944<0.01Penicillin G0.623163.49130.862<0.01Penicillin sodium0.75198.79821.6<0.01What does hpv positive mean0.656875.265996.454<0.01aKeywords were presented in English formatbrs: Spearman rank correlationFig. 2Time series plot of syphilis cases and Baidu search index of selected keywords. (A) is the time series graph of the reported number of syphilis cases in syphilis reports. (B) is the time series graph of the syphilis comprehensive search index (C) and (D) are the time series graphs of the keywords “Syphiloderm” and “Penicillin sodium” Table 1Preliminarily screened 7 Baidu search index keywords related to syphilisKeywordsarsbSearch volume meanSDP ValueThe transmission routes of syphilis0.647434.413263.439<0.01Early symptoms of syphilis0.644490.927548.079<0.01Syphiloderm0.736511.028198.373<0.01Benzacin penicillin0.731427.339144.944<0.01Penicillin G0.623163.49130.862<0.01Penicillin sodium0.75198.79821.6<0.01What does hpv positive mean0.656875.265996.454<0.01aKeywords were presented in English formatbrs: Spearman rank correlation Preliminarily screened 7 Baidu search index keywords related to syphilis aKeywords were presented in English format brs: Spearman rank correlation Time series plot of syphilis cases and Baidu search index of selected keywords. (A) is the time series graph of the reported number of syphilis cases in syphilis reports. (B) is the time series graph of the syphilis comprehensive search index (C) and (D) are the time series graphs of the keywords “Syphiloderm” and “Penicillin sodium” Cross-correlation analysis and composite search index (CSI) A cross-correlation analysis was conducted between the keywords with rs > 0.6 and reported syphilis cases. Six keywords with a maximum cross-correlation coefficient greater than 0.5 (p < 0.001) within the defined lag range were selected (Table 2). A weighting formula was applied to calculate the weight of each keyword, and the syphilis CSI was constructed by aggregating the BSI values of each keyword using these weights. Spearman rank correlation analysis indicated a high correlation between reported syphilis cases and the syphilis CSI (rs = 0.798). Table 2Time series cross-correlation analysis between the monthly mean of keywords and the number of monthly incidence reportsKeywordsaMeanMaximum CCFbLag (months)SEThe transmission routes of syphilis434.4130.54500.076Early symptoms of syphilis490.9270.58200.076Syphiloderm511.0280.66300.076Benzacin penicillin427.3390.71200.076Penicillin G163.4910.55600.076Penicillin sodium198.7980.73700.076What does hpv positive mean875.2650.389140.08aKeywords were presented in English formatbCCF: cross-correlation function Table 2Time series cross-correlation analysis between the monthly mean of keywords and the number of monthly incidence reportsKeywordsaMeanMaximum CCFbLag (months)SEThe transmission routes of syphilis434.4130.54500.076Early symptoms of syphilis490.9270.58200.076Syphiloderm511.0280.66300.076Benzacin penicillin427.3390.71200.076Penicillin G163.4910.55600.076Penicillin sodium198.7980.73700.076What does hpv positive mean875.2650.389140.08aKeywords were presented in English formatbCCF: cross-correlation function Time series cross-correlation analysis between the monthly mean of keywords and the number of monthly incidence reports aKeywords were presented in English format bCCF: cross-correlation function Automatic model fitting Based on the Akaike Information Criterion (AIC) minimization principle, the optimal ARIMA and ARIMAX models automatically fitted by the auto.arima function were identified as ARIMA (1,0,0)(1,1,1)(12) and ARIMAX (2,0,1)(2,0,0)(12), respectively. In the model plots, black lines represent the actual values of the training set, red lines represent the actual values of the validation set, blue lines represent predicted values, and orange lines represent fitted values of the training set (Supplementary Figures 1 and 2). The Lagrange Multiplier (LM) test results indicated that both models were statistically significant (p < 0.05). Additionally, the Ljung-Box test confirmed that the residuals of both models were white noise (p > 0.05), suggesting that the models were valid. Manual model fitting Augmented Dickey-Fuller (ADF) stationarity tests indicated that both the monthly syphilis incidence sequence (p = 0.01) and the comprehensive search index sequence (p = 0.01) satisfied the stationarity condition (p < 0.05), and there by did not require differencing. Furthermore, the trend in syphilis incidence exhibited seasonal periodicity, with the lowest values typically observed in January or February and a peak occurring in March each year. Consequently, in manual model fitting, the parameter d was set to 1, and the seasonal period s was set to 12. By examining the Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) plots of the syphilis incidence series (Supplementary Figure 3), it was observed that the PACF plot exhibited second-order truncation, while the ACF plot displayed tailing behavior. Accordingly, the value of p was set to 2, and q was set to 0. The seasonal parameters P, D, and Q were generally selected within the range of 0 to 2. These parameters were systematically combined and tested in the ARIMA model. Moreover, the Cross-Correlation Function (CCF) plot (Supplementary Figure 4) indicated that the correlation between the comprehensive search index and syphilis incidence was strongest at a time lag of 0 months (exceeding the confidence interval). Based on this finding, the manually fitted ARIMA model was extended to an ARIMAX model by incorporating the comprehensive search index at a lag of 0 months. Considering evaluation metrics such as AIC, R2, MAE, RMSE, and MAPE, the optimal models selected were ARIMA (2,0,0)(2,1,0)(12) (Fig. 3) and ARIMAX (2,0,0)(2,1,0)(12)+CSI (Lag = 0) (Fig. 4). The LM test results showed p < 0.05, and the Ljung-Box test yielded p > 0.05 (Table 3), confirming the validity of the models. Fig. 3ARIMA(2,0,0)(2,1,0)(12) model fitting, diagnosis, and prediction results. (A) Fitting and prediction results. Yellow and black represent the fitted and true values of the training sets, respectively. Red indicates the true values of the testing sets, and blue indicates the predicted values. The grey area represents the 95% confidence interval of the predicted value. (B) Normal Q-Q plot. The solid black line represents the theoretical quantile line. (C) Residual plot. (D) ACF plot. (E) PACF plot. The blue dashed lines in (D) and (E) indicate the confidence intervalFig. 4ARIMA(2,0,0)(2,1,0)(12) + CSI (Lag = 0) model fitting, diagnosis, and prediction resultsTable 3Model fitting and prediction evaluation parametersModelADFa, P valueLSMb, P valueLjung-Box test, P valueAICcR2MAEdRMSEeMAPEf,%ARIMA(1,0,0),(1,1,1)(12)g0.01<0.0010.4712774.770.702658.4383885.0596.82%ARIMAX(2,0,1),(2,0,0)(12)g0.01<0.0010.9722984.670.742583.4533642.0516.83%ARIMA(2,0,0),(2,1,0)(12)g0.01<0.0010.7492776.020.702603.6733908.3866.69%ARIMAX(2,0,0),(2,1,0)(12)g0.01<0.0010.9722762.80.732464.9153696.196.34%ARIMA(2,0,0),(2,1,0)(12)h9007.81[4098.18, 13,917.44]10,328.01[5418.39, 15,237.64]0.16%[0.07%, 0.25%]ARIMAX(2,0,0),(2,1,0)(12)h5184.36[2327.24, 8041.48]6010.31[3153.19, 8867.43]0.1%[0.04%, 0.15%]aADF: augmented Dickey-FullerbLSM: least squares methodcAIC: Akaike information criteriondMAE: mean absolute erroreRMSE: root mean square errorfMAPE: mean absolute percentage errorg: Model Fitting Evaluation Parametersh: Model Prediction Evaluation Parameters ARIMA(2,0,0)(2,1,0)(12) model fitting, diagnosis, and prediction results. (A) Fitting and prediction results. Yellow and black represent the fitted and true values of the training sets, respectively. Red indicates the true values of the testing sets, and blue indicates the predicted values. The grey area represents the 95% confidence interval of the predicted value. (B) Normal Q-Q plot. The solid black line represents the theoretical quantile line. (C) Residual plot. (D) ACF plot. (E) PACF plot. The blue dashed lines in (D) and (E) indicate the confidence interval ARIMA(2,0,0)(2,1,0)(12) + CSI (Lag = 0) model fitting, diagnosis, and prediction results Table 3Model fitting and prediction evaluation parametersModelADFa, P valueLSMb, P valueLjung-Box test, P valueAICcR2MAEdRMSEeMAPEf,%ARIMA(1,0,0),(1,1,1)(12)g0.01<0.0010.4712774.770.702658.4383885.0596.82%ARIMAX(2,0,1),(2,0,0)(12)g0.01<0.0010.9722984.670.742583.4533642.0516.83%ARIMA(2,0,0),(2,1,0)(12)g0.01<0.0010.7492776.020.702603.6733908.3866.69%ARIMAX(2,0,0),(2,1,0)(12)g0.01<0.0010.9722762.80.732464.9153696.196.34%ARIMA(2,0,0),(2,1,0)(12)h9007.81[4098.18, 13,917.44]10,328.01[5418.39, 15,237.64]0.16%[0.07%, 0.25%]ARIMAX(2,0,0),(2,1,0)(12)h5184.36[2327.24, 8041.48]6010.31[3153.19, 8867.43]0.1%[0.04%, 0.15%]aADF: augmented Dickey-FullerbLSM: least squares methodcAIC: Akaike information criteriondMAE: mean absolute erroreRMSE: root mean square errorfMAPE: mean absolute percentage errorg: Model Fitting Evaluation Parametersh: Model Prediction Evaluation Parameters Model fitting and prediction evaluation parameters aADF: augmented Dickey-Fuller bLSM: least squares method cAIC: Akaike information criterion dMAE: mean absolute error eRMSE: root mean square error fMAPE: mean absolute percentage error g: Model Fitting Evaluation Parameters h: Model Prediction Evaluation Parameters Model selection Compared with the best models obtained through automatic fitting, the manually fitted ARIMA (2,0,0)(2,1,0)(12) (Model 1) and ARIMAX (2,0,0)(2,1,0)(12)+CSI (Lag = 0) (Model 2) demonstrated lower error values (Table 3) and superior evaluation metrics (Table 3). These results suggest that the manually fitted models may be more suitable for predicting syphilis incidence in China. Furthermore, the residuals of both models followed a normal distribution, indicating that the models effectively captured the information contained in the original time series and are suitable for short-term forecasting and dynamic analysis of syphilis (Figs. 3B–E and 4B–E). As a result, Models 1 and 2 will be employed for subsequent syphilis incidence forecasting. Model prediction and evaluation The incidence of syphilis was predicted using both models. The predicted values from Model 1 (Fig. 3) and Model 2 (Fig. 4) were largely consistent with the actual values, with all true values falling within the prediction intervals. When comparing model performance, the ARIMAX model incorporating BSI outperformed the ARIMA model, yielding lower MAE, RMSE, and MAPE values (Table 3). Subgroup analysis The incidence of syphilis in China remained relatively stable from 2020 to 2022 compared to previous years, likely due to the impact of the COVID-19 pandemic. Following the relaxation of epidemic control measures in 2023, the incidence rate increased rapidly, potentially affecting model performance. To evaluate the impact of the pandemic on syphilis trends, Models 1 and 2 were used to predict syphilis incidence from January 2020 to March 2025. The results indicated a decline in predictive accuracy for both models in 2022 compared to other years. However, the ARIMAX model, which incorporated BSI, demonstrated improved predictive performance and partially mitigated the influence of the pandemic (Supplementary Table 2). Discussion Official data on infectious disease epidemics in China primarily originate from conventional surveillance systems. However, these systems often suffer from delayed reporting timelines and limited capacity for comprehensive patient testing. In contrast, internet-based search monitoring systems may help mitigate common issues such as reporting delays and omissions inherent in conventional systems [24]. Since 2011, researchers have utilized the Baidu Index to analyze epidemic trends and validated the effectiveness of predictive models based on this index for disease forecasting [13–16]. As a consequence, this study aims to enhance syphilis surveillance by investigating the predictive capability of the Baidu Index for national syphilis trends in China. We employed monthly data on newly reported syphilis cases in China from January 2011 to March 2025, in conjunction with Baidu Search Index (BSI) data, to identify patterns in syphilis epidemiology and develop an ARIMAX model tailored to China’s specific context for forecasting future syphilis trends. This approach timely addresses the recent lack of predictive models for syphilis incidence and contributes to improving surveillance capabilities. The successful application of internet-derived data in disease surveillance has been supported by previous research [25], and numerous studies have demonstrated the utility of BSI for early warning and prediction of infectious diseases [13–16]. Based on this, we identified six key search terms related to syphilis. Among these, terms highly correlated with syphilis, such as “syphilis rash” and “penicillin sodium,” exhibited temporal trends consistent with syphilis incidence, with search volumes fluctuating in response to disease prevalence. Spearman rank correlation analysis revealed a strong positive correlation (rs = 0.798) between aggregated BSI and syphilis cases, indicating that BSI effectively captures changes in syphilis prevalence. To clearly distinguish and evaluate the search behaviors in different dimensions, we have systematically classified the 6 keywords that were finally included: (1) Etiology: Syphilis transmission routes. (2) Symptoms: Early symptoms of syphilis, Syphilitic rash. (3) Prevention and treatment: Benzathine penicillin, Penicillin G, Penicillin sodium. We further quantified the contribution of each keyword category to the Baidu comprehensive index and evaluated their impact on incidence prediction. The results show that symptom-related keywords (Early symptoms of syphilis, Syphilitic rash) contribute the most to the Baidu comprehensive index and have the greatest effect on incidence prediction. This finding highlights the strong public demand, particularly from potential patients or concerned individuals, for early recognition and symptom verification. It confirms the importance of including symptom-related search behavior in predictive models and provides guidance for public health strategies. Emphasis should be placed on public education about early symptoms to improve disease awareness, promote early diagnosis and treatment, and effectively control disease transmission. Historically, long-term surveillance data on infectious disease incidence have commonly employed the ARIMA model. While some comparative studies on influenza and COVID-19 surveillance and prediction models using web search data have shown that the ARIMA model may underperform compared to models such as long short-term memory (LSTM), mixed logistic regression (MLR), and support vector regression (SVR) in certain evaluation metrics, it remains advantageous due to its operational simplicity and broad applicability. Furthermore, due to data limitations, alternative models may be more susceptible to prediction errors [26, 27]. Importantly, the ARIMA model is versatile across various time series data types, as it can capture long-term trends and seasonality while accommodating external variables. The ARIMAX model extends the ARIMA framework by incorporating external variables, thereby often yielding improved predictive performance. Although multiple forecasting models are available, few achieve an optimal balance between accuracy and practicality. The ARIMAX model stands out for its simplicity and interpretability, making it particularly suitable for long-term disease surveillance tasks. Its straightforward structure facilitates broader adoption and application. When combined with BSI, the model significantly enhances predictive accuracy and aligns more closely with real-world conditions in China. This advancement holds significant implications for syphilis surveillance and early warning systems in the country. In this study, we constructed an ARIMA (2,0,0)(2,1,0)(12) model (Model 1) using syphilis time series data and extended it by incorporating BSI as an external variable to form an ARIMAX (2,0,0)(2,1,0)(12)+BSI (Lag = 0) model (Model 2). Both models demonstrated excellent fitting performance based on ACF and PACF plots and the auto.arima function, with the ARIMAX model showing superior predictive performance. These findings are consistent with those observed in studies on hepatitis C, scarlet fever, COVID-19, and pulmonary tuberculosis [7, 14–16], further validating the effectiveness of BSI in syphilis monitoring. Additionally, compared to previous time series models (MAPE = 7.571% [28], MAPE = 0.206% [29], MAPE = 0.12% [7]), the ARIMAX model proposed in this study demonstrated superior performance (MAPE = 0.1%). BSI provides real-time data that can be accessed on a daily or monthly basis, whereas official data from Chinese government sources are often delayed by several months. An abnormal increase in syphilis-related search terms or rising model predictions may indicate an impending outbreak, enabling public health authorities to implement proactive measures, develop prevention strategies, and allocate resources efficiently. The global outbreak of the COVID-19 pandemic has posed a significant threat to public health. The original syphilis time series data revealed a notable decline in incidence rates in 2020, which could potentially affect model performance. To address this, we conducted a subgroup analysis to evaluate the impact of the pandemic and account for potential confounding factors. Results indicated that the ARIMAX model maintained superior predictive performance compared to the ARIMA model even during 2020, suggesting that the pandemic did not significantly compromise the model’s accuracy. The decline in syphilis incidence in 2020 should be interpreted from multiple perspectives, rather than being simply attributed to the effectiveness of pandemic control. First, reduced access to medical services is an important factor: during the pandemic, routine STD diagnostic services were limited. Some patients could not seek care or were concerned about cross-infection, leading to underreporting or missed cases. Second, changes in population behavior may have reduced transmission efficiency: social distancing, reduced mobility, and fewer social activities objectively lowered the opportunities for syphilis transmission. Finally, surveillance system data delays should be considered: public health emergencies disrupted routine infectious disease reporting, possibly causing late reporting and a temporary “false decline” in 2020 data. Overall, this downward trend may result from multiple overlapping factors. This indicates that data interpretation should be cautious and continuous efforts are needed to strengthen STD monitoring and prevention in the post-pandemic era. Moreover, the ARIMAX model integrated with BSI demonstrated enhanced predictive capability, further supporting the utility of BSI in syphilis forecasting. This study has several limitations. First, we exclusively utilized Baidu search data and did not incorporate data from other widely used social media platforms. With technological evolution, health information search behavior is becoming fragmented. Although Baidu index has privacy advantages for sensitive topics, young users may migrate to new platforms, affecting data completeness. Future research should compare multiple platforms to verify the robustness of findings. Second, syphilis incidence is influenced by multiple factors, including hygiene practices and population immunity. Due to privacy considerations, we were unable to assess the impact of behavioral preferences on online search behavior. Lastly, internet-derived data may be affected by media coverage, potentially introducing noise or inaccuracies [30]. Consequently, the conclusions of this study should be interpreted with caution when being generalized to the overall population. In particular, they should not be directly extrapolated to subgroups with lower internet penetration or those who do not primarily rely on search engines to obtain information, such as some older adults and younger adolescents. Future research could integrate multi source data from several directions. First, a cross platform keyword monitoring system could be established. For platforms such as Douyin and Xiaohongshu, historical search volume similar to Baidu Index is not directly available. However, web crawler techniques can be used to collect interaction data under specific keywords, such as syphilis symptoms and syphilis rash. These data may include the number of posts or videos, as well as the number of likes and comments. Such indicators can be used as proxy measures of public attention and can be integrated with conventional search index data for further analysis. Future research can integrate multi-source data from the following several aspects: (1) Construct a cross-platform keyword monitoring system: Collect keyword-related metrics (post count, likes, comments) from platforms like Douyin and Xiaohongshu as proxies for public attention. (2) Apply NLP for sentiment and intent analysis: Social media provides rich text data. NLP can distinguish between fear-driven queries, experience sharing, or treatment-seeking behaviors, improving understanding of public information needs. (3) Explore complementary and validated data from multiple sources: Use PCA or dynamic factor models to integrate Baidu index (deep searches) with social media activity (shallow attention), and cross-validate predictions using multiple sources. We believe these methods will help overcome limitations of single-source data and build a more comprehensive public health monitoring system. In conclusion, this study demonstrates the effectiveness and feasibility of the ARIMAX model based on time series decomposition for syphilis surveillance. The integration of BSI significantly improves the model’s predictive accuracy, offering a robust scientific foundation for evidence-based public health decision-making. Electronic supplementary material Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1