API Hop

ドキュメント

API Hop ドキュメント

YouTube エンドポイントリファレンス

認証付きの 34 個のエンドポイント(GET 32 個、POST 2 個)で、YouTube の動画、チャンネル、Shorts、コメント、コミュニティ投稿、検索結果、ストリーム情報を取得します。

選んだエンドポイントに記載されたフィールドだけを送信してください。代替フィールドの各グループから少なくとも 1 つを指定します。カーソルは前の応答から取得し、自動ページングは行いません。

GET 操作は本文なしのクエリパラメーターを使用します。V3 ストリーム操作は application/json 本文付きの POST を使い、クエリパラメーターは受け付けません。proxy_url は本文だけに指定してください。バージョン部分で YouTube インターフェースを選択します。未知のフィールドや重複は拒否されます。識別子とページカーソルは、JavaScript の安全な整数範囲を超える値も含めて文字列として保持してください。

同期リクエストの課金:返された件数ではなく、成功したリクエストごとに課金されます。各ページは別のリクエストです。大半の操作は $0.001 です。V2 の検索バリアント 2 種は $0.002、V2 のストリームバリアントは $0.004 です。各エンドポイントの料金を確認してください。 アカウント固有の料金が優先されます。供給元の数量割引は自動適用されません。上流呼び出しの失敗時は予約額を解放し、精算失敗時は上流に再送せずエラーを返します。

字幕タスク

POST https://api.apihop.ai/v1/youtube/web-v2/videos/captions は HTTP 202、プラットフォームのタスク ID、Location: /v1/jobs/\{id\} を返します。GET https://api.apihop.ai/v1/youtube/web-v2/videos/captions/result?job_id=\{id\} を 2–5 秒間隔で呼び出してください。所有テナントのみ取得できます。結果照会は無料で、作成の標準価格は $0.008 です。字幕なしも成功として課金されます。形式は作成時に固定され、既定は srt です。照会時の任意の format が異なると HTTP 400 になります。COMPLETED まで data.result は null で、FAILED になる場合もあります。既存字幕のみを取得し、AI 文字起こしは行いません。

送信が受理されたか不明な場合は再送せず、残高の予約をタスクの 30 分の期限まで保持する場合があります。上流の結果が確定していても、課金の照合中は保留になる場合があります。一時的な照会エラーはタスクの最終的な失敗を意味しません。

json
{"success":true,"data":{"id":"9007199254740993001","status":"PROCESSING","result":null},"requestId":"example"}

対象範囲と制限

web と web-v2 はインターフェースの系列を選択します。V3 では、固定出口の HTTP プロキシを持ち込んで POST でリンクを取得できます。ストリーム操作は情報と URL を返し、メディアファイルやダウンロードの成功を保証しません。チャンネル説明では continuation_token を使った別料金の 2 回目のリクエストが必要な場合があります。自動再試行は行いません。

web-get_relate_video

GET https://api.apihop.ai/v1/youtube/web/videos/related

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
video_idはいstring
continuation_tokenいいえstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/videos/related" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "video_id=LuIL5JATZsc"

web-search_video

GET https://api.apihop.ai/v1/youtube/web/search/videos

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
search_queryはいstring
language_codeいいえstring; default: "en"
order_byいいえstring; default: "this_month"
country_codeいいえstring; default: "us"
continuation_tokenいいえstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/search/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "search_query=Minecraft"

web-get_channel_id

GET https://api.apihop.ai/v1/youtube/web/channels/id

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_nameはいstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/channels/id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_name=LinusTechTips"

web-get_channel_id_v2

GET https://api.apihop.ai/v1/youtube/web/channels/id/by-url

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_urlはいstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/channels/id/by-url" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_url=https://www.youtube.com/@CozyCraftYT"

web-get_channel_url

GET https://api.apihop.ai/v1/youtube/web/channels/url

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_idはいstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/channels/url" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCeu6U67OzJhV1KwBansH3Dg"

