Bonding wire for semiconductor devices containing one or more of Be, B, Ca, Y, La, and Ce in a total of 0.031 at % to 0.180 at %, further containing one or more of In, Ga, and Cd in a total of 0.05 at % to 5.00 at %, and having a balance of Ag and unavoidable impurities, wherein when defining the ratio of the total of the number of atoms of In, Ga, and Cd with respect to the number of atoms of the metal elements as the second element atomic ratio, the bonding wire satisfies one or both of
- (A) the second element atomic ratio at a region from the wire surface to 1 nm from the wire surface in the depth direction is 1.1 times or more the second element atomic ratio at a region from 1 nm from the wire surface to 10 nm from the wire surface in the depth direction, and
- (B) the second element atomic ratio at a region from the wire surface to 10 nm from the wire surface in the depth direction is 2 times or more the second element atomic ratio at a region from 20 nm from the wire surface to 30 nm from the wire surface in the depth direction.