"The Golden Bird" is a Brothers Grimm fairy tale, number 57, about the pursuit of a golden bird by a king'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. Another tale of this type is Tsarevich Ivan, the Firebird and the Gray Wolf.
Every year, a king's apple tree is robbed of one golden apple during the night. He sets his 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 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.
The fox removes it, and then, as they set out, he advises the prince how to keep all the things he has won. It then asks the prince to shoot it and cut off its head. When the prince refuses, it warns him against buying gallowsflesh and sitting on the edge of wells.
He finds that his brothers, who have been carousing and living sinfully in the meantime, are to be hanged (on the gallows) and buys their liberty. They find out what he has done. When he sits on a well's edge, they push him in. They take the things and the princess and bring them to their father. However the bird, the horse, and the princess all grieve for the prince. The fox rescues the prince. When he returns to his father's castle dressed in a beggar's cloak, the bird, the horse, and the princess all recognize him as the man who won them, and become cheerful again. His brothers are put to death, and he marries the princess.
Finally, the third son cuts off the fox's head and feet at the creature's request. The fox is revealed to be a man, the brother of the princess.