Monitoring the presence of illicit and pharmaceutical drugs in wastewater has emerged as a powerful tool for determining drug consumption patterns and trends within a specific population group. In this study, an analytical method has been developed to determine the presence of forty psychoactive substances, including stimulants, benzodiazepines, antidepressants, and opioids, in wastewater. The proposed approach combines in-situ wastewater single sampling, solid-phase extraction, and ultra-high performance liquid chromatography coupled with tandem mass spectrometry determination. Extraction conditions were evaluated to obtain the best extraction efficiencies and sensitivity. The developed method provided limits of quantification ranging from 1.7 (LSD) to 73.1 (5-EAPB) ng L