[GH-ISSUE #328] API quota values #255

Open
opened 2026-02-27 22:08:50 +03:00 by kerem · 9 comments
Owner

Originally created by @sigma67 on GitHub (Dec 12, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/328

Originally assigned to: @jahenner on GitHub.

Recently I've started running into a new error "quota exceeded" when running the tests. The quota limits seem to be hourly as they reset at the full hour.

I think it might be helpful to document the quota unit and limit values, if somebody can find documentation on it or wants to reverse-engineer the values.

Originally created by @sigma67 on GitHub (Dec 12, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/328 Originally assigned to: @jahenner on GitHub. Recently I've started running into a new error "quota exceeded" when running the tests. The quota limits seem to be hourly as they reset at the full hour. I think it might be helpful to document the quota unit and limit values, if somebody can find documentation on it or wants to reverse-engineer the values.
Author
Owner

@sigma67 commented on GitHub (Apr 13, 2023):

To reverse engineer, I would recommend the following procedure:

  • set up oauth authentication
  • repeatedly call the same endpoint until the quota is exhausted while counting calls (i.e. until an error is returned by the API)
  • wait until the full hour to receive quota
  • keep going until quota is exhausted for the day (if at all)

Repeat the procedure with all available endpoints. We're mostly interested in manipulation (creation, edit, delete operations), as read operations aren't usually expensive on the server. Although it could still be interesting to determine if there is a quota for search, for example. In my personal experience the quota for search is probably quite high, as you can do at least several hundreds of searches without issue.

<!-- gh-comment-id:1507595849 --> @sigma67 commented on GitHub (Apr 13, 2023): To reverse engineer, I would recommend the following procedure: - set up oauth authentication - repeatedly call the same endpoint until the quota is exhausted while counting calls (i.e. until an error is returned by the API) - wait until the full hour to receive quota - keep going until quota is exhausted for the day (if at all) Repeat the procedure with all available endpoints. We're mostly interested in manipulation (creation, edit, delete operations), as read operations aren't usually expensive on the server. Although it could still be interesting to determine if there is a quota for `search`, for example. In my personal experience the quota for `search` is probably quite high, as you can do at least several hundreds of searches without issue.
Author
Owner

@jahenner commented on GitHub (Apr 17, 2023):

I am choosing this project for the open source course I'm taking for school. I'd love to help with this issue.

<!-- gh-comment-id:1511908218 --> @jahenner commented on GitHub (Apr 17, 2023): I am choosing this project for the open source course I'm taking for school. I'd love to help with this issue.
Author
Owner

@sigma67 commented on GitHub (Apr 18, 2023):

Sure, I think this is quite a good issue for new contributors. You can get started by writing a small script and testing some playlist manipulation functions with your account to see if you run into any limits.

<!-- gh-comment-id:1512649552 --> @sigma67 commented on GitHub (Apr 18, 2023): Sure, I think this is quite a good issue for new contributors. You can get started by writing a small script and testing some playlist manipulation functions with your account to see if you run into any limits.
Author
Owner

@ranile commented on GitHub (Mar 2, 2024):

@jahenner did you find anything?

I'm intending to use this project to make 2700 requests (search and then rate song for 1340 songs to transfer my spotify library). I'm not sure how well that will play with the ratelimits to I want to confirm it before trying

<!-- gh-comment-id:1974824780 --> @ranile commented on GitHub (Mar 2, 2024): @jahenner did you find anything? I'm intending to use this project to make 2700 requests (search and then rate song for 1340 songs to transfer my spotify library). I'm not sure how well that will play with the ratelimits to I want to confirm it before trying
Author
Owner

@sigma67 commented on GitHub (Mar 2, 2024):

@hamza1311 see linked PR

<!-- gh-comment-id:1974850628 --> @sigma67 commented on GitHub (Mar 2, 2024): @hamza1311 see linked PR
Author
Owner

@sigma67 commented on GitHub (Jan 19, 2025):

@chavinlo are we talking any GCP hosted server? Which type of authentication did you use?

<!-- gh-comment-id:2600818875 --> @sigma67 commented on GitHub (Jan 19, 2025): @chavinlo are we talking any GCP hosted server? Which type of authentication did you use?
Author
Owner

@Shabinder commented on GitHub (Jan 31, 2025):

yeah sort of; no auth Edit: after analyzing my dataset, you might want to blacklist video id 8MGrTEUgBwY

@chavinlo can you elaborate, was mentioned videoId causing some issue or something ?

<!-- gh-comment-id:2627626259 --> @Shabinder commented on GitHub (Jan 31, 2025): > yeah sort of; no auth Edit: after analyzing my dataset, you might want to blacklist video id 8MGrTEUgBwY @chavinlo can you elaborate, was mentioned videoId causing some issue or something ?
Author
Owner

@sigma67 commented on GitHub (Feb 9, 2025):

I do want to note here that this library is built on the principle of responsible use. Excessive use will likely lead to YT shutting things down, hence less good for all.

<!-- gh-comment-id:2646312605 --> @sigma67 commented on GitHub (Feb 9, 2025): I do want to note here that this library is built on the principle of responsible use. Excessive use will likely lead to YT shutting things down, hence less good for all.
Author
Owner

@motz0815 commented on GitHub (Sep 2, 2025):

Would it be possible for ytmusicapi to accept normal YouTube Data API Keys? (Without OAuth or Browser auth)
Just for public endpoints, but in order to not get bot-blocked when hosting on shared infrastructure.

For example, I'm running Flask on Vercel, and requests to the YTmusic API get blocked because they "can't verify I'm not a bot" so I need to authenticate myself in some way.

<!-- gh-comment-id:3246363351 --> @motz0815 commented on GitHub (Sep 2, 2025): Would it be possible for ytmusicapi to accept normal YouTube Data API Keys? (Without OAuth or Browser auth) Just for public endpoints, but in order to not get bot-blocked when hosting on shared infrastructure. For example, I'm running Flask on Vercel, and requests to the YTmusic API get blocked because they "can't verify I'm not a bot" so I need to authenticate myself in some way.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#255
No description provided.