LoginSignup
13
10

YouTube Data API v3 のクォータ制限の解除申請について

Last updated at Posted at 2023-07-09

はじめに

以下、記事でもお話した通り、YouTube Data API v3 (以下、YouTube API)にはクォータ制限(1 日あたりのリクエスト数やアップロード数などの制限)があります。クォータ制限は 1 日当たり 10,000 単位となっています。ビデオのアップロードは、1,600 単位とかなり高いクォータを消費します。したがって、1 日に行えるアップロードは数回に限られます。クォータ制限がリセットされるのは、太平洋時間(PT)の午前 0 時にリセットされます。日本時間では、午後 4 時~5 時の間です。
クォータ制限の問題を解決するには、クォータの増加申請が必要になってきます。こちらに関しては審査が必要で、すぐには反映されません(1ヶ月以上やり取りしました)。2023年6月下旬に申請が通ったので、申請方法や申請内容、やり取りについてまとめたいと思います。申請については、組織向けではなく個人向けになり、初めて申請する方向けの内容になります。

前提条件

この記事では、Google Cloud Platform にて以下の作業が完了していることを前提としています。

  • プロジェクトの作成
  • YouTube Data API の有効化、API キーの取得
  • OAuth 同意画面の設定
  • OAuth 2.0 クライアント ID の取得

方法については、「はじめに」で書いた記事を参考にして下さい。

概要

申請方法とメールでのやり取りについてまとめていきます。

申請方法

