Finding special periodic orbit in the highly chaotic problems is very complicated. Thus, deriving an effective algorithm for finding such orbits is important. In this paper, the spatial orbits in three-body problems are studied. Then, an algorithm is derived in order to help to find these orbits. This algorithm includes scanning the space, refining better points, and finally, minimizing the position error of the orbit by means of numerical methods.