API Hop

Documentation

Documentation API Hop

Référence des endpoints YouTube

Consultez les vidéos, chaînes, Shorts, commentaires, publications communautaires, résultats de recherche et métadonnées de flux YouTube via 34 endpoints authentifiés : 32 GET et 2 POST.

Envoyez uniquement les champs documentés pour l’endpoint choisi. Fournissez au moins un champ de chaque groupe d’alternatives. Les curseurs proviennent de la réponse précédente ; aucune pagination automatique n’est effectuée.

Les opérations GET utilisent des paramètres de requête, sans corps. Le flux V3 utilise POST avec un corps application/json, sans paramètres de requête ; proxy_url doit figurer uniquement dans ce corps. Le segment de version choisit la version de l’interface YouTube. Les champs inconnus ou répétés sont refusés. Conservez les identifiants et curseurs sous forme de chaînes, y compris au-delà de la précision entière sûre de JavaScript.

Pour les requêtes synchrones : La facturation porte sur chaque requête réussie, pas sur les éléments renvoyés. Chaque page est une requête distincte. La plupart des opérations coûtent $0.001. Les deux variantes de recherche V2 coûtent $0.002 et la variante de flux V2 $0.004. Consultez le prix de chaque endpoint. Les tarifs propres au compte prévalent. Les remises de volume du fournisseur ne sont pas automatiquement répercutées. Un échec fournisseur libère la réservation ; un échec de règlement renvoie une erreur sans répéter l’appel fournisseur.

Tâches de sous-titres

POST https://api.apihop.ai/v1/youtube/web-v2/videos/captions renvoie HTTP 202, un ID de tâche de la plateforme et Location: /v1/jobs/\{id\}. Interrogez GET https://api.apihop.ai/v1/youtube/web-v2/videos/captions/result?job_id=\{id\} toutes les 2–5 secondes. Seul le tenant propriétaire peut lire la tâche. La consultation est gratuite ; la création coûte $0.008 au tarif catalogue. Une absence de sous-titres est un succès facturable. Le format est fixé à la création (srt par défaut) ; le format facultatif de consultation doit correspondre, sinon HTTP 400 est renvoyé. data.result reste null avant COMPLETED ; la tâche peut aussi finir en FAILED. Seuls les sous-titres existants sont récupérés, sans transcription IA.

Si l’acceptation de la soumission est incertaine, elle n’est pas répétée et la réservation peut rester bloquée jusqu’au délai de 30 minutes de la tâche. Un résultat fournisseur peut rester en attente pendant le rapprochement de la facturation. Une erreur temporaire de consultation ne signifie pas un échec définitif.

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

Périmètre et limites

web et web-v2 sélectionnent la famille d’interfaces. Le flux V3 accepte POST avec votre propre proxy HTTP à IP de sortie fixe. Les flux renvoient des métadonnées et des URL, pas des fichiers ni une garantie de téléchargement. La description d’une chaîne peut nécessiter une deuxième requête facturée avec continuation_token. Aucune nouvelle tentative automatique.

web-get_relate_video

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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
video_idOuistring
continuation_tokenNonstring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
search_queryOuistring
language_codeNonstring; default: "en"
order_byNonstring; default: "this_month"
country_codeNonstring; default: "us"
continuation_tokenNonstring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_nameOuistring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_urlOuistring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_idOuistring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_idOuistring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_idOuistring
continuation_tokenNonstring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_idOuistring
search_queryOuistring
language_codeNonstring; default: "en"
country_codeNonstring; default: "us"
continuation_tokenNonstring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
video_idOuistring; minLength: 11; maxLength: 11
language_codeNonstring; default: "zh-CN"
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: video_id, video_url.

ChampObligatoireContrat
video_idNonstring
video_urlNonstring
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
video_idOuistring; minLength: 11; maxLength: 11
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
sort_byNonstring; top, newest; default: "top"
continuation_tokenNonstring
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
continuation_tokenOuistring
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: channel_id, continuation_token.

ChampObligatoireContrat
channel_idNonstring
continuation_tokenNonstring
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
search_queryOuistring; maxLength: 200
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
time_zoneNonstring; default: "America/Los_Angeles"
upload_timeNonstring; hour, today, week, month, year
durationNonstring; short, medium, long
content_typeNonstring; video, channel, playlist, movie
featureNonstring; live, 4k, hd, subtitles, creative_commons, 360, vr180, 3d, hdr, location, purchased
sort_byNonstring; relevance, upload_date, view_count, rating
continuation_tokenNonstring
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

Prix par requête réussie: $0.002 (2000 credits).

Au moins un: keyword, continuation_token.

