 There are two kidneys located dorsally , near the roof of the body cavity . Their job is to filter the blood of metabolic waste and transport the urine via ureters to the urinary bladder where it is stored before being passed out periodically through the cloacal vent . Larvae and most aquatic adult amphibians excrete the nitrogen as ammonia in large quantities of dilute urine , while terrestrial species , with a greater need to conserve water , excrete the less toxic product urea . Some tree frogs with limited access to water excrete most of their metabolic waste as uric acid . 
