Is there a function to view donation information via YouTube Data API?

Viewed 113

I am hoping to pull live stream donation information every 5 minutes onto my server. I am making a script to check that information for the names of the crew and send them payments automatically. Is there a way with the YouTube Data API to handle donation information?

2 Answers

None of the YouTube apis support this functionality. The main issue is that the YouTube apis are more then ten years old. They just give you basic access to the videos on YOuTube.

What you are looking for would be access to data used in the YouTube web app that being donations which is a relatively new future, and again part of the web app. Not just video data. Its just not something YouTube has released an api for yet.

Try and submit a feature request Issue tracker

As DalmTo mentioned, the YouTube Data API v3 doesn't have such feature.

However I recommend you to try out my open-source YouTube operational API. Indeed by requesting https://yt.lemnoslife.com/lives?part=donations&id=VIDEO_ID you will get in item["donations"] the donations currently displayed in the YouTube live chat. Especially may interest you:

  • Donation timestamp: donation["timestampUsec"] (example: 1654111675007219)
  • Donator channel id: donation["authorExternalChannelId"] (example: UC_PkX-rSBPWJqoK2zRRalfQ)
  • Donation amount: donation["purchaseAmountText"]["simpleText"] (example: 100,00\u00a0$US)
  • Donation message: donation["message"]["runs"][0] (example: FOR JUSTICE!)
Related