Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouTube API Quotas #3

Open
mattwright324 opened this issue Dec 23, 2020 · 6 comments
Open

YouTube API Quotas #3

mattwright324 opened this issue Dec 23, 2020 · 6 comments
Labels
cantfix An issue that I can't completely fix

Comments

@mattwright324
Copy link
Owner

See mattwright324/youtube-geofind#11 YouTube API Quotas

This issue is shared between these two projects as they share the same YouTube API key.

@mattwright324 mattwright324 added the cantfix An issue that I can't completely fix label Dec 23, 2020
@mattwright324 mattwright324 pinned this issue Dec 23, 2020
@CYLITM
Copy link

CYLITM commented Mar 13, 2022

If the API key used for the website runs out of quota, is there any way to use the project with a personal key?

@mattwright324
Copy link
Owner Author

Hi @CYLITM,

Yup, in the browser console you can run youtube.setDefaultKey('AIzaSy...'); with your own API key however you'd have to do it on each page load; tampermonkey could do that and you could turn it on and off as needed.

Alternatively, you could spin up your own instance following the notes in BUILD.md.

This application has not yet hit the quota limit yet even though quota has been much higher than usual since the 22nd.

image

@SeanSilke
Copy link

Hi @CYLITM,

Yup, in the browser console you can run youtube.setDefaultKey('AIzaSy...'); with your own API key however you'd have to do it on each page load; tampermonkey could do that and you could turn it on and off as needed.

Alternatively, you could spin up your own instance following the notes in BUILD.md.

This application has not yet hit the quota limit yet even though quota has been much higher than usual since the 22nd.

image

@mattwright324 Do you consider to use temporary browser storage for personal API keys? With use of localstorage there will be no need to reapply personal api key on each page load.

@mattwright324
Copy link
Owner Author

Hi @SeanSilke

That can certainly be an option to look into. However, you could probably achieve the same with a tampermonkey/greasemonkey script depending on the browser you are using.

@wc2184
Copy link

wc2184 commented May 3, 2023

Since frequently lately the api key is being abused by someone...

Sample Tampermonkey Script for Automatic API Key change as suggested by @mattwright324 -
Works for Single Metadata page and Bulk page -

One Click Install Link (make sure to have Tampermonkey installed on your browser)

// ==UserScript==
// @name         Replace Youtube API Key For Matt's Youtube API Metadata Search
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://mattw.io/youtube-metadata*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=mattw.io
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Put your Youtube Data API V3 key here
    const API_KEY = 'replaceThisStringWithYourAPIKeyString'


    setTimeout(() => {
        youtube.setDefaultKey(API_KEY)
    }, 500)
})();

@mattwright324
Copy link
Owner Author

mattwright324 commented May 6, 2023

Thanks @wc2184 that will be useful for sure, there isn't a whole lot I can do about the quotas. I've linked to your issue message in the quota exceeded warning in the page.

There appears to be some automated process someone is using to run tons of queries as soon as the quota resets at midnight...

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cantfix An issue that I can't completely fix
Projects
None yet
Development

No branches or pull requests

4 participants