Gay, bisexual and other men who have sex with men (GBMSM) and transgender individuals face heightened risks of HIV and other sexually transmitted infections (STIs). Surveillance within these populations is critical, and community testing services play a pivotal role in preventing and controlling HIV and STIs. This study investigates the trends in HIV, syphilis and hepatitis C (HCV) infections among participants in an apps-driven rapid test program from 2016 to 2023 in Barcelona, Spain, examining associated factors. Trend analysis utilized Wilcoxon-type test and associated factors were determined through multivariate logistic analysis. The prevalence of new HIV diagnosis was 1.81% (CI 1.18–2.64), active syphilis was 3.37% (CI 2.46–4.50) and acute HCV was 0.40% (CI 0.11–1.02). While infection rates showed no significant changes, there was significant increasing in sex work and chemsex and decreasing in condom use. Additionally, a peak in dating apps use for sex and a specific reduction in number of sexual partners were observed in 2020. Factors associated with HIV diagnoses included migrant status (aOR = 11.19; CI 2.58–48.53) and inconsistent condom use during the previous 12 months (aOR = 3.12; CI 1.02–9.51). For syphilis, associated factors were migrant status (aOR = 2.46; CI 1.14–5.29), inconsistent condom use (aOR = 3.38; CI 1.37–8.36), and chemsex practice during the previous 12 months (aOR = 2.80; CI 1.24–6.30). Our findings emphasize the need for tailored interventions, including culturally sensitive outreach for migrants and comprehensive strategies addressing substance use in sexual contexts. Technological innovations and targeted educational initiatives could reduce the burden of HIV and STIs within the GBMSM and transgender communities, providing valuable insights for public health strategies.