Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create ads using google adwords API?

Basically, I have a list of keywords, such as:

- red balloons
- free red balloons
- buy red balloons
- blue balloons
- ....

for each keyword, I have a list of 3-4 ads, each ad consisting of a title, line 1, line 2, and a url, e.g:

Title: Free red balloons!

Line 1: Buy free red balloons right now!

Line 2: No hidden fees!

Url: http://example.com

I have 3-4 such ads for every keyword.

Using the API, I want to:

1) Create an adgroup for every keyword
2) Under the adgroup, upload all the ads for that particular keyword. 
   So all the ads for `free red balloons` would go under that keyword's adgroup.

I'm looking for some general pointers/links to API pages for the methods which I'll need to use to accomplish this. Specifically I'm using PHP and the Apility library, but non-php specific info will also be very much welcome.

like image 821
Ali Avatar asked Oct 20 '09 12:10

Ali


People also ask

Is there an API for Google Ads?

The Google Ads API lets developers create and use applications that interact directly with their account details on the Google Ads server. The API helps advertisers efficiently manage large Google Ads accounts and campaigns.

Is Google Ads API free?

All users are still required to comply with Google Ads terms, AdWords API terms, and the required minimum functionality, where applicable. There will be no charges for AdWords API usage for either basic or standard access.

How do I get an ad API?

Sign up for Google Ads API access through your manager account. Sign in, then navigate to TOOLS & SETTINGS > SETUP > API Center. The API Center option appears only for Google Ads manager accounts. All fields on the API Access form must be completed, and the Terms and Conditions accepted.


2 Answers

Using AdGroupService you would have to create ad group for each keyword. Of course you need to have parent campaign for that ad group.

Then using AdGroupCriterionService you would have to create keywords for each ad group.

And at last with AdGroupAdService place specified ads under appropriate ad group.

Using default AdWords clients this task is difficult because you need to create all that objects that are then being serialized into SOAP message.

If you are building your app on .NET platform,
you might wanna take a look at GemBox.Ppc AdWords API for .NET.

It dramatically simplifies management of AdWords objects.

like image 65
Stipo.GemBoxSoftware Avatar answered Mar 03 '23 10:03

Stipo.GemBoxSoftware


APIlity has been deprecated, as it only handles v13 of the AdWords API. To make your coding easier, you should probably be looking at the new PHP Client Library, which offers full support for v200909, the latest API version. Be sure to check the 'examples' folder in the client library for some samples.

like image 35
Sérgio Gomes Avatar answered Mar 03 '23 10:03

Sérgio Gomes