How to get DV360 (DoubleClick Bid Manager API) report data by Python?

1.5k Views Asked by At

I am trying to fetch the data from DV360 (DoubleClick Bid Manager API). I am able to fetch the meta data of the reports but I am unable to get the data of the report. I am trying to use Python but still unsuccessful. So far i am trying to follow documentation from google like this:

def print_queries(response):
  for q in response['queries']:
    print('%s\t%s' % (q['queryId'], q['metadata']['title']))
# Call the API, getting a list of queries.
response = doubleclick_bid_manager.queries().listqueries().execute()

# Print queries out.
print('Id\t\tName')
if 'queries' in response:
  # Starting with the first page.
  print_queries(response)
  # Then everything else
  while 'nextPageToken' in response and response['nextPageToken']:
    response = doubleclick_bid_manager.queries().listqueries(
        pageToken=response['nextPageToken']).execute()
    print_queries(response)
else:
  print('No queries exist.')
0

There are 0 best solutions below