parse data from TargetingIdeaService with Python

22 views
Skip to first unread message

John Stanton-Geddes

unread,
Apr 6, 2016, 9:02:14 AM4/6/16
to AdWords API Forum
The data format returned by the Python client for the TargetingIdeaService isn't in a standard format (e.g. JSON) and difficult to parse. Is there an easy way to ask for the data to be returned in JSON or a column based format? Note that I've cross-posted this question on [SO](http://stackoverflow.com/questions/36432927/what-is-the-data-format-returned-by-the-adwords-api-targetingideapage-service).

Example data:


(TargetingIdeaPage){
       totalNumEntries = 1
       entries[] = 
          (TargetingIdea){
             data[] = 
                (Type_AttributeMapEntry){
                   key = "KEYWORD_TEXT"
                   value = 
                      (StringAttribute){
                         Attribute.Type = "StringAttribute"
                         value = "keyword phrase"
                      }
                },
                (Type_AttributeMapEntry){
                   key = "TARGETED_MONTHLY_SEARCHES"
                   value = 
                      (MonthlySearchVolumeAttribute){
                         Attribute.Type = "MonthlySearchVolumeAttribute"
                         value[] = 
                            (MonthlySearchVolume){
                               year = 2016
                               month = 2
                               count = 2900
                            },
                            ...
                            (MonthlySearchVolume){
                               year = 2015
                               month = 3
                               count = 2900
                            },
                      }
                },
          },
     }

Yin Niu

unread,
Apr 6, 2016, 12:15:32 PM4/6/16
to AdWords API Forum
Hi, 

I am afraid you would have to convert the data in your own code. 

Thanks,
Yin, AdWords API Team. 
Reply all
Reply to author
Forward
0 new messages