French Interior Minister Bernard Cazeneuve welcomed the deal as a "precious tool" to strengthen European security by making it easier to detect the movements of suspected Islamic militants ahead of time.
Some left-wing groups opposed the measure, arguing that it infringed people's privacy and that security forces should share more existing information instead.
"There is no proof that the mass collection and storage of air passenger data helps in combating terrorism," said Jan Albrecht, a member of parliament from the Greens group.
Thursday's vote paves the way for the final adoption of the law by EU member states.
"PNR is not a silver bullet but countries that have national PNR systems have shown time and again that it is highly effective," Timothy Kirkhope, a European parliamentarian who steered the legislation to adoption, said after the vote.
PNR includes name, travel dates, itinerary, ticket details, contact details, travel agent, means of payment, seat number and baggage information.