Background: The administration of either alfentanil or sufentanil as a single injection, combined with target-controlled infusion (TCI) of propofol, represents a frequently employed anesthetic regimen for daytime hysteroscopy.Objectives: This study was designed to evaluate and compare the safety and efficacy of alfentanil and sufentanil in the context of daytime hysteroscopy.Design: A total of 160 patients, scheduled for daytime hysteroscopy, were randomly allocated into two groups: Group A and Group S respectively received alfentanil 10 mu g/kg or sufentanil 0.15 mu g/kg as a single intravenous injection. Both groups were given propofol with TCI for sedation.Methods: Monitoring of vital signs was conducted from pre-anesthesia through to 2 h postoperatively. The primary outcome measured was hypoxemia, defined as SpO2 levels below 92% for a duration of 30 s, which necessitated manual positive pressure ventilation. Secondary outcomes included various perioperative complications, such as postoperative nausea and vomiting (PONV) occurring 2 h after surgery, as well as hemodynamic indicators, NRS scores for pain, and other anesthesia-related data. This comprehensive dataset was meticulously documented and subsequently analyzed for comparative purposes.Results: The analyses revealed that Group A had a significantly lower incidence of hypoxemia (p = 0.002) and PONV (p = 0.021). Additionally, group A demonstrated overall more stable blood pressure and heart rate, as well as higher SpO2 levels.Conclusion: For daytime hysteroscopy, alfentanil at a dose of 10 mu g/kg is safer than sufentanil at a dose of 0.15 mu g/kg when combined with propofol TCI.Trial registration: This study was registered with the Chinese Clinical Trial Registry (The URL of registration is https://www.chictr.org.cn/showproj.html?proj=177784; registration number: ChiCTR2200063939). The date of first registration was September 21, 2022.