web-get_channel_info

GET https://api.apihop.ai/v1/youtube/web/channels/info

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_idはいstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/channels/info" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw"

web-get_channel_short_videos

GET https://api.apihop.ai/v1/youtube/web/channels/shorts

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_idはいstring
continuation_tokenいいえstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/channels/shorts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw"

web-search_channel

GET https://api.apihop.ai/v1/youtube/web/channels/search

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_idはいstring
search_queryはいstring
language_codeいいえstring; default: "en"
country_codeいいえstring; default: "us"
continuation_tokenいいえstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web/channels/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw" \
  --data-urlencode "search_query=AMD"

web_v2-get_video_info

GET https://api.apihop.ai/v1/youtube/web-v2/videos/info

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
video_idはいstring; minLength: 11; maxLength: 11
language_codeいいえstring; default: "zh-CN"
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/info" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "video_id=oaSNBz4qMQY"

web_v2-get_video_info_v2

GET https://api.apihop.ai/v1/youtube/web-v2/videos/info-v2

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: video_id, video_url.

フィールド必須仕様
video_idいいえstring
video_urlいいえstring
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/info-v2" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "video_id=dQw4w9WgXcQ"

web_v2-get_video_comments

GET https://api.apihop.ai/v1/youtube/web-v2/videos/comments

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
video_idはいstring; minLength: 11; maxLength: 11
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
sort_byいいえstring; top, newest; default: "top"
continuation_tokenいいえstring
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/comments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "video_id=LuIL5JATZsc"

web_v2-get_video_comment_replies

GET https://api.apihop.ai/v1/youtube/web-v2/videos/comments/replies

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
continuation_tokenはいstring
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/comments/replies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "continuation_token=example"

web_v2-get_channel_description

GET https://api.apihop.ai/v1/youtube/web-v2/channels/description

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: channel_id, continuation_token.

フィールド必須仕様
channel_idいいえstring
continuation_tokenいいえstring
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/channels/description" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCeu6U67OzJhV1KwBansH3Dg"

GET https://api.apihop.ai/v1/youtube/web-v2/search

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
search_queryはいstring; maxLength: 200
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
time_zoneいいえstring; default: "America/Los_Angeles"
upload_timeいいえstring; hour, today, week, month, year
durationいいえstring; short, medium, long
content_typeいいえstring; video, channel, playlist, movie
featureいいえstring; live, 4k, hd, subtitles, creative_commons, 360, vr180, 3d, hdr, location, purchased
sort_byいいえstring; relevance, upload_date, view_count, rating
continuation_tokenいいえstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "search_query=Python编程"

web_v2-get_general_search_v2

GET https://api.apihop.ai/v1/youtube/web-v2/search-v2

成功したリクエストごとの料金: $0.002 (2000 credits).

少なくとも 1 つ: keyword, continuation_token.

フィールド必須仕様
keywordいいえstring; maxLength: 200
continuation_tokenいいえstring
upload_dateいいえstring; last_hour, today, this_week, this_month, this_year
typeいいえstring; video, channel, playlist, movie
durationいいえstring; short, medium, long
featuresいいえstring
sort_byいいえstring; relevance, upload_date, view_count, rating
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/search-v2" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "keyword=Python tutorial"

GET https://api.apihop.ai/v1/youtube/web-v2/search/shorts

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
search_queryはいstring; maxLength: 200
language_codeいいえstring; default: "en-US"
country_codeいいえstring; default: "US"
time_zoneいいえstring; default: "America/Los_Angeles"
upload_timeいいえstring; hour, today, week, month, year
sort_byいいえstring; relevance, upload_date, view_count, rating
continuation_tokenいいえstring
filter_mixed_contentいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/search/shorts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "search_query=Python编程"

web_v2-get_shorts_search_v2

GET https://api.apihop.ai/v1/youtube/web-v2/search/shorts-v2

成功したリクエストごとの料金: $0.002 (2000 credits).

