The growing challenge of increasing traffic volumes presents a real challenge for road safety, emergency response and overall transport efficiency. Intelligent transportation systems play a fundamental role in solving these challenges, through accurate traffic prediction. In this study, we propose a hybrid model that combines the Long-Term Memory Algorithm (LSTM) and Particle Swarm Optimization (PSO) to predict traffic flow more accurately at intersections. Our approach takes advantage of the strength of PSO, a robust optimization technique inspired by swarm intelligence, to optimize the hyperparameters of the LSTM algorithm. Through in-depth benchmarking, we evaluate the performance of our hybrid LSTM-PSO model against other existing models. By evaluating measures such as root mean square error and mean absolute error, we demonstrate the superior efficiency of the proposed hybrid model. Our results highlight the effectiveness of our approach in outperforming alternative models, offering a promising solution for intelligent transportation systems to accurately predict traffic flow at intersections and improve overall traffic management efficiency.