1

I am using Retrieve_Report to download data analytics. Then it returned a list of available reporting types like this:

 name reporting type: content_owner_basic_a3

 name reporting type: content_owner_estimated_revenue_a1

 name reporting type: content_owner_asset_province_a2

 name reporting type: content_owner_asset_playback_location_a2

 name reporting type: content_owner_asset_basic_a2

 name reporting type: content_owner_asset_demographics_a1

 name reporting type: content_owner_demographics_a1

 name reporting type: content_owner_asset_cards_a1

 name reporting type: content_owner_cards_a1

 name reporting type: content_owner_asset_traffic_source_a2

 name reporting type: content_owner_asset_sharing_service_a1

 name reporting type: content_owner_traffic_source_a2

 name reporting type: content_owner_device_os_a2

 name reporting type: content_owner_playlist_combined_a1

 name reporting type: content_owner_playback_location_a2

 name reporting type: content_owner_subtitles_a2

 name reporting type: content_owner_playlist_device_os_a1

 name reporting type: content_owner_end_screens_a1

 name reporting type: content_owner_annotations_a1

 name reporting type: content_owner_ad_rates_a1

 name reporting type: content_owner_playlist_basic_a1

 name reporting type: content_owner_sharing_service_a1

 name reporting type: content_owner_asset_end_screens_a1

 name reporting type: content_owner_asset_device_os_a2

 name reporting type: content_owner_province_a2

 name reporting type: content_owner_playlist_traffic_source_a1

 name reporting type: content_owner_playlist_playback_location_a1

 name reporting type: content_owner_asset_estimated_revenue_a1

 name reporting type: content_owner_combined_a2

 name reporting type: content_owner_asset_annotations_a1

 name reporting type: content_owner_asset_combined_a2

 name reporting type: content_owner_playlist_province_a1

The problem is that it seems like the Retrieve_Report cannot get reporting type named content_owner_ad_revenue_raw_a1 and content_owner_video_metadata_a2/content_owner_video_metadata_a1. Are there any ways to download data from these reporting types?

Key Jun
  • 440
  • 3
  • 8
  • 18
  • Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example. – Linda Lawton - DaImTo Jan 14 '19 at 07:17
  • @DaImTo This question is very deep. It is not about code errors. It is about what **YouTube Reporting API** have (so YouTube API support team or those who's experienced using YouTube API can answer this question). To be more specific, I am looking for a table named **content_owner_ad_revenue_raw_a1** and **content_owner_video_metadata_a2/content_owner_video_metadata_a1**. These tables are not included in the table list. – Key Jun Jan 14 '19 at 07:26
  • 1
    1. you have tagged your question [youtube api](https://stackoverflow.com/tags/youtube-api/info) not [youtube reporting api](https://stackoverflow.com/tags/youtube-reporting-api/info) fix your tags. 2. I very much doubt that you will get a response from anyone on the youtube support team on SO 3. I have been working with the Youtube api's for five years i think i can handle deep but without code we cant help you please check. https://stackoverflow.com/help/how-to-ask and supply a https://stackoverflow.com/help/mcve – Linda Lawton - DaImTo Jan 14 '19 at 07:31
  • @DaImTo Have you ever used YouTube CMS account? I am using Google Bigquery Data Transfer service to get data from YouTube analytics. with the code **https://github.com/youtube/api-samples/blob/master/python/retrieve_reports.py** I could see almost all tables which are got from YouTube analytics on Google Bigquery. But except 2 tables above. They are not included. – Key Jun Jan 14 '19 at 08:06

1 Answers1

0

Those are system managed reports.

You'll need to add includeSystemManaged=True as an argument to .list(). In the context of the code sample you linked, modify line 152-158 like so:

try:
    # If the user has not specified a job ID or report URL, retrieve a list
    # of available jobs and prompt the user to select one.
    if not args.job_id and not args.report_url:
      if list_reporting_jobs(youtube_reporting,
                             onBehalfOfContentOwner=args.content_owner
                             includeSystemManaged=True):
        args.job_id = get_job_id_from_user()

If you're calling the list() function directly,

youtube_reporting.jobs().list(onBehalfOfContentOwner={your_content_owner_id}, includeSystemManaged=True).execute()
Josh Durham
  • 1,632
  • 1
  • 17
  • 28
  • This doesn't fix anything for me. The problem I'm having which I think also relates to why OP can't download anything is there is allegedly supposed to be a `downloadUrl` value returned with each report entry in the list, but it is not. This does not surprise me either giventhe tragic state of the sample documentation and sample code repo on GH for the YouTube Reporting API. – nathanchere Nov 13 '19 at 09:11