The Giants acquired infielder Osleivis Basabe from the Rays in exchange for cash, according to announcements from both teams.