"The Golden Bird" is a Brothers Grimm fairy tale, number 57, about the pursuit of a golden bird by a gardener's three sons.
A French version, collected by Paul Sébillot in Littérature orale de la Haute-Bretagne, is called Le Merle d'or (The Golden Blackbird). Andrew Lang included that variant in The Green Fairy Book (1892).
It is Aarne-Thompson folktale type 550, "The Golden Bird", a Supernatural Helper. Other tales of this type include The Bird 'Grip', The Greek Princess and the Young Gardener, Tsarevitch Ivan, the Fire Bird and the Gray Wolf, How Ian Direach got the Blue Falcon, and The Nunda, Eater of People.
Every year, a king's apple tree is robbed of one golden apple during the night. He sets his gardener's sons to watch, and though the first two fall asleep, the youngest stays awake and sees that the thief is a golden bird. He tries to shoot it, but only knocks a feather off.
The feather is so valuable that the king decides he must have the bird. He sends his gardener's three sons, one after another, to capture the priceless golden bird. The sons each meet a talking fox, who gives them advice for their quest: to choose a bad inn over a brightly lit and merry one. The first two sons ignore the advice and, in the pleasant inn, abandon their quest.
The third son obeys the fox, so the fox advises him to take the bird in its wooden cage from the castle in which it lives, instead of putting it into the golden cage next to it. But he disobeys, and the golden bird rouses the castle, resulting in his capture. He is sent after the golden horse as a condition for sparing his life. The fox advises him to use a leather saddle rather than a golden one, but he fails again. He is sent after the princess from the golden castle. The fox advises him not to let her say farewell to her parents, but he disobeys, and the princess's father orders him to remove a hill as the price of his life.