Seismic design of structures taking into account the soil-structure interaction (SSI) methods is considered to be more efficient, cost effective, and safer then fixed-base designs, in most cases. Finite element methods that use direct equations to solve SSI problems are very popular, but the prices of the software are very high, and the analysis time is very long. Even though some low-cost and efficient software are available, the structures are mostly analyzed for the superstructure only, without using the geotechnical properties of the ground and its interaction effects. The reason is that a limited number of researchers have the knowledge of both geotechnical and structural engineering to model accurately the coupled soil-structure system. However, a cost-effective, less time-consuming and easy-to-implement technique is to analyze the structure along with ground properties using machine learning methods. The database techniques using machine learning are robust and provide reliable results. Thus, in this study, machine learning techniques, such as artificial neural networks and support vector machines are used to investigate the effect of soil-structure interactions on the seismic response of structures for different earthquake scenarios. Four frame structures are investigated by varying the soil and seismic properties. In addition, varying sample sizes and different optimization algorithms are used to obtain the best machine learning framework. The input parameters contain both soil and seismic properties, while the outputs consist of three engineering demand parameters. The network is trained using three and five-story buildings and tested on a three-story building with mass irregularity and a four-story building. Furthermore, the proposed method is compared with the dynamic responses obtained using fixed-base and ASCE 7-16 SSI methods. The proposed machine learning method showed better results compared with fixed-base and ASCE 7-16 methods with the nonlinear time history analysis results as a reference.