Living in a smart city has many advantages, such as improved waste and water management, access to quality healthcare facilities, effective and safe transportation systems, and personal protection. Explainable AI (XAI) is called a system that is capable of providing explanations for its judgments or predictions. This term describes a model, its expected impacts, and any potential biases that may be present. XAI tools and frameworks can aid in comprehending and trusting the output and outcomes generated by machine-learning algorithms. This study used XAI methods to classify cities based on smart city metrics. The logistic regression method with LIME achieved perfect accuracy, precision, recall, and F1-score, predicting correctly all cases.