Sometimes all you have to go on is the words.
If you have a broadside, usually it will give you a trail you can follow to get the whole song, though it takes a bit of labor and a little research is the only way to arrive at a work.
However, fortunately we have The Internet!
For example, the broadside “The Bloody Murder of John Barley-Corn” is to be sung “to the tune of Shall I lie Beyond Thee.” It says so right here: http://ebba.english.ucsb.edu/ballad/20199/image
Searching that tune “Shall I lie Beyond Thee” brings a link to a Google book saying that it’s the same tune as “Lulle Me Beyond Thee” which you can find on video on YouTube https://www.youtube.com/watch?v=U6O5eu4iGwM or in Playford’s Dancing Master (http://abcnotation.com/tunePage?a=trillian.mit.edu/~jc/music/book/Playford/LulleMeBeyondThee/0000)
You then must put the tune to the lyrics provided in the broadside: http://ebba.english.ucsb.edu/ballad/20199/image
to get the song as a whole thing.
It makes more sense when you think of it this way – in period people wrote lyrics to stuff everyone knew more or less. So it would be like me writing a song “Dance Among the Market Urchins sung to the tune of California Girls.”
But that’s how it’s done!