In this study, the machine learning (ML) techniques were compared and evaluated for real-time short-term prediction of air pollutants and the accuracy of the prediction results using the optimal prediction technique was analyzed. Air quality data and meteorological data for the last four years (2015 similar to 2018) are used to train and test the ML system. The ML system consists of four models including Random Forest (RF), Support Vector Machine (SVM), Multiple Linear Regression (MLR), and Deep Neural Network (DNN), and the optimal model was determined through an error analysis technique using an accuracy verification index of Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and coefficient of determination (R-2). The optimized model estimation results showed that the explicit error ranges were estimated (NO2=+/- 0.035 ppm, CO=+/- 0.071 ppm, SO2=+/- 0.0008 ppm, O-3=+/- 0.006 ppm, PM10=+/- 6.395 mu g/m(3), PM2.5=+/- 3.772 mu g/m(3)). Using the optimized model determined by the highest grade acquisition method, the modelling results during a year of 2019 showed relatively high accuracy as ( NO2= 14.146 +/- 5.864%, CO = 4.289 +/- 1.025%, SO2= 5.572 +/- 1.306%, O-3= 5.549 +/- 0.716%, PM10= 4.031 +/- 0.899%, PM2.5= 3.488 +/- 0.990%) respectively. These prediction results mean a significant level of error within the uncertainty of the model. Therefore, it was proved that the suggested methodology is effective in short-term prediction of air pollutants.