Data pricing is a key link to promote the efficient circulation of data in the market. However, the existing methods are still insufficient in terms of pertinence, dynamism and comprehensiveness. Therefore, we proposed a data pricing prediction model based on sparrow search optimization XGBoost, aiming to provide a reference for pricing decisions in data market. First, we crawled the data transaction information of Youedata.com and performed preprocessing operations such as outlier processing, one hot encoding and logarithmic transformation on the dataset; Secondly, we conducted exploratory data analysis to understand the distribution of data and their correlation. Then, we used the LASSO algorithm to select features for the dataset and constructed a data pricing prediction model based on SSA-XGBoost. Finally, we compared and analyzed it with six machine learning models including LightGBM, GBDT, MLP, KNN, LR and XGBoost. The experimental results show that in terms of the R-squared, the prediction results of the proposed SSA-XGBoost model exceed the above six models by 4.9%, 7.4%, 7.1%, 23.8%, 12.8%, and 2.3% respectively, and are superior to the state-of-the-art work. Furthermore, the evaluation results of the five indicators of MSE, RMSE, MAE, MAPE, and RMSPE are better than other models, showing higher stability.