An apparatus to ionize molecules at atmospheric pressure carried by a flow of sample gas, and to transfer the resulting ions into the inlet of an analyzer for analysis, said apparatus comprising: an ionization chamber comprising a sample gas inlet to introduce said flow of sample gas, a set of inner walls, and a source of charging ions, wherein the apparatus is configured such that said molecules react with said charging ions to form sample ions in an ionization region; a flow deflector arranged between said source of charging ions and the inlet of said analyzer, said flow deflector comprising an orifice aligned with said inlet of said analyzer and having an edge, a groove carved in the side of the flow deflector that is facing the ionization chamber and a corner; a clean gas inlet arranged to introduce, through an opening located above said groove or said corner, a flow of clean gas in a space between said flow deflector and the inlet of said analyzer; the flow detector configured to accelerate said flow of clean gas towards the inlet of said analyzer; wherein said source of charging ions is configured to produce charging ions moving in a predominant direction such that the interaction between said charging ions and the surrounding gas induces the formation of a toroidal vortex that sucks the sample gas towards the ionization region; wherein the size of the groove matches the size of said toroidal vortex to lock said vortex in a fixed position, and the corner has high curvature to induce the detachment of said vortex at a fixed and controlled position, such that the flow of clean gas detaches at said edge of said orifice so as to create an interface between said flow of clean gas and said flow of sample gas in said orifice, the apparatus configured such that said sample ions pass through said interface in said orifice, and the accelerated flow of clean gas guides said sample ions into said inlet of said analyzer. an ionization chamber comprising a sample gas inlet to introduce said flow of sample gas, a set of inner walls, and a source of charging ions, wherein the apparatus is configured such that said molecules react with said charging ions to form sample ions in an ionization region; a flow deflector arranged between said source of charging ions and the inlet of said analyzer, said flow deflector comprising an orifice aligned with said inlet of said analyzer and having an edge, a groove carved in the side of the flow deflector that is facing the ionization chamber and a corner; a clean gas inlet arranged to introduce, through an opening located above said groove or said corner, a flow of clean gas in a space between said flow deflector and the inlet of said analyzer; the flow detector configured to accelerate said flow of clean gas towards the inlet of said analyzer; wherein said source of charging ions is configured to produce charging ions moving in a predominant direction such that the interaction between said charging ions and the surrounding gas induces the formation of a toroidal vortex that sucks the sample gas towards the ionization region; wherein the size of the groove matches the size of said toroidal vortex to lock said vortex in a fixed position, and the corner has high curvature to induce the detachment of said vortex at a fixed and controlled position, such that the flow of clean gas detaches at said edge of said orifice so as to create an interface between said flow of clean gas and said flow of sample gas in said orifice, the apparatus configured such that said sample ions pass through said interface in said orifice, and the accelerated flow of clean gas guides said sample ions into said inlet of said analyzer.