Rheological models are usually used to predict foamed fluid viscosity; however, obtaining the model constants under various conditions is challenging. Hence, this paper investigated the effect of different variables on foam rheology, such as shear rate, temperature, pressure, surfactant types, gas phase, and salinity, using a high-pressure high-temperature foam rheometer. Power-law, Bingham plastic, and Casson fluid models fit the experimental data well. Therefore, the data were fed to different machine learning techniques to evaluate the rheological model constants with different features. In this study, seven different machine learning techniques have been applied to predict the rheological models' constants, including decision tree, random forest, XGBoost (XGB), adaptive gradient boosting, gradient boosting, support vector regression, and voting regression. We evaluated the performance of our machine learning models using the coefficient of determination (R 2 ), cross-plots, root-mean-square error, and average absolute percentage error. Based on the prediction outcomes, the XGB model outperformed the other ML models. The XGB model exhibited remarkably low error rates, achieving a prediction accuracy of 95% under ideal conditions. Furthermore, our prediction results demonstrated that the Casson model accurately captured the rheological behavior of the foam. Additionally, we used Pearson's correlation coefficients to assess the significance of various properties in relation to the constants within the rheological models. It is evident that the XGB model makes predictions with nearly all features contributing significantly, while other machine learning techniques rely more heavily on specific features over others. The proposed methodology can minimize the experimental cost of measuring rheological parameters and serves as a quick assessment tool.