The bloodshed underscored the difficulties facing Iraq's leadership as it struggles to keep its citizens safe. Authorities had increased security in hopes of preventing attacks during the four-day Eid al-Adha celebrations, when people are off work and families gather in public places.
The deadliest blast happened on the outskirts of Baghdad and struck near playground equipment that had been set up for the holiday in a market in the eastern neighbourhood of Bawiya.
Police officials said eight people were killed, including four children. Another 24 people, including children, were wounded, they added.
"Nobody expected this explosion because our neighbourhood has been living in peace, away from the violence hitting the rest of the capital," said Bassem Mohammed, a 35-year-old father of three in the neighbourhood who was startled by the blast.
"We feel sad for the children who thought that they would spend a happy time during Eid, but instead ended up getting killed or hurt."
Elsewhere, a bomb attached to a bus carrying Iranian Shiite pilgrims killed five people and wounded nine, according to police. The bomb, hidden on the underside of the bus, detonated as the pilgrims were heading to a Shiite shrine in Baghdad to mark the holiday.