Prenatal and/or childhood acid-suppressive medication use and risk of serious infections in children: A retrospective analysis of Taiwanese medical claims data Authors: Tsung-Chieh Yao, Yu-Lung Hsu, Jing-Long Huang, Yen-Chen Chang, Sheng-Mao Chang, Jen-Jung Pan, Xiumei Hong, Jiu-Yao Wang, Hui-Ju Tsai Published: 2026 ABSTRACT AbstractBackgroundRecent studies suggest an increased risk of serious infections associated with proton pump inhibitor (PPI) use in young children, but no study simultaneously examined the impact of acid-suppressive medication (ASM) use during pregnancy and childhood on infection risk in children. This study aimed to investigate the associations between prenatal and/or childhood exposure to ASMs and serious infections in children.MethodsA national cohort study was conducted based on the entire medical claims data in Taiwan, comparing prenatal and/or childhood exposure to PPIs or histamine-2 receptor antagonists (H2RAs) with antacid exposure in an active-comparator design. We quantified the risks of hospitalization for overall serious infection and specific infections, including sepsis, acute bronchiolitis or bronchitis, pneumonia, acute gastroenteritis, pyelonephritis, cellulitis or soft-tissue infection, meningitis or encephalitis, and septic arthritis or osteoarthritis, among children with prenatal and/or childhood exposure to PPIs or H2RAs. Adjusted hazard ratios (AHRs) with 95% confidence intervals (CIs) were estimated using Cox proportional hazard models.ResultsAmong 195,377 mother-child pairs prenatally exposed to PPIs or H2RAs (13.39% of the prenatal cohort) and 1,263,741 pairs exposed to antacids, prenatal exposure to PPIs or H2RAs was associated with an increased risk of overall serious infection compared with antacid exposure (AHR: 1.09; 95% CI: 1.06–1.12), as well as specific infections, including sepsis (AHR: 1.21; 95% CI: 1.03–1.12), acute bronchiolitis or bronchitis (AHR: 1.07; 95% CI: 1.03–1.11), pneumonia (AHR: 1.10; 95% CI: 1.04–1.15), acute gastroenteritis (AHR: 1.12; 95% CI: 1.06–1.18), and pyelonephritis (AHR: 1.10; 95% CI: 1.02–1.19). Subgroup analyses demonstrated consistent results for PPI and H2RA exposure when analyzed separately. Childhood exposure to PPIs or H2RAs was also associated with increased risks of serious infections, with the highest risks generally observed among children exposed during both prenatal and childhood periods (AHR 1.12 for overall serious infection; AHR 1.62 for sepsis; AHR 1.29 for acute bronchiolitis or bronchitis; AHR 1.06 for pneumonia; AHR 1.30 for acute gastroenteritis; and AHR 1.24 for pyelonephritis).ConclusionsThis nationwide cohort study provides real-world evidence of an association between prenatal and childhood exposure to PPIs or H2RAs and an increased risk of serious infections in children.Keywords: Acid-suppressive medication, Proton pump inhibitor, Histamine-2 receptor antagonist, Serious infection, Children Background Serious infections are a common cause of morbidity and mortality in children worldwide, imposing significant healthcare challenges even in developed countries [1]. Infections, such as sepsis, acute bronchiolitis, pneumonia, gastroenteritis, and pyelonephritis, contribute substantially to pediatric hospitalizations, emergency department visits, and healthcare expenditures, emphasizing the importance of identifying modifiable risk factors to mitigate infection-related burdens [1]. Beyond well-recognized risk factors, such as prematurity and immunodeficiency, growing attention has turned to the potential role of prenatal and childhood exposure to medications that may inadvertently heighten susceptibility to infections in children by disrupting immunological or physiological defenses [2, 3]. For managing gastroesophageal reflux symptoms in pregnant women, antacids such as calcium carbonate are typically used as first-line therapy. Acid-suppressive medications (ASMs), including proton pump inhibitors (PPIs) and histamine-2 receptor antagonists (H2RAs), are commonly prescribed for individuals who do not respond to antacids, including pregnant women and children [4–10]. Although effective in reducing gastric acidity, these medications may attenuate host defense mechanisms against ingested pathogens by altering the gut microbiota, impairing immune cell function, and disrupting the gut-lung axis, and potentially increasing the risk of enteric, respiratory and even systemic infections [3, 11–14]. Emerging evidence links ASM to increased risk of Clostridioides difficile infection, respiratory tract infections, urinary tract infections, skin infections, and even central nervous system infections [15–22]. However, these findings remain inconsistent, and the long-term effects of ASM exposure during critical developmental windows, particularly the prenatal period, remain unexplored. Recently, Lassalle et al. have reported an increased risk of serious infections with PPI use in young children [3], yet no study to date has examined the impact of maternal ASMs use during pregnancy on childhood infection risk. This represents a critical knowledge gap, as the prenatal period is pivotal for immune system maturation which could be disrupted by ASM use during pregnancy. Understanding the associations is essential for guiding evidence-based prescribing practices and mitigating preventable health risks. This study attempted to address this research gap by investigating the associations between prenatal and/or childhood exposure to ASMs and the risk of serious infections in children in a nationwide cohort study using the entire National Health Insurance Research Database (NHIRD) in Taiwan. Methods Data sources A nationwide population-based cohort study was conducted using two databases, specifically, the entire National Health Insurance Research Database (NHIRD) and the Birth Reporting Database (BRD), to identify all Taiwanese pregnant women and their children from January 1, 2001 to December 31, 2023. The NHIRD is comprised of comprehensive information on medical claims records and prescription records for the entire population in Taiwan (approximately 23 million individuals) [23]. The de-identified medical claims records and prescription data from NHIRD and BRD were utilized. The Institutional Review Board of the National Health Research Institutes, Taiwan approved the study protocol (EC1091002-E), and informed consent was waived due to the use of encrypted participant data. This study adheres to the STROBE (strengthening the reporting of observational studies in epidemiology) reporting guidelines [24]. Study cohorts We constructed prenatal and childhood cohorts to evaluate the associations between different classes of ASMs and the risk of serious infections. To minimize confounding by indication, we adopted an active-comparator design and restricted both cohorts to individuals who received any ASM, comparing users of PPIs or H2RAs with users of antacids rather than with non-users. The prenatal cohort included all pregnant women with live births between 1 January 2001 and 31 December 2023. We excluded multiple births, children with congenital anomalies or catastrophic illnesses, children with missing Apgar scores, and women without any ASM prescriptions during pregnancy. The childhood cohort included children who received at least one ASM prescription from birth up to 6 years of age. Children who did not receive any ASM during this childhood exposure window and those who experienced serious infections before ASM prescription were excluded. To account for potential protopathic bias [25], infection events occurring within 7 days after ASM initiation were not counted as outcomes in the analysis. The subject identification process for both cohorts is outlined in Fig. 1. Flow chart of identifying prenatal cohort (A) and childhood cohort (B). ASM acid-suppressive medication, PPI proton pump inhibitor, H2RA histamine 2 receptor antagonist Use of acid-suppressive medications Exposure to ASMs was defined as one or more prescriptions for PPIs, H2RAs or antacids (Anatomical Therapeutic Chemical [ATC] codes A02BC for PPIs; A02BA for H2RAs; and A02A and A02BX13 for antacids). In clinical practice, these drug classes have partially overlapped indications, although PPIs are commonly prescribed for more severe or chronic disease, whereas antacids are typically used for milder or transient symptoms. To reduce confounding by indication, we restricted the study population to individuals treated with any ASM and compared users of PPIs or H2RAs with users of antacids, rather than with non-users. For the prenatal cohort, children exposed to one or more PPIs or H2RAs prescriptions during the prenatal period were classified as the exposure group, whereas those exposed to one or more antacid prescriptions during the prenatal period were defined as the comparative group. For the childhood cohort, childhood ASM exposure was defined as any prescription occurring from birth to 6 years of age. The index date was defined as the date of the first ASM prescription within this exposure window, and ASM prescriptions occurring after 6 years of age were not included. Children exposed to one or more PPIs or H2RAs prescriptions during childhood were classified as the exposure group, whereas those exposed to one or more antacid prescriptions during childhood were classified as the comparative group. Study outcomes The primary outcome of this study was the incidence of hospital admission due to serious infections, specifically overall serious infection, sepsis, acute bronchiolitis or bronchitis, pneumonia, acute gastroenteritis, pyelonephritis, cellulitis or soft-tissue infection, meningitis or encephalitis, and septic arthritis or osteoarthritis. We used primary inpatient diagnosis based on ICD-9-CM codes prior to 2015 and ICD-10-CM codes thereafter to determine each specific category of serious infections (Additional file 1: Table S1) [2, 26]. We defined overall serious infection as requiring hospital admissions due to any of the above specific serious infections. For the prenatal cohort, children were followed up till outcome occurrence, death, or the first 12 months of life, whichever appeared first; and for the childhood cohort, children were followed up till outcome occurrence, death, or the end of the study period, whichever appeared first. Syncope was selected as a negative control outcome because it is not biologically plausibly related to ASM use, which is suitable assessment of internal validity. Covariates The following covariates were controlled for in both prenatal and childhood exposure analyses: maternal age at delivery (years), premature rupture of membranes (yes/no), gestational diabetes (yes/ no), gestational hypertension (yes/ no), maternal mental disorders (yes/ no), maternal immunological disorders (yes/ no) (e.g., systemic lupus erythematosus and rheumatoid arthritis), maternal infectious disorders (yes/ no), and maternal substance abuse (yes/ no), gastroesophageal reflux disease (yes/ no), peptic ulcer disease (yes/ no), functional dyspepsia (yes/ no), Zollinger-Ellison Syndrome (yes/ no), Barrett’s esophagus (yes/ no), Helicobacter pylori infection (yes/ no), use of antibiotics (yes/ no), use of NSAIDs (yes/ no), preterm delivery (yes/ no), delivery year, insurance amount ( < 20,000; 20,000–40,000; 40,000–60,000; ≥60,000 New Taiwan dollars; proxy for social economic status), child’s sex, low birth weight (yes/ no), birth order (1, 2, or ≥3), birth mode (normal spontaneous delivery or caesarean section), and Apgar score (1–3, 4–6, or 7–10; maximum score at 1 and 5 min). Statistical analysis Propensity score analysis We employed overlap weighting, a propensity-score approach, to balance baseline characteristic differences between exposed and comparative groups in the prenatal and childhood cohorts [27]. We estimated the propensity score based on a logistic regression model which regressed on maternal demographic and clinical covariates listed in Table 1, including maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), preterm delivery, delivery year, and insurance amount. We controlled for overlap weighting in the subsequent prenatal and childhood exposure analyses. Table 1Characteristics of study participants in the prenatal exposure cohortBefore overlap weightingAfter overlap weightingPPIs or H2RAsAntacidsSMDPPIs or H2RAsAntacidsSMDn (%)n (%)n (%)n (%)Total subjects (n = 1,459,118)195,377(13.39)1,263,741(86.61)195,377(13.39)1,263,741(86.61)Demographic/ clinical characteristics during pregnancyMaternal age at delivery, year (mean, SD)31.5(4.9)31.1(4.8)0.09431.5(4.9)31.5(4.9)0.000Maternal comorbiditiesPremature rupture of membranes16,744(8.57)118,006(9.34)0.03817,633(9.03)117,472(9.30)0.013Gestational diabetes10,157(5.20)50,484(3.99)0.0818,358(4.28)52,231(4.13)0.010Gestational hypertension9,950(5.09)46,645(3.69)0.0977,983(4.09)47,797(3.78)0.022Mental disorders22,819(11.68)124,612(9.86)0.08318,273(9.35)125,126(9.90)0.026Immunological disorders1,914(0.98)12,681(1.00)0.0031,852(0.95)12,569(0.99)0.007Infectious disorders21,318(10.91)92,841(7.35)0.02815,475(7.92)95,882(7.59)0.018Substance abuse1,039(0.53)5,038(0.40)0.175857(0.44)5,118(0.40)0.007Gastroesophageal reflux disease622(0.32)2064(0.16)0.045367(0.19)2,168(0.17)0.005Peptic ulcer disease223(0.11)427(0.03)0.042119(0.06)450(0.04)0.016Functional dyspepsia284(0.15)1578(0.12)0.008411(0.21)1,636(0.13)0.028Zollinger-Ellison Syndrome2(0.00)2(0.00)0.0050(0.00)2(0.00)0.001Barrett’s esophagus3(0.00)4(0.00)0.0061(0.00)4(0.00)0.000Helicobacter pylori infection1(0.00)0(0.00)0.0051(0.00)0(0.00)0.005Medication during pregnancyAntibiotics115,481(59.11)449,506(35.57)0.94772,446(37.08)472,787(37.41)0.010NSAIDs1528,49(78.23)587,924(46.52)0.35994,730(48.49)618,663(48.95)0.013Preterm delivery17,802(9.11)88,467(7.00)2.93617,228(8.82)89,739(7.10)0.090Insurance amount (NTD, $)*< 20,00018,961(9.70)112,010(8.86)0.02518,295(9.36)112,411(8.90)0.01620,000-40,000119,931(61.38)720,110(56.98)0.127111,992(57.32)723,798(57.27)0.00140,000-60,00034,338(17.58)237,470(18.79)0.04536,403(18.63)237,457(18.79)0.006≥ 60,00022,147(11.34)194,151(15.36)0.16828,686(14.68)190,075(15.04)0.014Demographic/ clinical characteristics at birthFemale95,201(48.73)611,307(48.37)NANALow birth weight**16,108(8.24)77,926(6.17)NANABirth order173,758(39.59)380,622(45.60)NANA292,389(49.59)378,923(45.40)NANA≥ 320,142(10.81)75,149(9.00)NANABirth modeNSD119,037(60.93)832,927(65.91)NANACaesarean section76,340(39.07)430,814(34.09)NANAApgar score1-3192,724(98.64)1,083,608(85.75)NANA4-6928(0.48)2,263(0.18)NANA7-101,684(0.86)176,416(13.98)NANASD standard deviation, NTD new Taiwan dollar, NSD normal spontaneous delivery, PPI proton pump inhibitor, H2RA histamine 2 receptor antagonist, SMD standardized mean difference, NA not available.*Insurance amount: a proxy of social economic status.**Low birth weight was defined as child’s birth weight less than 2,500 g. Characteristics of study participants in the prenatal exposure cohort SD standard deviation, NTD new Taiwan dollar, NSD normal spontaneous delivery, PPI proton pump inhibitor, H2RA histamine 2 receptor antagonist, SMD standardized mean difference, NA not available. *Insurance amount: a proxy of social economic status. **Low birth weight was defined as child’s birth weight less than 2,500 g. Prenatal exposure analysis We computed standardized mean difference (SMD) to assess the balance of characteristic differences at baseline between children exposed to PPIs or H2RAs and those exposed to antacids after overlap weighting in the prenatal and childhood cohorts, respectively [28]. For the prenatal cohort, we estimated incidence rates per 1,000 person-years of each specific category of serious infections (e.g., sepsis, acute bronchiolitis or bronchitis, pneumonia, pyelonephritis, cellulitis or soft-tissue infection, meningitis or encephalitis, and septic arthritis or osteoarthritis) and overall serious infection; and used Cox proportional hazards models with overlap weighting to estimate adjusted hazard ratios (AHRs) with 95% confidence interval (CI) of serious infections during the first 12 months of life. Robust variance estimator was used to control for the intra-individual dependence, and adjusted covariates were described above. We generated Kaplan-Meier plots to scrutinize cumulative incidence of serious infections; and performed the log-rank test to examine whether there was significant difference between two groups during the first 12 months of life. Childhood exposure analysis In the childhood exposure analysis, we examined whether prenatal exposure to ASMs can further affect the association between childhood exposure to various ASMs, specifically PPIs or H2RAs vs. antacids, and the risks of serious infections in children. We further conducted a cohort consistent of children with childhood exposure to ASMs and classified children into four groups: 1.) exposure to antacids in both prenatal and childhood periods (the reference group); 2.) exposure to antacids in prenatal period and exposure to PPIs or H2RAs in childhood period; 3.) exposure to PPIs or H2RAs in prenatal period and exposure to antacids in childhood period; and 4.) exposure to PPIs or H2RAs in both prenatal and childhood periods. Likewise, we applied Cox proportional hazards models with overlap weighting to evaluate the risks of overall serious infection and each specific category of serious infections, respectively, among four groups. In the childhood cohort, follow-up started at the index date, defined as the date of the first childhood prescription of an ASM. Similarly, adjusted covariates were described above. Subgroup and sensitivity analyses We conducted subgroups analyses stratified by the type of ASM exposure (PPIs only or H2RAs only) and the duration of exposure (0, 1–7, or ≥8 days, or 0, 1–14, or ≥15 days); and performed Cox proportional hazards models with overlap weighting and robust variance estimator accordingly. Various sensitivity analyses were performed to test the robustness and validity of the main analyses by excluding maternal serious infections during pregnancy, and using two different follow-up periods: six months and the entire study period. We also calculated E-values, the minimum quantity for estimating unmeasured confounding factors to be associated with both exposure and outcome, to evaluate potential influence of unmeasured confounding [29]. We checked whether assumptions of Cox proportional hazards models were valid by adding product terms of each predictor and function of survival time in the models, and using Kaplan-Meier plot. No significant product terms were found; and the parallel Kaplan-Meier curve was observed (Additional file 1: Figure S1), indicating the assumptions were not violated. A p value less than 0.05 was used to declare statistical significance. All data analyses were conducted using SAS version 9.4 (SAS Institute, Cary, NC, USA). Results Baseline characteristics of the study participants We included 1,459,118 mother-child pairs with prenatal exposure to ASMs (195,377 pairs exposed to PPIs or H2RAs and 1,263,741 pairs exposed to antacids) between January 1, 2001 and December 31, 2023 (Fig. 1). Table 1 presents baseline characteristics of mother-child pairs in the prenatal cohort. After overlap weighting, SMDs of all baseline characteristics were less than 0.1, indicating negligible differences between the two groups (Table 1). Baseline characteristics of study participants in the childhood cohort were shown in Additional file 1: Table S2. The mean (SD) follow-up durations were 0.98 (0.12) years for the PPIs or H2RAs group and 0.98 (0.12) years for the antacids group in the prenatal exposure cohort; and 7.20 (5.85) years for the PPIs or H2RAs groups and 10.23 (6.94) years for antacid groups in the childhood cohort. Prenatal exposure analyses In the prenatal exposure analyses, the incidence rates of serious infections were higher in the PPIs or H2RAs group compared to the antacids group: 80.3 vs. 74.5 per 1000 person-years for overall serious infection; 2.3 vs. 1.8 per 1000 person-years for sepsis; 30.3 vs. 27.7 per 1000 person-years for acute bronchiolitis or bronchitis; 23.8 vs. 22.1 per 1000 person-years for pneumonia; 22.1 vs. 20.2 per 1000 person-years for acute gastroenteritis; and 5.0 vs. 5.0 per 1000 person-years for pyelonephritis (Fig. 2). Other categories of serious infections were shown minimal differences between the two groups: 1.7 vs. 2.1 per 1000 person-years for cellulitis or soft-tissue infection; 0.8 vs. 0.6 per 1000 person-years for meningitis or encephalitis; and 0.2 vs. zero per 1000 person-years for septic arthritis or osteoarthritis. Figure 2 reveals that prenatal exposure to PPIs or H2RAs was positively associated with increased risks of overall serious infection (AHR: 1.09; 95% CI: 1.06–1.12); sepsis (AHR: 1.21; 95% CI: 1.03–1.12); acute bronchiolitis or bronchitis (AHR: 1.07; 95% CI: 1.03–1.11); pneumonia (AHR: 1.10; 95% CI: 1.04–1.15); acute gastroenteritis (AHR: 1.12; 95% CI: 1.06–1.18); and pyelonephritis (AHR: 1.10; 95% CI: 1.02–1.19) (Fig. 2; Additional file 1: Figure S2). Results from the negative control outcome analysis suggested that prenatal exposure to PPIs or H2RAs was not associated with syncope (Fig. 2). Association between prenatal exposure to PPIs or H2RAs and serious infections in children. PPI proton pump inhibitor, H2RA histamine 2 receptor antagonist, PY person-year, RD risk difference, CHR crude hazard ratio, AHR adjusted hazard ratio, CI confidence interval. *Crude models were adjusted by overlap weighting using the propensity score derived from a logistic model that was regressed on maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount. **Adjusted models were adjusted by overlap weighting and further controlled for maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount, child’s sex, low birth weight, birth order, birth mode, and Apgar score (maximum at 1 and 5 min) Childhood exposure analyses In the childhood exposure analyses, children exposed to PPIs or H2RAs during the prenatal period, childhood period, or both periods had higher risks of overall serious infection and several specific infection outcomes, including sepsis, acute bronchiolitis or bronchitis, pneumonia, acute gastroenteritis, and pyelonephritis, compared with children exposed to antacids in both periods (Fig. 3). Across outcomes, the AHRs were generally highest among children exposed to PPIs or H2RAs during both prenatal and childhood periods (Fig. 3). In contrast, no association was observed between exposure to PPIs or H2RAs and syncope, the negative control outcome (Fig. 3). Association between childhood exposure to PPIs or H2RAs and serious infections in children. PPI proton pump inhibitor, H2RA histamine 2 receptor antagonist, CHR crude hazard ratio, AHR adjusted hazard ratio, CI confidence interval. *Crude models were adjusted by overlap weighting using the propensity score derived from a logistic model that was regressed on maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount. **Adjusted models were adjusted by overlap weighting and further controlled for maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount, child’s sex, low birth weight, birth order, birth mode, and Apgar score (maximum at 1 and 5 min) Subgroup analyses When classifying children into two subgroups: exposure to PPIs only and exposure to H2RAs only. Consistent associations were observed when comparing children exposed to PPIs only or H2RAs only with those exposed to antacids. The AHRs were generally higher in the PPIs only group (AHR ranging from 1.14 to 1.62) than the H2RAs only group (AHR ranging from 1.07 to 1.19) (Table 2). Table 2Subgroup analysis, stratified by medication types (PPIs or H2RAs vs. antacids)EventPPIs (n = 11,382)Antacids (n = 1,263,741)CHR (95% CI)*AHR (95% CI)**n (%)n (%)PPIs vs. antacidsOverall serious infection848(7.45)90,984(7.20)1.18 (1.10- 1.26)1.16 (1.08- 1.24)Sepsis19(0.16)2,325(0.18)1.59 (1.10- 2.29)1.62 (1.12- 2.35)Acute bronchiolitis or bronchitis390(3.43)34,557(2.73)1.26 (1.14- 1.40)1.24 (1.12- 1.37)Pneumonia249(2.19)27,729(2.19)1.15 (1.02- 1.30)1.14 (1.01- 1.29)Acute gastroenteritis242(2.12)25,349(2.01)1.24 (1.08- 1.44)1.21 (1.04- 1.41)Pyelonephritis37(0.32)6,283(0.50)0.96 (0.75- 1.23)0.98 (0.76- 1.26)Cellulitis or soft-tissue infection19(0.17)2,672(0.21)0.77 (0.47- 1.24)0.76 (0.46- 1.24)Meningitis or encephalitis5(0.04)787(0.06)1.28 (0.41- 4.02)1.26 (0.39- 4.10)Septic arthritis or osteomyelitis10(0.09)62(0.00)2.40 (0.32- 7.98)2.66 (0.35- 9.02)H2RAs vs. antacidsEventH2RAs (n = 188,513)Antacids (n = 1,263,741)CHR (95% CI)*AHR (95% CI)**n (%)n (%)Overall serious infection14561(7.72)90,984(7.20)1.10 (1.08- 1.12)1.10 (1.08- 1.12)Sepsis437(0.23)2,325(0.18)1.20 (1.07- 1.35)1.19 (1.06- 1.35)Acute bronchiolitis or bronchitis5,572(2.96)34,557(2.73)1.07 (1.04- 1.11)1.07 (1.04- 1.10)Pneumonia4,457(2.36)27,729(2.19)1.10 (1.06- 1.13)1.09 (1.05- 1.13)Acute gastroenteritis4,110(2.18)25,349(2.01)1.16 (1.12- 1.21)1.17 (1.12- 1.22)Pyelonephritis955(0.51)6,283(0.50)1.13 (1.06- 1.20)1.15 (1.08- 1.22)Cellulitis or soft-tissue infection323(0.17)2,672(0.21)0.96 (0.85- 1.08)0.98 (0.87- 1.10)Meningitis or encephalitis153(0.08)787(0.06)1.08 (0.80- 1.46)1.03 (0.73- 1.43)Septic arthritis or osteomyelitis29(0.02)62(0.00)1.04 (0.45- 2.38)0.78 (0.30- 2.05)PPI proton pump inhibitor, H2RA histamine 2 receptor antagonist, CHR crude hazard ratio, AHR adjusted hazard ratio, CI confidence interval.*Crude models were adjusted by overlap weighting using the propensity score derived from a logistic model that was regressed on maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount.**Adjusted models were adjusted by overlap weighting and further controlled for maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount, child’s sex, low birth weight, birth order, birth mode, and Apgar score (maximum at 1 and 5 min). Subgroup analysis, stratified by medication types (PPIs or H2RAs vs. antacids) PPI proton pump inhibitor, H2RA histamine 2 receptor antagonist, CHR crude hazard ratio, AHR adjusted hazard ratio, CI confidence interval. *Crude models were adjusted by overlap weighting using the propensity score derived from a logistic model that was regressed on maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount. **Adjusted models were adjusted by overlap weighting and further controlled for maternal age at delivery, premature rupture of membranes, gestational diabetes, gestational hypertension, maternal conditions (i.e., mental disorders, immunological disorders, infectious disorders, and substance abuse), gastroesophageal reflux disease, peptic ulcer disease, functional dyspepsia, Zollinger-Ellison Syndrome, Barrett’s esophagus, Helicobacter pylori infection, use of antibiotics and NSAIDs, preterm delivery, delivery year, and insurance amount, child’s sex, low birth weight, birth order, birth mode, and Apgar score (maximum at 1 and 5 min). We further stratified children in three cumulative durations of prenatal exposure: 0, 1–7, and ≥8 days, a dose-response relationship was observed for overall serious infection and several specific infection outcomes, including sepsis, acute bronchiolitis or bronchitis, pneumonia, acute gastroenteritis, and pyelonephritis. Children with longer cumulative exposure durations to PPIs or H2RAs exhibited greater infection risks (Additional file 1: Table S3). Similar dose-response relationships were observed when classifying children into three alternative cumulative durations of exposure: 0, 1–14, and ≥15 days (Additional file 1: Table S4). Sensitivity analyses We performed various sensitivity analyses to scrutinize the robustness of main findings by excluding maternal serious infections during pregnancy; and using two alternative follow-up periods in the prenatal cohort (six months and the entire study period). Results from sensitivity analyses were largely consistent with the main findings (Additional file 1: Table S5). The estimated E-values for associations between prenatal exposure to PPIs or H2RAs and the risks of overall serious infection and specific infection outcomes ranged from 1.34 to 1.71, suggesting the magnitude of unmeasured confounding would be required to nullify the observed associations (Additional file 1: Table S6). Discussion Main findings This study is the first, to our knowledge, to simultaneously investigate the association between prenatal and/or childhood exposure to ASMs and the risks of various serious infections in children. Using a large nationwide cohort of 1,459,118 mother-child pairs, where 195,377 (13.39%) children with prenatal exposure to PPIs or H2RA, we demonstrated that prenatal exposure to PPIs or H2RAs was associated with significantly higher incidence rates and hazards of serious infections, including overall serious infection, sepsis, acute bronchiolitis or bronchitis, pneumonia, acute gastroenteritis, and pyelonephritis during the first year of life, compared to those with prenatal exposure to antacids. Childhood exposure to PPIs or H2RAs was also significantly associated with serious infections, with combined prenatal and childhood exposure further heightened the risks, specifically overall serious infection, sepsis, acute bronchiolitis or bronchitis, pneumonia, acute gastroenteritis, and pyelonephritis. Subgroup analyses indicated that prenatal exposure to either PPIs (AHR ranging from 1.14 to 1.62) or H2RAs (AHR ranging from 1.07 to 1.19) both independently increased risks of serious infections in children, with greater risks noted for PPI use. A dose-response relationship was observed, with the duration of PPI or H2RA use exceeding seven days associated with greater risk of serious infections. Together, this study provides novel evidence from a 23-year nationwide cohort, demonstrating real-world associations between prenatal and childhood exposure to PPIs or H2RAs and an increased risk of serious infections in children. Clinical implications Our findings have several important implications. First, although previous studies have reported the increased infection risk associated with ASMs in children and adults [15–22], the potential transgenerational risk of serious infections from prenatal exposure to ASMs has been unnoticed and unexplored yet. This study provides new evidence that prenatal exposure to PPIs or H2RAs is associated with a modestly increased risk of overall serious infection in early childhood (AHR, 1.09), corresponding to an absolute risk difference of 5.8 per 1,000 person-years. While the magnitude of effect is modest at the individual level, it is clinically relevant in the context of common ASM use during pregnancy. These findings are particularly important given that the prenatal period represents a critical window during which maternal exposure can influence the development of immune system and gut microbiota in offspring. Secondly, our findings reinforce the emerging evidence on the adverse effects of PPIs or H2RAs on increasing the risk of serious infections in young children [3]. The childhood exposure analyses further uncover higher risks observed among children exposed during both prenatal and early-childhood periods, underscoring the importance of careful evaluation of ASM use during the two sensitive periods. Third, this study contributes to the growing body of literature regarding the potential adverse effects of ASMs, particularly PPIs and H2RAs, on childhood health, such as inflammatory bowel disease [30], acute kidney injury [31], fracture [32], asthma [33, 34], and allergic diseases [4]. Of particular concern is the association between prenatal and childhood exposure to ASMs and increase susceptibility to serious infections requiring hospitalizations, which poses public health and economic burdens. Fourth, given the widespread use of ASMs during pregnancy and childhood [4–10], clinicians should carefully assess the necessity and duration of ASM therapy, particularly in vulnerable populations. Plausible mechanisms The associations between the use of PPIs or H2RAs, and increased risks of serious infections in infants and children are supported by several biological mechanisms. First, PPIs and H2RAs reduce gastric acidity, which is a primary defense mechanism against ingested pathogens. The reduced acidity allows harmful pathogens to survive and colonize in the gastrointestinal tract, thereby elevating the risk of gastrointestinal infections [3]. Secondly, childhood exposure to PPIs can disrupt the composition of the gut microbiota during a critical period of immune system development [12, 35–37]. This dysbiosis can impair immune system maturation and reduce the ability to effectively combat infections in infants and children [36, 38, 39]. Third, previous studies have also demonstrated that PPIs may disrupt the respiratory flora by causing pH dysregulation in the respiratory tract, increasing the risk of respiratory infections [40, 41]. Fourth, PPIs have been shown to impair the function of neutrophils and monocytes, which are key components of the immune system responsible for defending against infections [3, 42, 43]. Fifth, previous studies have shown that maternal features during pregnancy and lactation may influence the gut microbiome and its metabolites, shaping offspring’s immune development and long-term immunity [44–46]. PPIs and H2RAs may alter the maternal gut microbiota during pregnancy by disrupting natural gastric acidity, potentially affecting initial microbial colonization in infancy and increasing vulnerability to infections [39]. Strengths and limitations This study has several notable strengths. First, we utilized large population-based data, providing robust statistical power to address an important research gap regarding the impact of prenatal and childhood exposure to PPIs and H2RAs on the risk of serious infections in children. Secondly, the findings offer real-world evidence that can inform future drug safety communications about the prenatal and childhood use of PPIs and H2RAs. Third, we accounted for a wide range of covariates, and applied overlap weighting to minimize baseline differences between groups and ensure balanced comparison. This study also has some limitations. First, ASM use was estimated from filled prescriptions, making it impossible to confirm actual medication adherence and potentially leading to exposure misclassification. In addition, although PPIs and H2RAs are predominantly regulated as prescription-only medications in Taiwan, a very limited number of low-dose formulations are available over-the-counter, therefore are not captured in medical claims data. Such misclassification is expected to be minimal and largely non-differential, as over-the-counter use of PPIs or H2RAs is uncommon particularly among pregnant women and children, and would most likely occur in the comparator (antacids) group. Secondly, as with all observational studies, unmeasured residual confounding cannot be entirely ruled out. Despite employing rigorous approaches (e.g., overlap weighting and robust variance estimation) to account for potential unmeasured residual confounding and intra-individual dependence, the results should be interpreted with caution. Third, we were unable to include certain factors, such as educational data and body mass index, because these data are not available in the NHIRD. However, the inclusion of related factors, such as gestational diabetes and gestational hypertension (correlated with body mass index) and socioeconomic status (correlated with education), likely eases their potential confounding effects to some extent. Fourth, coding errors are an inherent limitation in all register-based studies. Given that the outcomes are restricted to serious infections requiring hospitalization, outcome validity is likely to be relatively high. However, outcome misclassification due to differences in healthcare utilization, disease severity, or reimbursement-driven coding practices may differentially affect exposure groups. Fifth, although we restricted the study population to individuals treated with PPIs, H2RAs or antacids, differences in underlying disease severity and treatment intent between users of PPIs or H2RAs and antacids may still introduce confounding by indication. Sixth, the use of the entire study period as the follow-up duration in the childhood cohort may have increased susceptibility to exposure misclassification, as comparator patients treated with antacids may subsequently initiate PPIs/H2RAs during prolonged follow-up, which may lead to asymmetric misclassification and attenuation of the observed associations. Seventh, this study used medical claims data from one country, Taiwan. While this study provides valuable insights, future investigations are needed to validate and generalize these findings across diverse populations. Conclusions This nationwide population-based cohort study provides compelling real-world evidence linking prenatal and childhood exposure to PPIs or H2RAs with a 1.03–1.65-fold increased risk of serious infections in children, including overall serious infection, sepsis, acute bronchiolitis or bronchitis, pneumonia, acute gastroenteritis, and pyelonephritis. These findings illustrate the importance of cautious prescribing practices for PPIs and H2RAs during pregnancy and childhood. Clinicians should carefully evaluate the necessity and duration of ASM therapy in pregnant women and children to minimize potential risks and safeguard child health. Supplementary information Additional file 1: Figure S1–Figure S2. Table S1–Table S6. Acknowledgements This study is based in part on data from the National Health Insurance Research Database provided by the Bureau of National Health Insurance of the Ministry of Health and Welfare, Taiwan. The interpretation and conclusions contained in this article do not represent those of the Bureau of National Health Insurance or the Ministry of Health and Welfare. We thank staff members in the Health and Welfare Data Center, Taiwan’s Ministry of Health and Welfare, for their data management and maintenance. Abbreviations adjusted hazard ratio acid-suppressive medication Anatomical Therapeutic Chemical Birth Reporting Database confidence interval histamine-2 receptor antagonist international classification of diseases, ninth revision, clinical modification international classification of diseases, tenth revision, clinical modification National Health Insurance Research Database proton pump inhibitor standardized mean difference strengthening the reporting of observational studies in epidemiology Author contributions T-CY and H-JT had full access to all data in the study and take responsibility for the integrity of the data and the accuracy of the data analysis. T-CY and H-JT conceived concept and design, supervised the study, and obtained funding. Y-CC, S-MC, and H-JT did data analysis. T-CY, Y-LH, J-JP, XH, J-LH, J-YW, and H-JT participated data interpretation. T-CY, Y-LH, and H-JT drafted the manuscript. All authors reviewed the manuscript for important intellectual content, approved the manuscript and made the final decision for submission. Funding This work was supported by grants from National Health Research Institutes, Taiwan (PI: Tsai, PH-114-PP-08), National Science and Technology Council of Taiwan (PI: Tsai, NSTC 111-2314-B-400-040-MY3; and Yao, NSTC 112-2314-B-182-030-MY3 and NSTC 114-2321-B-182-005), and Chang Gung Medical Foundation (PI: Yao, OMRPG3Q0031). Data availability De-identified participant data the NHIRD of Taiwan are centralized and managed by the Health and Welfare Data Center, Taiwan’s Ministry of Health and Welfare. No additional data are available. Declarations Ethical approval and consent to participate The study protocol was approved by the Institutional Review Board of the National Health Research Institutes, Taiwan (EC1091002-E), and informed consent was waived because all data were encrypted. Consent for publication Not applicable. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Contributor Information Tsung-Chieh Yao, Email: yao@adm.cgmh.org.tw. Hui-Ju Tsai, Email: tsaihj@nhri.edu.tw. Supplementary information The online version contains supplementary material available at 10.1186/s12916-026-04951-4. References Associated Data Supplementary Materials Additional file 1: Figure S1–Figure S2. Table S1–Table S6. Data Availability Statement De-identified participant data the NHIRD of Taiwan are centralized and managed by the Health and Welfare Data Center, Taiwan’s Ministry of Health and Welfare. No additional data are available.