Improving the lifestyle of city residents is conditional on benefiting from high-quality urban infrastructure to satisfy daily demands. The urban water supply network is one of the most basic urban infrastructures, and its optimal design and service are essential during the planning period. Therefore, it is important to determine the actual amount of consumption and predict it for the future. For this purpose, in this research, a method based on artificial intelligence, i.e., genetic programming (GP), as well as Pearson's correlation coefficient data mining method, is proposed. The data mining method is applied here for the database, including daily data on temperature, precipitation, humidity, and the amount of daily water produced in Najafabad city (presenting the total water consumption) from the beginning of 2014 to the end of 2018, and the best set of input data vectors is selected. The selected data are used as input data vectors for the proposed. The obtained results are compared with the results of models based on artificial neural network (ANN). To investigate the performance of the models, R², RMSE, and NSE statistical indices are calculated. A comparison of the results indicates the acceptable performance of the proposed models based on the GP. In other words, the values of RMSE, NSE, R², and MAPE statistical indices for training data in the best GP model are equal to 3262.59 MCM, 0.80, 0.80, and 5.38%, respectively, and for test data equal to 3507.68 MCM, 0.78, 0.78, and 6.67%