Heaney, 21, represented both Scotland and England as a youth international, and won eight caps at Under 18s level for the Three Lions.
He was released by the Magpies in the summer of 2018, signing for local non-league side Newcastle Benfield and then West Auckland.
A club spokesperson said: “The Whitby Town management have had to act quickly to get this deal over the line and he promises to be an exciting acquisition for the Seasiders.”
Keep up-to-date with our exclusive email newsletters.
Subscribe