The European Union is negotiating a framework that could allow US authorities to search national databases across much of the bloc as the price for keeping visa-free travel.