A rapid and accurate analysis method based on ultra-high performance liquid chromatography coupled with quadrupole-time-of-flight high-resolution mass spectrometry (UPLC-Q-TOF-HRMS) was developed to screen and determine nine antiallergy drugs in emulsion cosmetics. First, a standard library of the target compounds was established. The library contained the TOF-MS information and secondary MS information such as retention time, ion addition mode, mass error, isotope distribution, mass-to-charge ratio of the parent ion, and fragment ion distribution. According to the European Union regulation (SANTE/11945/2015), the standard for the qualitative determination by HRMS was determined; that is, each compound was confirmed by two ions with a mass error below 5%, and the abundance ratio of the two ions was less than 30%. Second, the instrument conditions and sample pretreatment conditions for the determination of different compounds were optimized, and the influence of different levels of quantitative ions on the matrix effect was compared. The following observations were made:(1) the addition of 0.1% formic acid to the water phase improved the response of the chromatographic peaks; (2) among the various solvent amounts tested (4, 5, 6, 8 mL acetonitrile and 4, 5, 6, 8 mL methanol), 4 mL acetonitrile showed the best extraction efficiency; (3) PRiME HLB had a better purification effect than the other two purification columns (C18 and HLB solid-phase extraction cartridges), thus reducing the interference of impurities and ensuring good recovery of the target compounds; (4) the use of two pairs of secondary product ion quantification could significantly reduce the matrix effect of anti-allergic compounds and improve the quantification accuracy. Finally, based on the above findings, the experimental procedure was established. The lotion samples were first ultrasonically extracted with acetonitrile and purified on the PRiME HLB column. Chromatographic separation was performed on a Waters XBridge C18 column with gradient elution using 0.1% (v/v) formic acid in water and acetonitrile. Finally, the sequential window acquisition of all theoretical mass spectra (SWATH), which shows obvious advantages in continuous and high-throughput acquisition, was selected for MS data acquisition. The retention time, mass accuracy, isotope distribution, and fragment ion matching ratio were used for fast qualitative screening, while the peak areas of characteristic product ions were used for precise quantification. All the calibration curves showed good linearity (r2>0.99) within the tested ranges (5-100 μg/L) under the optimum conditions. The limits of quantification (LOQs) were in the range of 0.05-0.10 mg/kg. The recoveries were in the range of 65.3%-107% at three spiked levels (0.10, 0.20, and 0.60 mg/kg), with relative standard deviations (RSDs, n=6) below 20%. Compared with the existing ion exchange column methods, the proposed "one-step" purification method based on PRiME HLB is simpler and more rapid, where the extraction solution is filtered directly after allowing it to pass through the column, without any subsequent washing and elution procedures. In addition, the LOQs of this method are lower than those of other LC-MS/MS methods, indicating that the proposed method has higher sensitivity. The application of SWATH data acquisition makes it possible to achieve quantification with two pairs of product ions, thus reducing the matrix effect and ensuring accuracy of the quantitative results. Therefore, the proposed method is less time-consuming and operationally convenient, and it can be used for the rapid screening and accurate quantification of antiallergics in lotion samples.