They said a suicide car bombing followed by a car bomb struck near a police checkpoint in a crowded area of eastern Baghdad, also wounding at least 52 people.
At least two of the dead were policemen.
There was no immediate claim for the attack but suicide bombings are a hallmark of Sunni extremists, including those from the Islamic State (IS) jihadist group.
IS-led militants overran swathes of Iraq in June, and security forces, Shiite militias and Kurdish fighters have been battling to regain ground.
Kerry's previously unannounced visit in Baghdad was the first stop on a regional tour to build support for a new US strategy, which he has said will only work with the backing of the "broadest possible coalition of partners around the globe.