I think if you got that data from the API your cleaning must have gone wrong somewhere. You've lost all information to figure out which rating and which title go with which movie besides column order.
But anyway, you can do it like this:
library(dplyr)
library(tidyr)
data %>%
gather(variable, value) %>%
mutate(ID = rep(1:3, length.out = n() ) ) %>%
spread(variable, value)