API Hop Docs
YouTube endpoint reference
Query YouTube videos, channels, Shorts, comments, community posts, search results and stream metadata through 34 authenticated endpoints: 32 GET and 2 POST.
Select an endpoint and send only its documented fields. When alternatives are listed, provide at least one field from each group. Pagination values must come from the preceding response; there is no automatic pagination.
GET operations use query parameters without a request body. Stream V3 uses POST with an application/json body and no query parameters; send proxy_url only in that body. The version segment selects the YouTube interface version. Unknown or duplicate fields are rejected. Keep identifiers and pagination cursors as strings, including values larger than JavaScript can safely represent as numbers.
For synchronous requests: Prices are per successful request, not per returned item. Every page is a separate request. Most operations cost $0.001. The two V2 search variants cost $0.002; the V2 stream variant costs $0.004. See each endpoint below. Account-specific prices take precedence. Supplier volume discounts are not automatically passed through. Failed upstream calls release the reservation; settlement failures return an error and do not trigger a second upstream request.
Caption tasks
POST https://api.apihop.ai/v1/youtube/web-v2/videos/captions returns HTTP 202 and a platform task ID, with Location: /v1/jobs/\{id\}. Query GET https://api.apihop.ai/v1/youtube/web-v2/videos/captions/result?job_id=\{id\} every 2–5 seconds. Only the owning tenant can read the task. Result queries are free; creation costs $0.008 at the list price. No-caption results are successful and billable. The format is fixed at creation (default srt); an optional result format must match or returns HTTP 400. data.result is null until COMPLETED; tasks may end as FAILED. These endpoints retrieve existing captions, not AI transcriptions.
If submission acceptance is uncertain, the request is not replayed and its reservation may remain held until the 30-minute task deadline. A supplier result may remain pending while settlement is reconciled. A transient polling error is not a terminal task failure.
{"success":true,"data":{"id":"9007199254740993001","status":"PROCESSING","result":null},"requestId":"example"}Scope and limitations
The web and web-v2 paths select the upstream interface family. Stream V3 supports POST retrieval with your own fixed-exit HTTP proxy. Stream endpoints return metadata and URLs, not media files or guaranteed downloads. Channel descriptions may require a second separately billed request using continuation_token. No automatic retries are made.
web-get_relate_video
GET https://api.apihop.ai/v1/youtube/web/videos/related
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
video_id | Yes | string |
continuation_token | No | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
search_query | Yes | string |
language_code | No | string; default: "en" |
order_by | No | string; default: "this_month" |
country_code | No | string; default: "us" |
continuation_token | No | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_name | Yes | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_url | Yes | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_id | Yes | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_id | Yes | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_id | Yes | string |
continuation_token | No | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_id | Yes | string |
search_query | Yes | string |
language_code | No | string; default: "en" |
country_code | No | string; default: "us" |
continuation_token | No | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
video_id | Yes | string; minLength: 11; maxLength: 11 |
language_code | No | string; default: "zh-CN" |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
At least one: video_id, video_url.
| Field | Required | Contract |
|---|---|---|
video_id | No | string |
video_url | No | string |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
video_id | Yes | string; minLength: 11; maxLength: 11 |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
sort_by | No | string; top, newest; default: "top" |
continuation_token | No | string |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
continuation_token | Yes | string |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
At least one: channel_id, continuation_token.
| Field | Required | Contract |
|---|---|---|
channel_id | No | string |
continuation_token | No | string |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
need_format | No | boolean; default: true |
curl --get "https://api.apihop.ai/v1/youtube/web-v2/channels/description" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "channel_id=UCeu6U67OzJhV1KwBansH3Dg"web_v2-get_general_search
GET https://api.apihop.ai/v1/youtube/web-v2/search
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
search_query | Yes | string; maxLength: 200 |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
time_zone | No | string; default: "America/Los_Angeles" |
upload_time | No | string; hour, today, week, month, year |
duration | No | string; short, medium, long |
content_type | No | string; video, channel, playlist, movie |
feature | No | string; live, 4k, hd, subtitles, creative_commons, 360, vr180, 3d, hdr, location, purchased |
sort_by | No | string; relevance, upload_date, view_count, rating |
continuation_token | No | string |
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
Price per successful request: $0.002 (2000 credits).
At least one: keyword, continuation_token.
| Field | Required | Contract |
|---|---|---|
keyword | No | string; maxLength: 200 |
continuation_token | No | string |
upload_date | No | string; last_hour, today, this_week, this_month, this_year |
type | No | string; video, channel, playlist, movie |
duration | No | string; short, medium, long |
features | No | string |
sort_by | No | string; relevance, upload_date, view_count, rating |
curl --get "https://api.apihop.ai/v1/youtube/web-v2/search-v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "keyword=Python tutorial"web_v2-get_shorts_search
GET https://api.apihop.ai/v1/youtube/web-v2/search/shorts
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
search_query | Yes | string; maxLength: 200 |
language_code | No | string; default: "en-US" |
country_code | No | string; default: "US" |
time_zone | No | string; default: "America/Los_Angeles" |
upload_time | No | string; hour, today, week, month, year |
sort_by | No | string; relevance, upload_date, view_count, rating |
continuation_token | No | string |
filter_mixed_content | No | boolean; default: true |
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
Price per successful request: $0.002 (2000 credits).
At least one: keyword, continuation_token.
| Field | Required | Contract |
|---|---|---|
keyword | No | string; maxLength: 200 |
continuation_token | No | string |
upload_date | No | string; last_hour, today, this_week, this_month, this_year |
sort_by | No | string; relevance, upload_date, view_count, rating |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_url | Yes | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_id | Yes | string |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_id | Yes | string |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
continuation_token | No | string |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
At least one: video_id, video_url.
| Field | Required | Contract |
|---|---|---|
video_id | No | string |
video_url | No | string |
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
Price per successful request: $0.004 (4000 credits).
At least one: video_id, video_url.
| Field | Required | Contract |
|---|---|---|
video_id | No | string |
video_url | No | string |
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
Price per successful request: $0.001 (1000 credits).
At least one: video_id, video_url.
| Field | Required | Contract |
|---|---|---|
video_id | No | string |
video_url | No | string |
itag | Yes | integer |
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
Price per successful request: $0.008 (8000 credits).
At least one: video_id, video_url.
| Field | Required | Contract |
|---|---|---|
video_id | No | string |
video_url | No | string |
language_code | No | string |
format | No | string; srt, xml, json3, txt; default: "srt" |
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
Price per successful request: $0 (0 credits).
| Field | Required | Contract |
|---|---|---|
job_id | Yes | string; ^[1-9][0-9]{0,18}$ |
format | No | string; srt, xml, json3, txt; default: "srt" |
curl --get "https://api.apihop.ai/v1/youtube/web-v2/videos/captions/result" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "job_id=9007199254740993001"web_v2-get_related_videos
GET https://api.apihop.ai/v1/youtube/web-v2/videos/related
Price per successful request: $0.001 (1000 credits).
At least one: video_id, video_url.
| Field | Required | Contract |
|---|---|---|
video_id | No | string |
video_url | No | string |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
At least one: channel_id, channel_url.
| Field | Required | Contract |
|---|---|---|
channel_id | No | string |
channel_url | No | string |
continuation_token | No | string |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
keyword | Yes | string; maxLength: 200 |
language | No | string; default: "en" |
region | No | string; default: "US" |
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
Price per successful request: $0.001 (1000 credits).
At least one: keyword, continuation_token.
| Field | Required | Contract |
|---|---|---|
keyword | No | string; maxLength: 200 |
continuation_token | No | string |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
channel_id | Yes | string |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
continuation_token | No | string |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
post_id | Yes | string |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
At least one: post_id, continuation_token.
| Field | Required | Contract |
|---|---|---|
post_id | No | string |
continuation_token | No | string |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
need_format | No | boolean; default: true |
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
Price per successful request: $0.001 (1000 credits).
| Field | Required | Contract |
|---|---|---|
continuation_token | Yes | string |
language_code | No | string; default: "zh-CN" |
country_code | No | string; default: "US" |
need_format | No | boolean; default: true |
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
Price per successful request: $0.003 (3000 credits).
Stream V3 uses POST JSON over HTTPS and costs $0.003 per successful request. Provide video_id and proxy_url (http:// with an explicit port and public host); private, loopback and link-local destinations are forbidden. URL-encode reserved characters in credentials. Use a fixed exit or sticky proxy session. itags defaults to ["137", "140"]; unavailable formats fail without substitution. verify_download defaults to false. Download through the same proxy session and actual public exit IP with streams[].download_headers. Successful URL extraction (HTTP 200) is billable even when all_selected_streams_verified or streams[].verified is false. Verification samples small byte ranges, not the complete file. URLs and proxy sessions expire independently; merge separate audio/video streams yourself.
| Field | Required | Contract |
|---|---|---|
video_id | Yes | string; ^[A-Za-z0-9_-]{11}$ |
proxy_url | Yes | string; minLength: 1; maxLength: 2048; writeOnly: true |
itags | No | array; items: string ^[0-9]+$; minItems: 1; maxItems: 4; uniqueItems: true; default: ["137","140"] |
verify_download | No | boolean; default: false |
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}'Responses
Synchronous endpoints preserve the native JSON response. Caption endpoints return success, data.id, data.status, data.result and requestId. The examples below are illustrative, not live results.
{"code":200,"data":{"channel_id":"UCXuqSBlHAE6Xw-yeJA0Tunw"}}Errors
Platform errors use HTTP 400 for invalid parameters, 401 for invalid authentication, 402 for insufficient credit, 403 for denied gateway access, 429 for rate limits, and 5xx for service or supplier failures. Keep X-Request-Id for troubleshooting. Do not treat an upstream HTTP 200 with a failed business code as success.
Sources
The endpoint list and prices were checked against the official schema and live price metadata on 2026-10-31. Live metadata takes precedence over conflicting prose prices.