The Pied Piper of Hamelin is from the imagination.
In 1985 Robert Browning's poetic retelling of the story was adapted as an episode of Shelley Duvall's Faerie Tale Theatre starring Eric Idle as the Piper, and as Robert Browning in the prologue and epilogue, who narrates the poem to a young boy
 It is a loose adaptation of the Brothers Grimm tale where the Pied Piper uses the rats for his revenge to kill all the villagers except for the children whom he traps in a cave

