The reported incidence of acute hepatitis C virus (HCV) infection is increasing among persons of childbearing age in the United States. Infants born to pregnant persons with HCV infection are at risk for perinatal HCV acquisition. In 2020, the United States Preventive Services Task Force and Centers for Disease Control and Prevention recommended that all pregnant persons be screened during each pregnancy for hepatitis C. However, there are limited data on trends in hepatitis C testing during pregnancy. We estimated hepatitis C testing rates in a large cohort of patients with Medicaid and commercial insurance who gave birth during 2015-2019 and described demographic and risk-based factors associated with testing. Medicaid and commercial insurance claims for patients aged 15-44 years and who gave birth between 2015 and 2019 were included. Birth claims were identified using procedure and diagnosis codes for vaginal or cesarean delivery. Hepatitis C testing was defined as an insurance claim during the 42 weeks before delivery. Testing rates were calculated among patients who delivered and among the subset of patients who were continuously enrolled for 42 weeks before delivery. We also compared the timing of testing relative to delivery among patients with commercial or Medicaid insurance. Multivariable logistic regression was used to identify factors associated with testing. Among 1,142,770 Medicaid patients and 1,207,132 commercially insured patients, 175,223 (15.3%) and 221,436 (18.3%) were tested for hepatitis C during pregnancy, respectively. Testing rates were 89,730 (21.8%) and 187,819 (21.9%) among continuously enrolled Medicaid and commercially insured patients, respectively. Rates increased from 2015 through 2019 among Medicaid (from 20,758/108,332, 19.2% to 13,971/52,330, 26.8%) and commercially insured patients (from 38,308/211,555, 18.1% to 39,152/139,972, 28%), respectively. Among Medicaid patients, non-Hispanic Black (odds ratio 0.73, 95% CI 0.71-0.74) and Hispanic (odds ratio 0.53, 95% CI 0.51-0.56) race or ethnicity were associated with lower odds of testing. Opioid use disorder, HIV infection, and high-risk pregnancy were associated with higher odds of testing in both Medicaid and commercially insured patients. Hepatitis C testing during pregnancy increased from 2015 through 2019 among patients with Medicaid and commercial insurance, although tremendous opportunity for improvement remains. Interventions to increase testing among pregnant persons are needed.