API Hop Docs
YouTube Data API
Query YouTube videos, channels, Shorts, comments, community posts, search results and stream metadata through 34 authenticated endpoints: 32 GET and 2 POST.
Query YouTube videos, channels, Shorts, comments, community posts, search results and stream metadata through 34 authenticated endpoints: 32 GET and 2 POST.
Authentication
Use your API Hop API key in the authorization header. Availability depends on enabled gateways and API key permissions; documentation alone does not confirm production availability.
Authorization: Bearer YOUR_API_KEYRequests and caption tasks
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.
curl --get "https://api.apihop.ai/v1/youtube/web/channels/id" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "channel_name=LinusTechTips"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"}}Billing and pagination
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.
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.
Reference
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.
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.