Adenosine and cordycepin are bioactive compounds with health benefits. Therefore, both substances are often used to assess the quality of Cordyceps products. The optimization of the extraction conditions to determine adenosine and cordycepin from products containing Cordyceps (powder, extract, and capsule samples) were studied. The samples were prepared using an ultrasound-assisted extraction, the solvent was methanol and quantification of adenosine and cordycepin by HPLC-PDA. Optimization of adenosine and cordycepin extraction conditions by Response surface methodology using the Box-Behnken design, and by using design expert software. The experimental matrix includes 17 experiments of 3 investigation factors with the running range: material/solvent ratio (1:10-1:50 g/mL), methanol concentration (5-25%), ultrasound time (30-90 minutes). The results showed the optimal conditions for the extraction of adenosine and cordycepin for Cordyceps powder samples are the ratio of raw materials:solvent = 1:40 (g/mL), methanol concentration of 17.5% and ultrasound time is 70 minutes, the mean contents of adenosine and cordycepin were 24.15 and 330.78 mg/100g, the optimal methanol concentration for the extraction process is 15% for Cordyceps extract samples, those in their were: 158.30 and 1050.78 mg/100g, the most appropriate methanol concentration is 50% for Cordyceps capsule samples, while those in their were: 23.98 mg/100g and 213.21 mg/100g, relatively. This study provides an efficient analysis method to determine the optimal extraction conditions of adenosine and cordycepin from products containing Cordyceps that can be used as a basis for evaluating the quality of these products.