Internet of Things (IoT) is predicted to permeate all areas of the physical world, particularly homes and urban settings, in the next years. Cloud‐based IoT is a network of things that can be managed and inspected to create various intelligent systems over the internet. The primary technological difficulty in service computing is swiftly integrating diverse services to serve cross‐organizational business activities. It is one of the famous NP‐hard problems; therefore, this study proposes a novel service composition technique termed multiobjective particle swarm optimization and crowding distance (MOPSO‐CD) approach to solve this problem. The main issue with the MOPSO method is that the search is conducted very quickly, resulting in an incorrect response. To address this issue, we integrate MOPSO with the CD approach to provide an efficient composition service in cloud‐based IoT. The proposed method is simulated using Matlab, and the performance is compared against the performance of three other multi‐objective algorithms. The findings revealed that the proposed method outperforms different algorithms regarding availability, reliability, response time, latency, and energy consumption.