The Internet of Things (IoT) applied to intelligent transport systems has become a key element for understanding the way traffic flow behaves in cities, which helps in decision-making to improve the management of the transport system by monitoring and analyzing network traffic in real time, all with the aim of daily benefiting users of the city’s road infrastructure. Traffic volume estimation in real time, with high effectiveness, may help mobility management and improve traffic flow. Moreover, machine-learning algorithms have shown effectiveness in various scientific fields and have provided a significant platform for achieving intelligent applications. Therefore, we applied various machine learning algorithms to classify the vehicular traffic status in the traffic network of two cities with more than 2 million inhabitants. It was first necessary to establish, from the attributes provided by the datasets, the object class from the LOS (Level of Services) thresholds proposed by the National Academies of Sciences, Engineering, and Medicine, for the basic segments of highways in an urban area. We then selected the attributes of interest using the Recursive Feature Elimination Method (RFE) to reduce the dimensionality of the data, and applied the DT, RF, ET, KNN, and MLP algorithms to train and classify the level of vehicular congestion, defining various volumes of training and validation data. The results show the high effectiveness of the algorithms, highlighting the MLP algorithm as the one that provides the highest effectiveness on average for the evaluated datasets, with a mean precision of 99.5%.