Cloud computing, as a popular technology in recent years, has greatly facilitated the development of data outsourcing services. However, when users access sensitive data stored in the cloud, ensuring the security of data remains a pressing challenge. In this paper, we present a privacy-preserving keyword query scheme for outsourced data in cloud environment. Furthermore, to implement this scheme, we propose a series of quantum basic protocols with single qubits. The proposed basic protocols do not require the execution of quantum gate operations, and the necessary measurements are only Bell measurements based on measurement-device-independence. Therefore, it is practical and feasible under current technology. Moreover, compared with classical schemes, our scheme has higher security (i.e., quantum security). Finally, we conduct simulation experiments in IBM Qiskit to verify the correctness and feasibility of the critical parts of the scheme.