1

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.

Daniel Walker
  • 6,380
  • 5
  • 22
  • 45
TheAmazingJeh
  • 37
  • 1
  • 3
  • I like [this method](https://stackoverflow.com/a/27872244/7123660) which costs only 2 quota because the first video to come up from [PlaylistItems: list](https://developers.google.com/youtube/v3/docs/playlistItems/list) with the `uploads` playlist is the latest uploaded one. – Benjamin Loison Jun 28 '22 at 17:28

0 Answers0