In this study, a solution model is proposed to obtain input ground motion datasets compatible with given design spectra based on meta-heuristic harmony search algorithm. The utility of the solution model is demonstrated by generating ground motion datasets matching the Eurocode-8 design spectra for different soil types out of an extensive database of recorded motions. A total of 352 records are selected from the Pacific Earthquake Engineering Center (PEER) Strong Motion Database based on magnitude, distance, and site conditions to form the original ground motion domain. Then, the proposed harmony search based solution algorithm is applied on the pre-selected 352 time-series to obtain the ground motion record sets compatible with design spectra. The results demonstrate that the proposed HS based solution model provides an efficient way to develop input ground motion record sets that are consistent with code-based design spectra. (C) 2011 Elsevier Ltd. All rights reserved.