The paper presents the results of applying artificial intelligence methods in determining the pile bearing capacity. In this study, an artificial intelligence model namely random forest was developed and applied in pile bearing capacity prediction. The random forest model architecture is optimized by the grid search technique to find the best model. A database of 108 destructive compression results by static pile load method has been synthesized to train and test the model, in which geological data is represented by cone penetration test (CPT) result. In addition, the results of the study are compared with the multi-variable regression model and the traditional formula according to the pile foundation - design standard TCVN 10304:2014, giving the random forest the superiority in determining the load capacity compared to the other two methods. The results of the study show that the random forest with optimum parameters can predict very well the pile load capacity, and has great potential in solving other problems in construction engineering.