In this work, a UHPLC-HRMS method using a quadrupole-orbitrap mass spectrometer has been developed for the detection and quantification of 47 compounds. These compounds include a range of chemical structures and properties and are popularly referred to as active pharmaceutical ingredients (API). The APIs selected have historically been incorporated into a variety of products commonly marketed towards acne, hair loss, male erectile dysfunction, and skin whitening. A fast ultrasound-assisted extraction (UAE) procedure without sample cleanup was developed and a high-resolution product ion spectral library was generated for compound verification in complex matrices. Collision energies were optimized for all analytes to overcome the limitations by applying stepped collision energies, such as insufficient fragmentation and excessive fragmentation without molecular ion information. Higher HRMS2 spectra matching scores (0.6 or above) were obtained for the analytes in the tested complex matrices. Eleven representative stable isotopically labeled API analogs were used as internal standards to compensate for the influence of complex matrices, such as shampoo and creams, and as an instrument quality control. One-hundred products with complex matrices were analyzed using the validated UHPLC-HRMS method. Eight APIs (ketoconazole, hydroquinone, salicylic acid, benzocaine, progesterone, azelaic acid, lidocaine, and minoxidil) were identified in 26 out of 100 products ranging from 103 μg/g to 156,000 μg/g.Published by Elsevier B.V.