In the Google AdWords API, I believe Keyword IDs and AdGroup IDs (and obviously Campaign IDs) are unique within an account (as opposed to the Keyword ID only being unique within
To my agony, today I discovered that the Keyword Id is not unique for a keyword+match type even within an account. I manage multiple Adwords accounts and all my scripts were based on the assumption that the Keyword Id uniquely defined the "keyword text" and "match type" combo. I had validated this to be true in a few accounts some time ago.
But today I found some anomalies in reports for one account and when I dug deep I discovered that the same keyword+match type has multiple keyword ids within the same account. In fact in some cases I found 5 different ids for a combo.
Attaching a screenshot of one such instance
This may be a bit late, but here's what I found regarding keyword/criterion IDs. Take it with a grain of salt, but I think it's not too far from reality:
The keyword itself as an object comprising text and match type (or other attributes depending on the type of criterion) has an AdWords-wide unique ID. This means that whenever you use the keyword "supercalifragilisticexpialidocious" with match type "BROAD", it will always have the same ID.
However, only in combination with an ad group ID it is possible to define attributes such as CPC, status, approval status, etc. To continue the above example, if you have that keyword in two different AdWords accounts using different CPCs, the keyword IDs themselves are still identical—the information about CPCs is saved separately from the keyword itself.
This corresponds pretty well to the type hierarchy in the WSDL: The AdGroupCriterionService returns AdGroupCriterion objects which themselves contain Criterion objects. Information about bids, status, etc. is available on the AdGroupCriterion object while the keyword information itself is inside the Criterion object (which may be shared by other AdGroupCriterion objects)
[update] At an Adwords workshop, Google said it was "most likely" that new keywords with the same text and match type as an existing one would use the same criterion ID, but it's not guaranteed. See @eshwar's answer for an example where same keywords have different IDs.
Tector's answer is great--adding this because the documentation Tector links to has since been updated to clarify a point of confusion.
Globally unique entities are:
'Globally', according to the documentation, means unique across accounts.
Some of these IDs are unique on a global level across all AdWords accounts, while others are unique only within a confined scope.
From: https://developers.google.com/adwords/api/docs/guides/working-with-objects
I've always found them to be unique, but you shouldn't count on it because Google doesn't actually guarantee that they are. I asked the same question in the official AdWords API forum a few years ago:
http://groups.google.com/group/adwords-api/browse_thread/thread/5383edba772b7b6c/548e04f54b1d4a74?hl=en&q=#548e04f54b1d4a74
concerning campaign id, adgroup id, ad id and keyword id (criterion id) the clear and exact answer is to be found in the adwords api docs: https://developers.google.com/adwords/api/docs/guides/working-with-objects
It says that only campaign id and adgroup id are globally unique. Because there is no word said about accounts i think global is meant to be as 'per account'. I don't think there is something unique across different accounts.