少なくとも 1 つ: keyword, continuation_token.

フィールド必須仕様
keywordいいえstring; maxLength: 200
continuation_tokenいいえstring
upload_dateいいえstring; last_hour, today, this_week, this_month, this_year
sort_byいいえstring; relevance, upload_date, view_count, rating
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/search/shorts-v2" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "keyword=coding tips"

web_v2-get_channel_id

GET https://api.apihop.ai/v1/youtube/web-v2/channels/id

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_urlはいstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/channels/id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_url=https://www.youtube.com/@CozyCraftYT"

web_v2-get_channel_url

GET https://api.apihop.ai/v1/youtube/web-v2/channels/url

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_idはいstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/channels/url" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCeu6U67OzJhV1KwBansH3Dg"

web_v2-get_channel_videos

GET https://api.apihop.ai/v1/youtube/web-v2/channels/videos

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_idはいstring
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
continuation_tokenいいえstring
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/channels/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg"

web_v2-get_video_streams

GET https://api.apihop.ai/v1/youtube/web-v2/videos/streams

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: video_id, video_url.

フィールド必須仕様
video_idいいえstring
video_urlいいえstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/streams" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "video_id=dQw4w9WgXcQ"

web_v2-get_video_streams_v2

GET https://api.apihop.ai/v1/youtube/web-v2/videos/streams-v2

成功したリクエストごとの料金: $0.004 (4000 credits).

少なくとも 1 つ: video_id, video_url.

フィールド必須仕様
video_idいいえstring
video_urlいいえstring
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/streams-v2" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "video_id=dQw4w9WgXcQ"

web_v2-get_signed_stream_url

GET https://api.apihop.ai/v1/youtube/web-v2/videos/streams/signed-url

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: video_id, video_url.

フィールド必須仕様
video_idいいえstring
video_urlいいえstring
itagはいinteger
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/streams/signed-url" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "itag=18" \
  --data-urlencode "video_id=dQw4w9WgXcQ"

web_v2-get_video_captions

POST https://api.apihop.ai/v1/youtube/web-v2/videos/captions

成功したリクエストごとの料金: $0.008 (8000 credits).

少なくとも 1 つ: video_id, video_url.

フィールド必須仕様
video_idいいえstring
video_urlいいえstring
language_codeいいえstring
formatいいえstring; srt, xml, json3, txt; default: "srt"
bash
curl -X POST "https://api.apihop.ai/v1/youtube/web-v2/videos/captions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"format":"srt","video_id":"dQw4w9WgXcQ"}'

web_v2-get_video_captions_result

GET https://api.apihop.ai/v1/youtube/web-v2/videos/captions/result

成功したリクエストごとの料金: $0 (0 credits).

フィールド必須仕様
job_idはいstring; ^[1-9][0-9]{0,18}$
formatいいえstring; srt, xml, json3, txt; default: "srt"
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/captions/result" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "job_id=9007199254740993001"

GET https://api.apihop.ai/v1/youtube/web-v2/videos/related

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: video_id, video_url.

フィールド必須仕様
video_idいいえstring
video_urlいいえstring
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/related" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "video_id=dQw4w9WgXcQ"

web_v2-get_channel_shorts

GET https://api.apihop.ai/v1/youtube/web-v2/channels/shorts

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: channel_id, channel_url.

フィールド必須仕様
channel_idいいえstring
channel_urlいいえstring
continuation_tokenいいえstring
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/channels/shorts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCuAXFkgsw1L7xaCfnd5JJOw"

web_v2-get_search_suggestions

GET https://api.apihop.ai/v1/youtube/web-v2/search/suggestions

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
keywordはいstring; maxLength: 200
languageいいえstring; default: "en"
regionいいえstring; default: "US"
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/search/suggestions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "keyword=Rick Astley"

web_v2-search_channels

GET https://api.apihop.ai/v1/youtube/web-v2/search/channels

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: keyword, continuation_token.

