OBJECTIVE: To optimize the extraction technology of total alkaloids from Piper longum, and to provide reference for deep development and comprehensive utilization of P. longum. METHODS: With the extraction rates of total alkaloids (the target component for piperine) as reference index, using comminution degree of medicinal materials, liquid-solid ratio, extraction time and extraction times as factors, single factor test and Box-Behnken response surface methodology were adopted to optimize the extraction technology of total alkaloids from P. longum. The validation tests were conducted for 3 times (the amounts of P. longum were 1.00, 10.00, 100.00 g). RESULTS: The optimal extraction technology was that comminution degree of 90 mesh, 32-fold absolute ethanol, extracting for 3 times, lasting for 170 min each time. Under optimal technology, the extraction rates of total alkaloids from P. longum were 5.015, 5.028, 5.041 mg/g when the amount of P. longum were 1.00, 10.00, 100.00 g; relative errors of them to predicted value 5.025 mg/g were 0.20%, 0.06%, 0.26%, respectively. There was small difference. CONCLUSIONS: The optimal extraction technology of total alkaloids of P. longum is reasonable, stable and feasible.