International travelers coming into JFK and Newark airports have been getting through customs faster since automated kiosks were introduced, an analysis has found.

Wait times at terminals with the kiosks — where passengers swipe their passport, answer questions and get a receipt before interacting with a customs agent — dropped 22 percent, or an average of six minutes, says a study by Global Gateway Alliance, an airport advocacy group.

“The bottom line is, the kiosks have worked to dramatically improve a situation that was hurting the New York and U.S. brand,” said Joe Sitt, chairman of the Global Gateway Alliance. “But the federal government needs to step up and bring the technology and manpower necessary to every international terminal.”

JFK’s Terminal 4 — which had the longest lines in 2013 — saw wait times drop 32 percent, from 27.4 minutes to 18.7 minutes said.

Overall, fliers who came through JFK spent an average of nearly 5¹/₂ minutes less on line in 2014 than they did in 2013, when waits were more than 27 minutes.

The drop came even as the number of passengers coming through JFK rose by almost half a million.

Newark customs waits fell more than a minute, to 19 minutes.

The two airports have gotten almost 150 of the kiosks since October 2013.