始めに YouTube API サービス - 監査と割り当て増加フォームの申請ページに飛びます。日本語でも入力できますが、基本やり取りする相手は英語圏の人なので、英語で記載したほうがいいでしょう。共有するメディアに関しても、言語を英語にして共有した方がスムーズに進むと思います。また動画メディアの場合、再生時間を記載してあげると親切かもしれません。

  • このフォームにご記入いただく理由(Reason for filling this form?)
    [目的コンプライアンス監査を完了したいまたは追加の API 割り当てをリクエストしたい](I am completing a Compliance Audit or requesting additional API quota)を選択して下さい。

  • 一般情報(General Information)

    • 氏名(Your full legal name)
      名前を入力して下さい。
    • 組織名(Your organization's name )
      個人の方は [Individual organization] と入力して下さい。
    • 組織のウェブサイト(Your organization's website )
      個人の方は [https://Individual organization] と入力して下さい。
    • 組織の住所(Your organization's address )
      個人の方は [Individual organization] と入力して下さい。
    • 組織の連絡先メールアドレス(Organization contact email address)
      個人の方は連絡が取りやすいメールアドレスを入力して下さい。
    • YouTube に関連する、組織の業務を説明してください(escribe your organization's work as it relates to YouTube) 最低 100 文字
      私はここで適当に ChatGPT に業務内容を生成させました。それもあり審査が通るまで時間がかかった可能性があります。素直に個人利用と伝えましょう。
      As we operate on an individual basis, there are no tasks in our organization related to YouTube. All interactions with YouTube are strictly limited to personal use. We appreciate your understanding that we do not engage in any professional or business-related activities with the platform. Our primary focus is on individual usage and personal entertainment.
    • Google 担当者のメール アドレス(Google representative email address)
      今後やり取りする時に使うメールアドレスです。連絡が取りやすいメールアドレスを入力して下さい。
    • コンテンツ所有者 ID(該当する場合)(Content Owner ID (if available))
      Google Cloud Platform にアクセスし、利用したいプロジェクトの ID を入力して下さい。
      キャプチャ.PNG
  • API クライアント情報(API Client Information)

    • 2019 年 6 月以降に監査を受けましたか(Have you undergone an audit since June 2019?)
      [いいえ(No)]を選択して下さい。
    • 前回の監査以降、クライアントによる YouTube API の使用状況になんらかの変化がありましたか(Is there any way in which your client's use of the YT API changed since the last audit?)
      [いいえ(No)]を選択して下さい。
    • API クライアントをすべて記入してください(Please list all your API Client(s)
      Google Cloud Platform にアクセスし、[Dashboard] から [Go to APIs overview]→[Credentials] を選択して下さい。この中の制限解除したいクライアントを選択し、[Name] に記載してある名前を入力して下さい。ここでは「デスクトップ クライアント: 1」になります。ついでに Client ID も教えておきましょう。確認の手間が省けます。
      キャプチャ.PNG
      キャプチャ.PNG
    • 各 API クライアントで使用するプロジェクト番号をすべて記入してください(Please list all the project numbers used for each of your API Client(s))
      Google Cloud Platformの左上にある [My Project] 以降の番号ですね。ここでは、[54527] となります。
    • この API クライアントは一般公開されていますか、それとも非公開ですか。(Is this a publicly or privately available API Client?)
      個人用で使うなら非公開を選択して下さい。非公開にする場合は、この後のフローが少し変わってきます。
    • API クライアントが YouTube Data API にアクセスする方法について詳しく説明してください(Please provide details on how API Client accesses the YouTube Data API)(非公開にする場合)
      Python を用いて YouTube API を利用する場合は、そのデモ動画を共有するといいでしょう。実際に Python を実行し、YouTube API を利用していることを示して下さい。私は Python のソースコードと実行した結果、自動で Google Drive の動画が YouTube にアップロードされるデモ動画を、メールでのやり取りで共有しました。この時点で共有しておいたほうが、迅速に審査が通ると思います。それはまた後ほど。
      The API client is utilizing the YouTube Data API in order to upload videos to YouTube, with Python source code serving as the basis for this operation. This procedure enables developers to automate video uploads, thereby streamlining their workflow and saving valuable time. They can do all this without needing to interact with YouTube's user interface directly. For reference and to better understand the application, a demonstration video has been provided. The link to this demo video is given below. https://drive.google.com/file/d/xxxxxxxxxxxxxxxxxxxxxxx/view?usp=sharing
    • 各 API クライアントを確認できる場所を記入してください(Where can we find each API Client(s)? )
      API クライアントのウェブサイトへのリンク、Play ストアのリンク、Apple ストアのリンク、Chrome ウェブストアのリンク、YouTube チャンネルのリンクなどを記載して下さい。YouTube チャンネルのリンクを聞かれるので事前に伝えておくとスムーズに事が進みます。YouTube にアクセスし、アイコンのチャンネルを選択して下さい。その URL を伝えればいいでしょう。
      https://www.youtube.com/channel/xxxxxxxxxxxxxxxxxxxxxxx
    • API クライアントにアクセスするためにログインする必要がある場合は、デモアカウントと、API クライアントにアクセスする手順を指定してください(If there is a log-in required to access the API client, please provide a demo account and instructions on how to access the API Client)
      利用用途に応じて記入して下さい。私の場合は、Python で google_auth_oauthlib を利用しアクセスしています。
      Use google_auth_oauthlib in Python to access the client.
    • API クライアントで YouTube データを商品化していますか(Does your API Client commercialize YouTube Data? )
      [いいえ(No)]を選択して下さい。
    • API クライアントのユースケースに最も近いものを以下から選択してください(Choose the option that best resembles your API Client's use case)
      API クライアントの利用に合わせた選択肢を選んで下さい。私の場合は、[
      YouTube 動画のアップロード(YouTube video uploads)]を選択しました。
    • この API クライアントで使用する YouTube API サービスをすべて選択してください(Specify all YouTube API Services used by this API Client)
      API クライアントの利用に合わせた選択肢を選んで下さい。私の場合は、特に分析などはしないので [Data API] を選択しました。
    • API クライアントの主なユーザー層を選択してください(Select the primary audience for your API Client)
      [クリエイター(Creators)]を選択すればいいでしょう。
    • API クライアントを使用しているユーザー数は、およそどのくらいですか(Approximately how many users use your API Client?)
      個人利用であれば [1]、共同利用であればそれに合わせた人数を記載して下さい。
    • ユーザーが API クライアントをどのように使用しているか説明してください(Explain how your API Client is used by your users)
      利用用途に応じて記入して下さい。私の場合は、Google Drive の動画を YouTube に自動でアップロードするために使用しています。
      I am using it to automatically upload videos from Google Drive to YouTube.
    • API クライアントは複数のプロジェクトを使用して YouTube API にアクセスしていますか(Does your API Client use multiple projects to access YouTube APIs?)
      アクセスしなければ[いいえ(No)]を選択して下さい。
    • この API クライアントは、YouTube データから導き出した指標を作成、アクセス、または使用していますか(Does this API Client create, access or use any metrics derived from YouTube data?)
      データ分析をしなければ[いいえ(No)]を選択して下さい。
    • この API クライアントは、複数のプラットフォーム(Facebook や Twitter など)から取得したデータを表示したり、複数のプラットフォームに機能やサービスを提供したりしていますか(Does this API Client display data from, or provide features or services across, multiple platforms (ex: Facebook, Twitter, etc.)?)
      提供しなければ[いいえ(No)]を選択して下さい。
    • YouTube API データを使用して、なんらかのレポートを作成、提供していますか(Do you create/provide any type of reports using YouTube API Data?)
      データ分析をしなければ[いいえ(No)]を選択して下さい。
    • YouTube API データをどのくらいの期間保存していますか(How long do you store YouTube API Data?)
      用途によりますが、[30~90 日(30 - 90 days)]くらいを選択すればいいと思います。
    • どのくらいの頻度で YouTube API データを更新していますか(How often do you refresh YouTube API Data?)
      こちらも用途によりますが、[1 か月(1 month)]くらいを選択すればいいと思います。
    • この API クライアントは、ユーザーが Google 認証情報を使用して認証できるようにしていますか(Does this API Client allow users to authenticate with their Google credentials)
      Python で google_auth_oauthlib を利用するなら[はい(Yes)]を選択して下さい。基本的には利用すると思います。
    • API クライアントで認証されたユーザー数と、認証データが API クライアント内でまたは API クライアントによってどのように使用されているか詳しく記載してください(Please provide more detail on how many users have authenticated to your API Client, and how authenticated data is used in or by the API Client)
      ユーザー数は適宜変更して下さい。以下のような内容でいいと思います。
      In our application using the API client, the number of individuals who are authenticated is just one. This individual generates the authentication token using the method "google_auth_oauthlib.flow.run_console()". This generated token is a crucial part of our process as it plays a pivotal role in ensuring the secure connection with YouTube's servers. Once authenticated, we use this unique token as a means of uploading videos to YouTube. The process ensures the safety and security of our application while providing a seamless uploading experience.
    • 各 API クライアントによる YouTube API サービスの実装、アクセス、統合、使用に関連するドキュメント(設計ドキュメントなど)を送信してください。API クライアントが公開されていない場合は、各 YouTube API サービス機能の詳細なスクリーンショットと、この API クライアントで表示される、またはこれに統合される YouTube データ、コンテンツ、情報をアップロードしてください。
      Python のソースコードでも送っておけばいいと思います。auth.pymain.py など。以下記事を参考にして下さい。

  • 割り当てリクエスト フォーム(Quota Request Form)
    • 割り当て増加のリクエストの対象となる API クライアントを記入してください(Which API Client are you requesting a quota increase for?)
      API クライアントの名前を入力して下さい。ここでは[デスクトップ クライアント: 1]になります。ついでに Client ID も教えておきましょう。確認の手間が省けます。
    • 割り当て増加のリクエストの対象となる API プロジェクト番号を記入してください(What API project number are you requesting increased quota for? )
      プロジェクト番号を入力して下さい。ここでは [54257] になります。
    • 割り当て増加のリクエストの対象となる YouTube API サービスを指定してください(Which YouTube API Service(s) are you requesting a quota increase for?)
      選択項目にあるものを選択して下さい。ここでは [Data API] になります。
    • リクエストする「追加割り当て」量を記入してください (How much "Additional Quota" are you requesting?)
      割り当てたい追加クォータ量を入力して下さい。1,000,000 単位のクォータが欲しければ、現在のクォータ(10,000 単位)を引いた [990000] になります。実際にはこんなに必要ありません。クォータの消費量を最後にまとめているのでそれに合わせて調整して下さい。300,000 単位あれば足りないことはないと思います。
    • 追加割り当てをリクエストする理由を説明してください(Justification for requesting additional quota?) 最低 200 文字
      使用用途に応じて記入して下さい。私の場合は、Google Drive の動画を YouTube に自動でアップロードするために使用しています。私は Python のソースコードと実行した結果、自動で Google Drive の動画が YouTube にアップロードされるデモ動画を、メールでのやり取りで共有しました。この時点で共有しておいたほうが、迅速に審査が通ると思います。
      In order to harness the power of the YouTube Data API, we have utilized a Python script for the purpose of automating the upload of videos from Google Drive. This approach allows us to efficiently manage video content, saving valuable time and energy by eliminating the need for manual uploads. Through the innovative use of these advanced technologies, we're aiming to streamline our workflow and optimize our operations. Please find the link to a demonstration video illustrating the application of this system below. This demonstration video will provide you with an illustrative understanding of how the process unfolds, giving you an insight into the powerful capabilities of integrating the YouTube Data API with our Python scripts. https://drive.google.com/file/d/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/view?usp=sharing
    • 現在 YouTube API サービスをどのように使用しているか詳しく説明してください(Explain in detail how you use YouTube API Services today) 最低 200 文字
      使用用途に応じて記入して下さい。私の場合は、Google Drive の動画を YouTube に自動でアップロードするために使用しています。
      At present, I am utilizing the YouTube Data API to automatically upload videos from Google Drive by employing Python scripts. This is a convenient way of transferring content from my drive to my YouTube channel without having to manually upload each video. However, I have encountered an obstacle in the form of quota limits. These restrictions limit the number of uploads I can make in a single day, thereby potentially slowing down the dissemination of our content. This limitation, while understandable as a measure to prevent abuse of the system, is impacting the efficiency of my video upload process. I am keen on finding a resolution to this issue to maintain a steady flow of content on our platform.
    • 割り当てを増やさないと API クライアントで使用できなくなるのはどのような機能ですか (What functionality would your API client be lacking without more quota? ) 最低 200 文字
      使用用途に応じて記入して下さい。私の場合は、Google Drive の動画を YouTube に自動でアップロードするために使用しています。
      The function that will no longer be accessible through the API client pertains to the automatic upload of videos to Google Drive using Python scripts. More specifically, this means the automatic uploading of video files stored locally or elsewhere onto Google Drive by executing Python scripts is no longer possible through the API client. This restriction may require rethinking how video content is managed and uploaded, and it might necessitate adjustments or adaptations in current workflows.
    • 割り当ての不足を補うためにどのような回避策を講じますか(例: 機能セットを減らす、推定する、サンプリングを削減する)(What potential workarounds would you use to compensate for less quota? (ex. decreased feature set, estimations, smaller sampling) )
      特に存在しないと回答しましょう。
      There isn't a particular method to compensate for the shortage of allocation.

メールでのやり取り

メールでのやり取りは全て英語でのやり取りになります。ChatGPT や DeepL などを使って翻訳しながら回答していきましょう。画面のスクリーンショットもできれば言語を英語にしてあげたほうがいいと思います。

  • Kindly provide us with a complelete step by step detailed screen cast or video recording of the use case as we need to understand how the API services are being used so that we can establish the complete use case mentioned in the quota request form.(クォータリクエストフォームに記載されている完全なユースケースを確立するために、APIサービスがどのように使用されているかを理解する必要があるため、ユースケースの詳細なステップバイステップのスクリーンキャストまたはビデオレコーディングを提供してください。)
    こちらについては、Python のソースコードと実行した結果、自動で Google Drive の動画が YouTube にアップロードされるデモ動画を共有しました。

  • Kindly provide the YouTube channel link to which the videos are being uploaded.(動画がアップロードされているYouTubeチャンネルのリンクを提供してください。)
    YouTube にアクセスし、アイコンのチャンネルを選択して下さい。その URL を伝えました。

  • Kindly provide a step by step visual reference of the use case i.e screen cast (video recording) of where the videos are being embedded as we need to understand how the API service is being used, so that we can establish the use case mentioned in the quota request form.(APIサービスの使用方法を理解し、クォータリクエストフォームに記載された使用ケースを確立するため、使用ケースの視覚的な参照をステップバイステップで提供してください。つまり、動画が埋め込まれている場所のスクリーンキャスト(ビデオ録画)を提供してください。)
    こちらについても、Python のソースコードと実行した結果、自動で Google Drive の動画が YouTube にアップロードされるデモ動画を共有しました。
    I use the YouTube API to automatically upload videos from Google Drive. The upload procedure is as shown in the following video:
    https://drive.google.com/file/d/xxxxxxxxxxxxxxxxxxxxxxx/view?usp=sharing

  • Also, please provide details on how users can manage YouTube videos comments and ratings by using API services. (ユースケースの視覚的参照、つまりユーザーがYouTubeの動画を検索して視聴する方法のスクリーンキャスト(ビデオ録画)をステップバイステップで提供してください。これにより、我々はクォータリクエストフォームで述べられたユースケースを確立することができます。)
    こちらについては、Python のソースコードと実行した結果、自動で Google Drive の動画が YouTube にアップロードされるデモ動画を共有しました。以下のように回答しました。
    I use the YouTube API to automatically upload videos from Google Drive. The upload procedure is as shown in the following video:
    https://drive.google.com/file/d/xxxxxxxxxxxxxxxxxxxxxxx/view?usp=sharing

  • Also, please explain how users can comment on videos and ratings using API services.(また、ユーザーがAPIサービスを使用してYouTubeの動画のコメントと評価をどのように管理するかについての詳細も提供してください。)
    以下のように回答しました。
    There is no option to comment on videos or rate them using the YouTube API. The usage of the YouTube API is as follows:

    ・Uploading videos to YouTube
    ・Adding descriptions to videos
    ・Creating playlists and adding videos to those playlists
    ・Selecting viewer permissions
    ・Choosing categories

  • Kindly share the valid API client location where the YouTube videos are being played.(YouTubeの動画が再生されている有効なAPIクライアントの場所を共有してください。)
    以下のページの URL を教えました。画像も添付して返信しました。
    The URL for the active API client where YouTube videos are played is as follows. However, you shouldn't be able to access it as it should require additional access rights. I will grant access rights, so please provide the information. The API service information in use is as per the attached image.
    screenshot.2023-07-09 20.58.47.png

クォータの消費量

  • YouTube Data API v3:
    • プレイリストのリスト取得:これは読み取り操作で、1 回のリクエストあたり 1 単位のクォータを消費します。
    • 新しいプレイリストの作成:これは書き込み操作で、1 回のリクエストあたり 50 単位のクォータを消費します。
    • 動画のアップロード: これは書き込み操作で、1 回のリクエストあたり 1600 単位のクォータを消費します。
    • 動画の情報の更新:これは書き込み操作で、1 回のリクエストあたり 50 単位のクォータを消費します。
    • プレイリストにアイテムを追加:これは書き込み操作で、1 回のリクエストあたり 50 単位のクォータを消費します。

申請後のフロー

2023年7月9日

上記内容にて申請(既に申請して、1,000,000 単位のプロジェクトは持っているが検証のために、再度申請してみることにした)。前回は申請が通るまでに 1 ヶ月強かかりましたが、今回はスムーズに申請が通るかなと期待しています。

2023年7月13日

以下のようなメールが届きました。
[英語]
We have found that your API Client is using multiple Project Keys.
[Policy #: III.D.1.c (Accessing YouTube API Services) (link)]

  • A single Project ID should be used per API product/implementation.

We require you to consolidate these Project numbers (12345, 67890) and provide the valid Project Key/Project ID you would be keeping for us to proceed with your compliance review.

私が持っている API クライアントが複数のプロジェクトキーを使っているとのこと。各 API クライアントごとに 1 つのプロジェクト ID を使用しないといけないと怒られてしまいました。これは連絡用のメールアドレスに、以前申請した API クライアントと同じメールアドレスを利用したために、発覚したものだと思います。おそらく連絡用のメールアドレスを別のメールアドレスにしなければこのメールは来なかったと思いますし、一度も申請したことがない方はこのメールは来ないでしょう。

返信として以下のように返しました。
[英語]
Hello,

I'm a bit confused. The project key: 12345 is a project held by the account hoge@gmail.com, and the project key: 67890 is a project held by the account fuga@gmail.com. Even though I've specified the same account var@gmail.com as the contact for both, aren't these projects treated separately?

Anyway, the answers are as follows:
Project Key: 12345
Project ID: dynamic-return-12345
Project Key: 67890
Project ID: smooth-copilot-67890

By the way, I've already completed the quota limit application for 67890.

Thank you in advance.

[日本語]
少し混乱しています。プロジェクトキー:12345 は、アカウント hoge@gmail.com が所有しているプロジェクトであり、プロジェクトキー:67890 はアカウント fuga@gmail.com が所有しているプロジェクトです。両方の連絡先として同じアカウント var@gmail.com を指定していますが、これらのプロジェクトは別々に扱われないのでしょうか。

とにかく、答えは以下の通りです。
プロジェクトキー:12345
プロジェクトID:dynamic-return-12345
プロジェクトキー:67890
プロジェクトID:smooth-copilot-67890

ところで、すでに 67890 のクォータ制限申請を完了しています。

よろしくお願いいたします。

2023年7月20日(申請完了)

以下のようなメールが届きました。クォータ制限を解除したよという内容ですね。最短記録更新!
[英語]
Hello,

*Your application has been approved, based on the information you provided, and your representation that your use of YouTube API Service is in full compliance with the YouTube API Services Terms of Service. *

We have increased your Quota by 1,000,000. The total quota for 12345 is now 1,000,000 units per day.

Please note: this quota has only been granted for the use case mentioned in your application. We may change your quota based on your actual quota usage, and your continued compliance with the YouTube API Services Terms of Service at any time.

*To get in touch with us, you may complete and submit Choose applicable form: Please do not reply to this email. *

  • YouTube API Quota Request Form
  • YouTube Researcher Program Form
  • Appeals Form
  • Change of Control Form
  • Audited Developer request

Thanks,

The YouTube API Services Team.

[日本語]
こんにちは、

あなたが提供した情報と、YouTube API サービスの利用が YouTube API サービス利用規約に完全に準拠しているというあなたの主張に基づき、あなたのアプリケーションは承認されました。

あなたのクオータを 1,000,000 増やしました。12345 の合計クオータは、現在 1 日あたり1,000,000ユニットとなっています。

ご注意ください:このクオータは、あなたの申請に記載されたユースケースのためだけに付与されました。あなたの実際のクオータ使用量と、YouTube API サービス利用規約への継続的な準拠に基づいて、あなたのクオータをいつでも変更することがあります。

私たちと連絡を取るためには、適用可能なフォームを完成させて提出してください:このメールには返信しないでください。

  • YouTube APIクオータリクエストフォーム
  • YouTubeリサーチャープログラムフォーム
  • アピールフォーム
  • コントロール変更フォーム
  • 監査された開発者のリクエスト

ありがとうございました。

YouTube APIサービスチームより

結論

2 回目の申請ということもあり、予想通りスムーズに申請が進みましたね。ただ、返信まで 1 週間は掛けているのかなと思いました(7/13 → 7/20)。ここは対応をもう少し早くして欲しいですね。
申請方法でまとめた通りの手順で申請を行えば、即申請が通ることが証明されたと思います。皆さんも申請するときは、ぜひ真似してみて下さい。

最後に

YouTube API のクォータ制限の解除申請についてまとめてみました。上記内容を参考に申請して頂いても構いませんし、改変しても構いません。参考になれば幸いです。
YouTube API のクォータ制限は 1 日当たり 10,000 単位となっています。かなり少ないですよね。ビデオのアップロードがたったの 6 本しかできないんですよ。デフォルトで 100,000 単位くらいあってもいいと思うんですけどね…(しょっぱいですね)

13
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
10