This paper addresses the selection and scaling of earthquake time histories for analysing masonry structures' Out-Of-Plane (OOP) response according to the 2018 Turkish Building Earthquake Code (TBEC-2018) guidelines. Ground motion simulations are proposed for regions with limited seismic networks or lacking information regarding recorded accelerograms for large-magnitude events. Selection and scaling procedures are automatised according to the TBEC-2018 recommendations. The pre-selection is conducted according to specific seismological characteristics, and the optimal scaling factors of individual records are computed using a metaheuristic optimisation based on the Differential Evolution Method (DEM). Two sets of records (11 real and 11 simulated) are generated and used as input to conduct non-linear dynamic analyses. A U-shaped masonry prototype is adopted as a structural benchmark. The structural response is monitored with an emphasis on the OOP response.