BackgroundThe field of gynaecological immunology has increasingly focused on recurrent spontaneous abortion (RSA). The complex mechanisms underlying the interaction between RSA and cancer are not well understood. MethodsWeighted gene coexpression network analysis (WGCNA), single-cell RNA sequencing (scRNA-seq), and machine learning algorithms were used for the analysis of RSA decidua samples to identify the hub genes. The expression and distribution of the hub genes were subsequently investigated via the pancancer database TCGA. A prognostic prediction was made to assess the impact of the hub genes on the cancer response, mutation burden, immune microenvironment, immune checkpoint, and chemotherapy. In vitro assays were performed to determine whether SLC8A1 influences HTR-8/SVneo cell proliferation, apoptosis and the concentration of calcium ions. ResultsSLC8A1 was identified as a hub gene within RSA and was highly expressed in uterine corpus endometrial carcinoma (UCEC). The efficacy of SLC8A1 as a predictive marker was substantiated by calibration curves and the concordance index. The mutation rate of SLC8A1 was found to be 6% on the basis of the waterfall plot. Immune analysis revealed notable differences in the fractions of T cells and macrophages between the high- and low-expression groups. Patients classified in the low-risk group exhibited enhanced responsiveness to osimertinib, dasatinib, and ibrutinib. The results of in vitro experiments revealed that SLC8A1 promotes proliferation and inhibits the apoptosis and concentration of calcium ions in HTR-8/SVneo cells. ConclusionThese findings suggest that SLC8A1 may serve as a promising prognostic biomarker and potential target for immunotherapy in the context of RSA and UCEC.