Hi James,
Thanks for posting your concern.
To get you started with your script, you may refer to the sample code below. The sample code will retrieve all the keywords in your account using the keyword's
selector and
iterator. Then, by using the
getFirstPageCpc() method, you will get the corresponding first page bid for the specific keywords. You can use the returned value of the
getFirstPageCpc() method as a condition for setting different max cpc for keywords. Lastly, by using the
setCpc() method and by putting a value to this method, you could change the max cpc of the keywords.
function main(){
var keywordSelector = AdsApp
.keywords();
var keywordIterator = keywordSelector.get();
while (keywordIterator.hasNext()) {
var keyword = keywordIterator.next();
var firstPositionBid = keyword.getFirstPageCpc();
//Continue your code here
//Use the firstPositionBid variable in the conditions for setting different values of max Cpc
//Uncomment the line below for setting new Max Cpc
//keyword.bidding().setCpc('Set new max cpc here');
}
}
With regard to your concern on actual bidding, I'm afraid that this is already a product related question. With this, you may try to post your second question to
Google Ads Help Community to get further support from the Google Ads product team as they are more equipped to provide support to this.
Hope this will help.
Regards,
Ejay
Google Ads Scripts Team

ref:_00D1U1174p._5001UODHGy:ref