Collect all Ad Groups grouped by Ad Url label token

12 views
Skip to first unread message

mau

unread,
Sep 7, 2008, 4:28:11 AM9/7/08
to AdWords API Forum
Hi all,
I've started playing around with Google Ads API since a couple of
weeks in order to generate some stats and compare them with other
information sources and data, but I'm stating that my application is
fetching too much data throughout the Google webservices, causing
unaffordable costs; on top of that I'm doubful whether my approach to
the APIs is correct or overkill.

My first goal is to collect all Ad Groups grouped by Ad Url label
token
- Iterate on all 'Active' Campaigns
- Iterate on all 'Active' Group Ads
-Get the first non-null destinationUrl from an Ad of the current
Group and extract the label token contained into it
- Sum up the Stats (clicks and impressions) of the current Group
Ad with the ones having same label token (assuming all Ads in a Group
Ad have the same label token in the destinationUrl)

Hereby my questions:
- Is this the most convenient implementation for my use-case?
- If yes, are there any getActiveCampaign/AdGroup methods which could
save me a lot returned items on WS calls therefore a drastical
decrease of costs? Could the CriterionService help me somehow
optimizing my queries?

Thanks in advance!
Regards,
Maurizio Pillitu

Jan Piotrowski (AdWords API Guru)

unread,
Sep 7, 2008, 2:11:39 PM9/7/08
to AdWords API Forum
Hi Maurizio,

> My first goal is to collect all Ad Groups grouped by
> Ad Url label token

What do you mean with "Ad Url label token"?

- Jan

mau

unread,
Sep 8, 2008, 4:06:51 AM9/8/08
to AdWords API Forum
Hi Jan,
the problem was indeed caused by the blurred use-case specification I
had in my mind ;-)
With "Ad Url label token" I mean Ad Url; I had a look at the Report
functionalities and I found all my answers.
What I'm now planning to do - and it will change/simplify all my code
logic - is to define/schedule a Report[1] and set the reportType to
Url[2]

If I understand correctly, I can schedule the job - say on weekly
bases - once and then download the report using the ReportJobStatus
object.

In total I'll pay 500 unit for the job scheduling and 1 unit per
report download, which is a *really* low cost! Also the code will be
simplified drastically.

WDYT?

Maurizio

[1] - http://code.google.com/p/adwords-api-java-samples/source/browse/trunk/src/ScheduleReport.java
[2] - http://www.google.com/apis/adwords/developer/adwords_api_report_url.html

On Sep 7, 8:11 pm, "Jan Piotrowski (AdWords API Guru)"

Jan Piotrowski (AdWords API Guru)

unread,
Sep 8, 2008, 4:46:37 AM9/8/08
to AdWords API Forum
Hi Maurizio,

reports are probably the better way to go, right. But I don't know if
you can schedule reocurring reports using the API, you'll have to
check the documentation for this.

As it is a one-time-thing, I would perhaps recommend to just use the
web GUI to schedule the weekly report and only let the system mail you
the .xml or .csv-file to some email address, download and process it
from there. Zero cost for you.

- Jan



On 8 Sep., 10:06, mau <mauri...@session.it> wrote:
> Hi Jan,
> the problem was indeed caused by the blurred use-case specification I
> had in my mind ;-)
> With "Ad Url label token" I mean Ad Url; I had a look at the Report
> functionalities and I found all my answers.
> What I'm now planning to do - and it will change/simplify all my code
> logic - is to define/schedule a Report[1] and set the reportType to
> Url[2]
>
> If I understand correctly, I can schedule the job - say on weekly
> bases - once and then download the report using the ReportJobStatus
> object.
>
> In total I'll pay 500 unit for the job scheduling and 1 unit per
> report download, which is a *really* low cost! Also the code will be
> simplified drastically.
>
> WDYT?
>
> Maurizio
>
> [1] -http://code.google.com/p/adwords-api-java-samples/source/browse/trunk...
> [2] -http://www.google.com/apis/adwords/developer/adwords_api_report_url.html

AdWords API Advisor

unread,
Sep 8, 2008, 1:02:44 PM9/8/08
to AdWords API Forum
Hello Maurizio,

Jan is correct in that recurring reports can't be scheduled via the
AdWords API. You can of course write a program to schedule, download,
and process the report and then schedule that program to run on a
repeated basis, either via cron on a UNIX-y system or a Window's
Scheduled Task.

Alternatively, it is possible to schedule a repeating report using
the AdWords web interface and then either have that report emailed to
you as Jan suggests or download the report automatically via the
AdWords API. That approach will save you some API units, but it can be
tricky to use the getAllJobs() method to find the correct report job
id for the automatically run report, and you'd need that report job id
to actually download the report using the AdWords API. It's definitely
possible, but it's not really the intended use of the API.

Cheers,
-Jeff Posnick, AdWords API Team


On Sep 8, 4:46 am, "Jan Piotrowski (AdWords API Guru)"
Reply all
Reply to author
Forward
0 new messages