Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3708

YouTube Analytics API - Get yt videos that are traffic source for my video

$
0
0

In YouTube Studio UI it's possible to get Traffic source -> Proposed videos and here you can see list of videos that were played before your video. You can download .csv with it.

When trying to do it with YouTube Analytics API it seems not possible. I was trying a lot of combinations like below:

flow = InstalledAppFlow.from_client_secrets_file(    CLIENT_SECRETS_FILE, ["https://www.googleapis.com/auth/yt-analytics.readonly"])credentials = flow.run_local_server()youtube_analytics = build("youtubeAnalytics", "v2", credentials=credentials)response = youtube_analytics.reports().query(    ids="channel==MINE",    startDate="2010-10-30",    endDate="2024-09-11",    filters="video==VIDEO_ID",    metrics="views,estimatedMinutesWatched",    dimensions="insightTrafficSourceType",).execute()

However it's returning only aggregated number of views, estimated minutes watched but no video id.I was trying to add filter to filters like ;insightTrafficSourceType==RELATED_VIDEO but it's giving error 400.

Is there any possibility to do it?


Viewing all articles
Browse latest Browse all 3708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>