フィールド必須仕様
keywordいいえstring; maxLength: 200
continuation_tokenいいえstring
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/search/channels" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "keyword=Rick Astley"

web_v2-get_channel_community_posts

GET https://api.apihop.ai/v1/youtube/web-v2/channels/posts

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
channel_idはいstring
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
continuation_tokenいいえstring
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/channels/posts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "channel_id=UCkRfArvrzheW2E7b6SVT7vQ"

web_v2-get_post_detail

GET https://api.apihop.ai/v1/youtube/web-v2/posts/detail

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
post_idはいstring
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/posts/detail" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "post_id=UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy"

web_v2-get_post_comments

GET https://api.apihop.ai/v1/youtube/web-v2/posts/comments

成功したリクエストごとの料金: $0.001 (1000 credits).

少なくとも 1 つ: post_id, continuation_token.

フィールド必須仕様
post_idいいえstring
continuation_tokenいいえstring
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/posts/comments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "post_id=UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy"

web_v2-get_post_comment_replies

GET https://api.apihop.ai/v1/youtube/web-v2/posts/comments/replies

成功したリクエストごとの料金: $0.001 (1000 credits).

フィールド必須仕様
continuation_tokenはいstring
language_codeいいえstring; default: "zh-CN"
country_codeいいえstring; default: "US"
need_formatいいえboolean; default: true
bash
curl --get "https://api.apihop.ai/v1/youtube/web-v2/posts/comments/replies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "continuation_token=example"

web_v2-get_video_streams_v3

POST https://api.apihop.ai/v1/youtube/web-v2/videos/streams-v3

成功したリクエストごとの料金: $0.003 (3000 credits).

V3 は HTTPS 経由の POST JSON を使い、成功したリクエストごとに $0.003 です。video_id と proxy_url(http://、明示的なポート、公開ホスト)を指定します。プライベート、ループバック、リンクローカル宛先は禁止で、認証情報の予約文字は URL エンコードします。固定出口またはスティッキーセッションを使ってください。itags の既定値は ["137", "140"] で、利用できない形式は自動置換せず失敗します。verify_download の既定値は false です。同じプロキシセッションと実際の公開出口 IP を使用し、streams[].download_headers を付けてダウンロードしてください。URL 取得が成功した HTTP 200 は、all_selected_streams_verified または streams[].verified が false でも課金されます。検証は少量のバイトの抽出検査で、ファイル全体の検証ではありません。URL とセッションの期限は独立しています。分離された音声と動画はクライアント側で結合します。

フィールド必須仕様
video_idはいstring; ^[A-Za-z0-9_-]{11}$
proxy_urlはいstring; minLength: 1; maxLength: 2048; writeOnly: true
itagsいいえarray; items: string ^[0-9]+$; minItems: 1; maxItems: 4; uniqueItems: true; default: ["137","140"]
verify_downloadいいえboolean; default: false
bash
curl -X POST "https://api.apihop.ai/v1/youtube/web-v2/videos/streams-v3" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"video_id":"phlZ2J3x4hI","proxy_url":"http://USERNAME:PASSWORD@proxy.example.com:1000","itags":["137","140"],"verify_download":false}'

レスポンス

同期エンドポイントは元の JSON 応答を保持します。字幕エンドポイントは success、data.id、data.status、data.result、requestId を返します。以下は説明用の例で、実際の取得結果ではありません。

json
{"code":200,"data":{"channel_id":"UCXuqSBlHAE6Xw-yeJA0Tunw"}}

エラー

HTTP 400 は不正なパラメーター、401 は認証失敗、402 は残高不足、403 はアクセス拒否、429 はレート制限、5xx はサービスまたは供給元の障害を示します。調査のため X-Request-Id を保存してください。業務コードが失敗を示す HTTP 200 は成功ではありません。

出典

2026-10-31 に公式スキーマと最新の料金メタデータを照合しました。説明文の料金と矛盾する場合は、最新メタデータを優先します。

TikHub · OpenAPI · Prices