The presence of substances harmful to the health of humans and other living beings in the atmosphere is seriously affecting air quality. Consequently, there is a critical need for systems that not only monitor air pollution, but can also predict future pollution levels. Therefore, it was proposed to build an Air Quality Index Prediction Model for Bogota D.C., applying the Random Forest algorithm automatic learning. Taking into account that the Institute of Hydrology, Meteorology and Environmental Studies revealed the air quality for the year 2017, where it identified that Bogota and Medellin, where there are higher concentrations of PM10 and PM2.5, given that air quality and pollution has an effect on the population more risky than other environmental situations, since it not only affects health, but also does so at the socioeconomic level. For the design of the model, the data collected by the air quality monitoring center of the city of Bogota were used, implemented under Python, as it is a simple to interpret and multifunctional language, that allowed to observe that, once the model learns from the data, it yields several important results. Firstly, it should be clarified that the prediction is individual for each of the particles, in this case the result obtained a model accuracy of 91.14% which is quite high considering the amount of data and also the shape of these. It has been demonstrated that, with the increasing amount of historical data available for analysis, machine learning models and algorithms are establishing themselves as a solution that can replace the more classical statistics of air quality measurement.