Hi Andy,

An example of creating a v201003 keyword report in Python is available
here:

  
http://code.google.com/p/google-api-adwords-python-lib/source/browse/trunk/examples/v201003/add_keywords_performance_report_definition.py

There is no need to create a new ReportDefinition every time you want
to run a report.  There are dateRangeTypes like YESTERDAY and
LAST_WEEK that you can use to create reusable report definitions.

  
http://code.google.com/apis/adwords/docs/reference/latest/ReportDefinitionService.ReportDefinition.DateRangeType.html

The get() method will return the last 100 ReportDefinitions that were
created, but if you know the ID you can still run an older report
definition.

Best,
- Eric Koleda, AdWords API Team

On Sep 19, 4:33 am, Andy <wanabewi...@googlemail.com> wrote:
> Is there an example of how to create a rport definition in Python at
> all? Using the adspygoogle.adwords module? All I can find is a Java
> example 
> here:http://adwordsapi.blogspot.com/2010/07/introduction-to-reportdefiniti...
> and it is rather difficult to translate.
>
> Also, if I want to run the report daily, am I required to report a new
> definition daily? I notice some definitions I create are available to
> use when I search for previously defined definitions. Also, if I don't
> need to create new definitions, just query existing ones, how long do
> the existing definitions last? Is time a factor or is it until they're
> pushed off the bottom of the stack by other new definitions?
>
> Thanks,
> Andy.
>
> On Sep 15, 8:06 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
> wrote:
>
>
>
> > Hi Andy,
>
> > Unfortunately this isn't possible using the statsSelector.  The
> > ReportDefinitionService has the fields AdNetwork1 (Ad Distribution)
> > and AdNetwork2 (Network) that you can use to segment the data in
> > reports.
>
> > Best,
> > - Eric Koleda, AdWords API Team
>
> > On Sep 11, 5:03 pm, Andy <a...@epiphanysolutions.co.uk> wrote:
>
> > > Hi,
>
> > > I'm using a simple query to find out the stats across my campaigns and
> > > it is working well. The code below gives me a dictionary of all the
> > > stats I need _except_ the network type. I need to be able to
> > > differentiate between the content network and the search network but
> > > regardless of how I have the campaigns set up in the MCC, the network
> > > type is coming out as ALL.
>
> > > Any advice on how to differentiate between the networks would be very
> > > much appreciated.
>
> > > The code I have is:
>
> > > import os
> > > import sys
>
> > > from adspygoogle.adwords.AdWordsClient import AdWordsClient
>
> > > sys.path.append(os.path.join('.'))
>
> > > client = AdWordsClient(path=os.path.join('.'))
>
> > > client.SetClientEmail('em...@address.com')
>
> > > selector = {
> > >         'statsSelector': {
> > >                 'dateRange': {
> > >                         'max':"20100101",
> > >                         'min':"20100101"
> > >                 }
> > >         }
>
> > > }
>
> > > cs = client.GetCampaignService('https://adwords.google.com',
> > > 'v201003')
>
> > > campaigns = cs.Get(selector)[0]
>
> > > for entry in campaigns['entries']:
> > >         print entry['campaignStats']

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to