The support vector regression (SVR) technique is considered the most promising and widespread way in the prediction process, and raising the predictive power of this technique and increasing its generalization ability well depends on tunning its hyperparameters. Nature-inspired algorithms are an important and effective tool in optimizing or tuning hyperparameters for SVR models. In this research, one of the algorithms inspired by nature, the black hole algorithm (BHA), by adapting this algorithm to optimize the hyperparameters of SVR, the experimental results, obtained from working on two data sets, showed, the proposed algorithm works better by finding a combination of hyperparameters as compared to the grid search (GS) algorithm, in terms of prediction and running time. In addition, the experimental results show the improvement of the prediction and computational time of the proposed algorithm. This demonstrates BHA's ability to find the best combination of hyperparameters.