Results are different while retrieving HD videos using V2 and V3 - youtube

I am working on YouTube API. I doing analysis on V2 and V3. At present I tried to retrieve the HD videos. The output is not matching when I am using same query.
Using V3
https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&q=football+-soccer&start-index=1&max-results=10&videoDefinition=high&key={Developer key}
Using V2
https://gdata.youtube.com/feeds/api/videos?q=football+-soccer&orderby=published&start-index=1&max-results=10&v=2&hd&alt=jsonc
Where V3 is stable? or should I continue with v2 for my project.

You are better of building on top of API V3. V3 is where most of our current investment is going and we're adding new features as well as bug fixes to V3. Also, I recommend checking out Topics API, more information here: https://developers.google.com/youtube/v3/guides/searching_by_topic, Topics will help you obtain more reliable (semantically) search results. Only API V3 supports the Topics API.

Related

YouTube imported data in Google Sheets (IMPORTXML fnc) has stopped working

I want to get data from YouTube via IMPORTXML function in Google Docs.
It used to work before, but now "Imported content is empty."
For example, to get likes, I use the query:
=IF(ISNA(IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","(//*[contains(#class,'like-button-renderer-like-button')])[1]"))=TRUE,0,
IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","(//*[contains(#class,'like-button-renderer-like-button')])[1]"))
but it is not working now, the imported content is empty.
So, the question is, what query should be to get data.
Your code above is scraping the YouTube site, relying on undocumented features of YouTube's API.
Instead of being in contradiction with DTOS -- e.g. paragraphs D.7 and E.6 --, I would suggest you to use the YouTube Data API's endpoint Videos.list, for obtaining the number of likes of any given video through the property statistics.likeCount.
Here is what DTOS says about undocumented features and scraping:
[D.7] Undocumented Services
You must not use undocumented APIs without express permission. You must access data from YouTube API services only according to the means stipulated in the authorized documentation of that YouTube API service.
You must not reverse engineer undocumented YouTube API services or otherwise attempt to derive the underlying source code of these API services.
[E.6] Scraping
You and your API Clients must not, and must not encourage, enable, or require others to, directly or indirectly, scrape YouTube Applications or Google Applications, or obtain scraped YouTube data or content. Public search engines may scrape data only in accordance with YouTube's robots.txt file or with YouTube's prior written permission.

Google Docs API, new "Compare documents" feature available through API?

Google has rolled out a useful tool of compare docs.
https://9to5google.com/2019/06/11/google-docs-compare-documents/
I need to access through an API because I'm comparing many documents. I searched through the API reference but didn't find it. Did i just miss it or is it not available?
Answer:
This feature is not available via the Docs API.
More Information
Fundamentally, the Google Docs API lets you create and modify documents.
From the documentation:
The API allows you to do tasks such as the following:
Automate processes
Create documentation in bulk
Generate invoices or contracts
It is not an API which has methods that directly replicate the methods available in the user interface.
Workaround:
The Revisions resource of the Drive API might be an approximate solution for you, as it allows revisions of documents to be accessed and downloaded via export links.
As Google Documents have some level of version control implementation, it might be possible to use this to make document comparisons. Unfortunately however, there is no direct way of comparing changes, and as per a recent Issue Tracker case it seems that due to the zip nature of .docx files, not even exporting and comparing MD5s can be a direct solution for this.
Feature Request:
You can however let Google know that this is a feature that is important for the Docs or Drive API and that you would like to request they implement it. You can use the aforelinked Google's Issue Tracker to report issues and make feature requests for their development services.
The page to file a Feature Request for the Google Docs API is here and the Google Drive API is here
References:
Introduction | Google Docs API | Google Developers
Revisions | Google Drive API | Google Developers
Issue Tracker Links:
Google Docs export returns non-stable (i.e. different) bytes content for each ex
Docs API Feature Request | New Issue - Issue Tracker
Drive API Feature Request | New Issue - Issue Tracker

How do i get analytic reports from YouTube API for CMS account?

Basically, i want to get analytic reports through YouTube API by using Python. After hours searching how to make it happend. I am known that YouTube just supporting API through their graphical design, which is really limited.
Please advised me, is there any way to get daily/weekly/monthly report by using Python?
FYI, at the moment, i am using YouTube's service to automatically update the reports into my database which is BigTable.

Safe way to update the API Key used for Youtube Data API v3

We're planning to change the API Key that we're using for Youtube API v3 (dropping the old one in turn) and we're worried if there will be any penalties if the system somehow detects that same source is using a different API key. Can I clarify what is the safest way to do this? Can I just change the API Key without any worries? Thank you.

Where did the v2 api key console go?

There used to be a YouTube api console for v2 that allowed generation of v2 api keys. Mentioned here by Jeff Posnick. I get a 404 error now.
I know that v2 has been deprecated but it takes time to switch to the new v3 version and we should be still be able to use v2 until the end date of April 2015. Does anyone know where to get v2 api keys?
At the bottom of the post you reference, Jeff mentioned that one goal is to make the old v2 API aware of new keys generated via the API console (now the cloud console). I just tested it and it seems to work now to use a "key for browser applications" for deprecated v2 calls as well as the read-only v3 API calls, but someone else may be able to comment if this is, in fact, accurate.

Resources