The PHP client library contains a few examples that should help.
- AddAdGroups.php shows how to create an ad group and set its max CPC bid to 1,000,000 micros (e.g., $1 if the account uses US currency).
- AddKeywords.php shows how to add a keyword with a max CPC bid of 5,000,000 micros (e.g., $5 if the account uses US currency).
In both cases, you simply need to set up a
BiddingStrategyConfiguration with the appropriate
bids collection. If you have existing ad groups or keywords where you want to update the bid, you can pass in the same information with the
SET operator (see
UpdateAdGroup.php).
Also, you mentioned setting the max content CPC. Just to be clear, on a given campaign you won't be able to set up a different bid for Search vs. Display (content) network. The bidding options for the different campaign types are as follows:
- Search Network only - Manual and automated bidding on Search
- Search Network with Display Select - Manual and automated bidding on Search, only automated bidding on Display (see the Help Center)
- Display Network only - Manual and automated bidding on Display
Therefore, when you set the ad group or keyword's bids as described above, you won't specify if the bid is for Search or Display (content), since that will be implied by the campaign type.
Cheers,
Josh, AdWords API Team