Sensor networks represent an important component of distributed infrastructure supplying raw data to various applications from military to healthcare. A key challenge is cost-efficient collection of distributed data streaming from those sensor networks. In this paper we propose the use of mobile data collectors that employ K-NN queries as a cost-efficient approach to collect data within the sensor network. We investigate a 3Dsensor network and propose a cost-efficient 3D-KNN algorithm that uses minimal energy and communication overheads to compute k-nearest neighbors. The 3D-KNN algorithm uses a 3dimensional plane rotation algorithm that maps sensor nodes on a 3D plane to a reference plane identified by the mobile data collector We propose a cost-efficient KNN boundary estimation algorithm that computes KNN boundary based on network density We also propose a neighbor prediction algorithm that uses distance, signal to noise ratio and mobile data collector’strajectory information to identify sensor nodes along the mobile data collector’s path. We simulate the proposed 3D-KNN algorithm using GlomoSim and validate its cost efficiency by evaluating its energy efficiency and query latency. Lessons and results of extensive simulation conclude the paper.