The application of periodic pile barriers for isolating ambient vibrations has emerged as a significant research topic, which is essentially the problem of wave scattering by periodically distributed structures. This study presents an analytical series solution for anti-plane shear (SH) wave scattering by infinitely periodic pile barriers using the wave function expansion method, incorporating the wave field characteristics of infinitely periodic distributed scatterers subjected to plane waves. From the perspective of periodic theory, the wave fields around each scatterer are completely identical, differing only by a phase shift (frequency domain) or a time difference (time domain). As a result, as long as the boundary condition of one scatterer is satisfied, boundary conditions of the remaining scatterers can be satisfied simultaneously. This novel approach allows the selection of an arbitrary single pile as a reference in the infinitely periodic model to be solved, yielding accurate results without truncation errors and significantly reducing computational and storage requirements. A FORTRAN code is developed to achieve numerical evaluation of the theoretical formulation, followed by verification of the solution's accuracy using two degenerate examples. Numerical examples are conducted, focusing on the influence of pile stiffness, pile spacing, and pile type on the vibration isolation. The results demonstrate that decreasing the spacing between piles can effectively increase the bandgap width and reduce the displacement response. The screening effectiveness of solid piles is better than that of hollow pipe piles and filled pipe piles. In vibration mitigation design for engineering projects, the larger the shear stiffness ratio of the pile-soil is not always better, an economical and reasonable pile stiffness should be selected.