Phantom Hourglass and Spirit Tracks
The Yellow Potion first appears in both Phantom Hourglass and Spirit Tracks. When Link consumes it, it restores all of his hearts; however, it does not work automatically like the Purple Potion, and thus must be used before his death. These potions can be purchased in certain shops or occasionally found in Treasure Chests.
In Phantom Hourglass, the Yellow Potion is found in the Goron Island Shop for 150 Rupees, or on Beedle's Masked Ship for 200 Rupees. The Goron Country Store and Papuchia Village Shop both sell Yellow Potion in Spirit Tracks for 200 Rupees.
A Link Between Worlds
The Yellow Potion can be bought at the Witch's House once Link has obtained a Bottle and 10 Monster Horns. The Potion costs 100 rupees and makes Link invincible for 15 seconds if he has obtained the Stamina Scroll.