The response from Nominatim has the `importance` field - essentially the "bigger" the place, the higher it scores.
scores. The Russian Petersburg is rated higher than the others.
Also, if you're expecting results to come *primarily* from a specific area, you set the `viewbox` request field; or even set `bounded=1` if you *only* want your results to come from the viewbox area.
As for detecting "which of the Petersburgs is where": you can check the coordinates, which is not very precise.
Alternatively, you can pass the request field `addressdetails=1`, which will give you a hierarchy - checking the `address.country_code` might be sufficient here.
See the documentation at [http://wiki.openstreetmap.org/wiki/Nominatim][1] for more options.
[1]: http://wiki.openstreetmap.org/wiki/Nominatim