Cardiopulmonary resuscitation (CPR) is a core therapy to treat out-of-hospital cardiac arrest (OHCA). Thoracic impedance (TI) can be used to assess ventilations during CPR, but the signal is also affected by chest compression (CC) artifacts. This study presents a method for TI-based ventilation detection during concurrent manual CCs. Data from 152 OHCA patients were analyzed. A total of 423 TI segments of at least 60 s during ongoing CCs were extracted. True ventilations were annotated using the capnogram. The final dataset comprised 1210 min of TI recordings and 9665 ground truth ventilations. A three-stage detection algorithm was developed. First, the TI signal was filtered to obtain ventilation waveforms, including a least mean squares filter to remove artifacts due to CCs. Potential ventilations were then identified with a heuristic detector and characterized by a set of 16 features. These were finally fed to a random forest classifier to discriminate between true ventilations and false positives. Patients were split into 100 distinct training (70%) and test (30%) partitions. The median (interquartile range) sensitivity, PPV and F-score were 83.9 (70.2-91.2) %, 86.1 (75.0-93.3) % and 84.3 (72.1-91.4) %. Our method would allow feedback on ventilation rates as well as surrogate measures of insufflated air volume during CPR.