Betalains were extracted and analyzed from Opuntia joconostle (the prickly pear known as xoconostle in Mexico). For the extraction, two solvent systems were used, methanol/water and ethanol/water. A three-variable Box-Behnken statistical design was used for extraction: solvent concentration (0-80%, v/v), temperature (5-30 °C), and treatment time (10-30 min). The extraction and stability of betalains from xoconostle were studied using response surface methodology (RSM). Techniques such as UV-vis, column chromatography, and HPLC were employed for the separation and analysis of the main pigments present in the extracts. Maximum pigment concentration (92 mg/100 g of fruit) was obtained at a temperature of 15 °C and a time of 10 min for methanol/water (20:80), whereas maximum stability of the pigment was observed at pH 5 and a temperature of 25 °C. HPLC chromatograms showed the main betalains of the xoconostle characterized were betalain, betanidin, and isobetalain.