The aim of the current research is to investigate the pile group functions in liquefaction prone soil under the influence of far and near earthquakes and structural responses such as acceleration history, displacement and bending moments. The method of estimating the response spectrum of the building was used according to the distance, size, structural conditions and fault mechanism and measuring the response spectrum of a selected recorded or artificial earthquake. By using opensees software, Midas Gts, different modes of research were formed. In the selection of earthquake accelerometers for the far and near areas, Peer Seismography Center, Iran Accelerography Center and Road and Housing Research Center were used to select and modify the accelerometers. The results of the research showed that increasing the diameter of the pile reduces the possibility of liquefaction, so that by increasing the diameter of the pile from 0.5 m to 1 m, the possibility of liquefaction and collapse of the pile group decreases by about 33%. In addition, with an increase in the distance between the piles, the probability of liquefaction increases, so that the probability of liquefaction of the group of piles and its collapse increases by about 14% when the distance between the piles increases from 1.5 to 5 meters. Finally, using the results of numerical modeling and with coding software, a suitable model for the pile group against liquefaction was presented for earthquakes in the far and near domains.