摘要:In this study, we evaluated the use of prickly pear seed cake, a by-product of prickly pear seed oil extraction, as a new precursor for producing activated carbon by phosphoric acid activation, and the obtained carbon’s capacity for heavy metal removal from aqueous solution. Response surface methodology based on the full factorial design at two levels (24) was developed to reduce the number of experiments and reach optimal preparation conditions for the removal of cadmium and lead ions from aqueous solutions. Design Expert 11.1.2.0 Trial software was used for generating the statistical experimental design and analyzing the observed data. Factors influencing the activation process, such as carbonization temperature, activation temperature, activation time, and impregnation ratio, were studied. Responses were studied in depth with an analysis of variance to estimate their significance. Each response was outlined by a first-order regression equation demonstrating satisfactory correspondence between the predicted and experimental results as the adjusted coefficients of correlation. Based on the statistical data, the best conditions for the removal of heavy metals from aqueous solution by the obtained activated carbon were indicated. The maximum iodine number and methylene blue index were 2527.3 mg g−1 and 396.5 mg g−1, respectively, using activated carbon obtained at the following conditions: Tc = 500 °C, Ta = 500 °C, impregnation ratio = 2:1 (g H3PO4: g carbon), and activation time of two hours. The maximum adsorption reached 170.2 mg g−1 and 158.4 mg g−1 for Cd2+ and Pb2+, respectively, using activated carbon obtained at the following conditions: Tc = 600 °C, Ta = 400 °C, impregnation ratio = 2:1 (g H3PO4: g carbon), and activation time of one hour. The activated carbon obtained was characterized by Boehm titration, pH of point of zero charge (pHPZC), Brunauer–Emmett–Teller surface area (SBET), and scanning electron microscopy. Adsorption was performed according to different parameters: pH solution, adsorbent dosage, temperature, contact time, and initial concentration. Regeneration experiments proved that the obtained activated carbon still had a high removal capacity for Cd2+ and Pb2+ after five regeneration cycles.