How to get the most recent video from a specified channel using the youtube api

Viewed 161

I have this code

url_params = {
    "part":"snippet",
    "channelId":CHANNEL_ID,
    "key":YOUR_API_KEY,
    "order":"date",
    "maxResults":1,
    "type":"video"
}
req = f"https://www.googleapis.com/youtube/v3/search?{urlencode(url_params)}"
data = requests.get(req).json()

But it uses 100 quota points and I was wondering if there was a cheaper way of doing it.

0 Answers
Related