Pitaya, or dragon fruit, (Hylocereus polyrhizus) contains in its pulp and peel a high concentration of phenolic compounds, flavonoids and high antioxidant activity. The pulp is used in industries and the peel can be a source of bioactive compounds. The aim of this study was to optimize the extraction of phenolic compounds from pitaya peel flour, dried through freeze-drying. Thus, a central composite rotatable design (CCRD) was performed with two variables (X 1 = ethanol percentage, of 0-100% as extraction solvent; X 2 = extraction time, of 5-120 minutes assisted by ultrasound) resulting in 11 experiments. The response variables were the content of total phenolic compounds by the methods of Folin-Ciocalteau and Fast Blue BB, total flavonoids and antioxidant activity by capture of radicals 2,2'-azino-bis(3-ethylbenzothiazoline-6-sulfonic acid); 2,2-diphenyl-1-picrylhydrazyl (DPPH); reduction of iron III (FRAP). It was possible to design the response surface for the analysis of total flavonoids and ABTS. The region of optimal flavonoids extraction, where the extract also demonstrated greater antioxidant activity by the ABTS method, is comprised between 13 and 57% of the ethanol as a solvent and time above 86 minutes of extraction in ultrasonic bath.