Anypath routing has been proposed to improve the performance of unreliable wireless networks by exploiting the spatial diversity and broadcast nature of the wireless medium. In this paper, we focus on anypath routing subject to K constraints, and present a polynomial time K-approximation algorithm. When K = 1, our algorithm is the optimal polynomial time algorithm for the corresponding problem. When K 2, the corresponding problem is NP-hard. We are the first to present an O(1)-approximation algorithm. Furthermore, our algorithm is as simple as Dijkstra's shortest path algorithm, and is therefore suitable for implementation in actual wireless routing protocols.