ChampObligatoireContrat
keywordNonstring; maxLength: 200
continuation_tokenNonstring
upload_dateNonstring; last_hour, today, this_week, this_month, this_year
typeNonstring; video, channel, playlist, movie
durationNonstring; short, medium, long
featuresNonstring
sort_byNonstring; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
search_queryOuistring; maxLength: 200
language_codeNonstring; default: "en-US"
country_codeNonstring; default: "US"
time_zoneNonstring; default: "America/Los_Angeles"
upload_timeNonstring; hour, today, week, month, year
sort_byNonstring; relevance, upload_date, view_count, rating
continuation_tokenNonstring
filter_mixed_contentNonboolean; 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

Prix par requête réussie: $0.002 (2000 credits).

Au moins un: keyword, continuation_token.

ChampObligatoireContrat
keywordNonstring; maxLength: 200
continuation_tokenNonstring
upload_dateNonstring; last_hour, today, this_week, this_month, this_year
sort_byNonstring; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_urlOuistring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_idOuistring
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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_idOuistring
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
continuation_tokenNonstring
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: video_id, video_url.

ChampObligatoireContrat
video_idNonstring
video_urlNonstring
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

Prix par requête réussie: $0.004 (4000 credits).

Au moins un: video_id, video_url.

ChampObligatoireContrat
video_idNonstring
video_urlNonstring
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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: video_id, video_url.

ChampObligatoireContrat
video_idNonstring
video_urlNonstring
itagOuiinteger
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

Prix par requête réussie: $0.008 (8000 credits).

Au moins un: video_id, video_url.

ChampObligatoireContrat
video_idNonstring
video_urlNonstring
language_codeNonstring
formatNonstring; 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

Prix par requête réussie: $0 (0 credits).

ChampObligatoireContrat
job_idOuistring; ^[1-9][0-9]{0,18}$
formatNonstring; 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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: video_id, video_url.

ChampObligatoireContrat
video_idNonstring
video_urlNonstring
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: channel_id, channel_url.

ChampObligatoireContrat
channel_idNonstring
channel_urlNonstring
continuation_tokenNonstring
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
keywordOuistring; maxLength: 200
languageNonstring; default: "en"
regionNonstring; 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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: keyword, continuation_token.

ChampObligatoireContrat
keywordNonstring; maxLength: 200
continuation_tokenNonstring
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
channel_idOuistring
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
continuation_tokenNonstring
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
post_idOuistring
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

Au moins un: post_id, continuation_token.

ChampObligatoireContrat
post_idNonstring
continuation_tokenNonstring
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
need_formatNonboolean; 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

Prix par requête réussie: $0.001 (1000 credits).

ChampObligatoireContrat
continuation_tokenOuistring
language_codeNonstring; default: "zh-CN"
country_codeNonstring; default: "US"
need_formatNonboolean; 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

Prix par requête réussie: $0.003 (3000 credits).

Le flux V3 utilise POST JSON via HTTPS et coûte $0.003 par requête réussie. Fournissez video_id et proxy_url (http:// avec port explicite et hôte public). Les destinations privées, de bouclage et locales au lien sont interdites ; encodez les caractères réservés des identifiants. Utilisez une sortie fixe ou une session persistante. itags vaut ["137", "140"] par défaut ; un format absent provoque un échec sans remplacement. verify_download vaut false par défaut. Téléchargez avec la même session proxy, la même IP publique de sortie réelle et streams[].download_headers. Une extraction d’URL réussie (HTTP 200) est facturée même si all_selected_streams_verified ou streams[].verified vaut false. La vérification échantillonne quelques octets, pas le fichier entier. URL et sessions expirent indépendamment ; fusionnez les flux audio et vidéo séparés côté client.

ChampObligatoireContrat
video_idOuistring; ^[A-Za-z0-9_-]{11}$
proxy_urlOuistring; minLength: 1; maxLength: 2048; writeOnly: true
itagsNonarray; items: string ^[0-9]+$; minItems: 1; maxItems: 4; uniqueItems: true; default: ["137","140"]
verify_downloadNonboolean; 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}'

Réponses

Les endpoints synchrones conservent la réponse JSON native. Ceux des sous-titres renvoient success, data.id, data.status, data.result et requestId. Les exemples sont illustratifs, pas des résultats réels.

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

Erreurs

HTTP 400 indique des paramètres invalides, 401 une authentification invalide, 402 un solde insuffisant, 403 un accès refusé, 429 une limitation de débit et 5xx une défaillance du service ou du fournisseur. Conservez X-Request-Id pour le diagnostic. Un HTTP 200 contenant un code métier d’échec n’est pas un succès.

Sources officielles

Les endpoints et tarifs ont été vérifiés le 2026-10-31 dans le schéma officiel et les métadonnées tarifaires actuelles. Ces métadonnées prévalent sur les prix contradictoires du texte.

TikHub · OpenAPI · Prices