# YouTube on Onekey > 44 endpoints for YouTube (20 stable, 24 beta), 1 to 72 credits each. Category: Video & streaming. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Access: 37 of 44 endpoints are marked "needs a pack" or "may need a pack": free-grant credits reach only the open fetch path; a verified email and a purchased pack unlock the rest. Page: https://onekey.dev/platforms/youtube Reference (Markdown): https://onekey.dev/docs/api/youtube.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 44 mapped YouTube endpoints return each: - `author.displayName` (string): 32 - `content.id` (string): 24 - `author.id` (string): 23 - `content.title` (string): 23 - `content.text` (string): 20 - `media.thumbnailUrl` (URL): 20 - `content.createdAt` (ISO 8601 date): 10 - `engagement.views` (integer): 9 - `author.avatarUrl` (URL): 8 - `author.username` (string): 8 - `engagement.comments` (integer): 7 - `engagement.likes` (integer): 7 - `author.url` (URL): 6 - `content.url` (URL): 5 - `author.bio` (string): 4 - `media.durationSeconds` (number): 4 - `media.url` (URL): 4 - `author.followers` (integer): 3 - `entity.name` (string): 3 - `media.mimeType` (string): 3 - `author.verified` (boolean): 2 - `entity.id` (string): 2 - `media.height` (integer): 2 - `media.sizeBytes` (integer): 2 - `media.width` (integer): 2 - `author.contentCount` (integer): 1 - `author.country` (string): 1 - `author.createdAt` (ISO 8601 date): 1 - `content.category` (string): 1 - `entity.description` (string): 1 - `entity.stats.itemCount` (integer): 1 - `media.previewUrl` (URL): 1 - plus 35 platform-specific fields under `ext.` ## Endpoints ### youtube.channel YouTube channel details and statistics by channel id. - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/channel?id=UCuAXFkgsw1L7xaCfnd5JJOw` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube channel id (UC...) - Fields returned: `author.id`, `author.displayName`, `author.bio`, `author.username`, `author.avatarUrl`, `author.followers`, `engagement.views`, `ext.videos` - Reference: https://onekey.dev/docs/api/youtube/channel.md ### youtube.channel_about A YouTube channel's public business contact: email (when the channel lists one) and country. - Price: 72 credits per fresh call. Status: beta. Access: needs a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/channel_about?handle=mkbhd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `handle` (string, optional): Channel handle, e.g. @mkbhd - `channel_id` (string, optional): YouTube channel id (UC + 22 chars) - `url` (string, optional): Channel URL - Fields returned: `author.id`, `author.displayName`, `author.country`, `author.url`, `ext.email` - Reference: https://onekey.dev/docs/api/youtube/channel_about.md ### youtube.channel_by_handle YouTube channel details by @handle. - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/channel_by_handle?handle=%40rickastley` with header `x-api-key: YOUR_API_KEY` - Parameters: - `handle` (string, required): Channel handle, e.g. @rickastley - Fields returned: `author.id`, `author.displayName`, `author.bio`, `author.username`, `author.avatarUrl`, `author.followers`, `engagement.views`, `ext.videos` - Reference: https://onekey.dev/docs/api/youtube/channel_by_handle.md ### youtube.channel_playlists Playlists published by a YouTube channel (Playlists tab). - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/channel_playlists?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw` with header `x-api-key: YOUR_API_KEY` - Parameters: - `channel_id` (string, required): YouTube channel id (UC + 22 chars) - Fields returned: `content.id`, `content.title`, `media.thumbnailUrl` - Reference: https://onekey.dev/docs/api/youtube/channel_playlists.md ### youtube.channel_posts Community posts from a YouTube channel (Posts tab). - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/channel_posts?channel_id=UCX6OQ3DkcsbYNE6H8uQQuVA` with header `x-api-key: YOUR_API_KEY` - Parameters: - `channel_id` (string, required): YouTube channel id (UC + 22 chars) - Fields returned: `content.id`, `author.displayName`, `author.id`, `content.text`, `ext.publishedText`, `ext.likesText`, `ext.commentsText` - Reference: https://onekey.dev/docs/api/youtube/channel_posts.md ### youtube.channel_profile YouTube channel profile: title, handle, subscriber and video counts, description, avatar. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/channel_profile?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw` with header `x-api-key: YOUR_API_KEY` - Parameters: - `channel_id` (string, required): YouTube channel id (UC + 22 chars) - Fields returned: `author.id`, `author.displayName`, `author.username`, `author.url`, `content.text`, `author.avatarUrl`, `ext.followersText`, `ext.videosText`, `ext.familySafe` - Reference: https://onekey.dev/docs/api/youtube/channel_profile.md ### youtube.channel_search Search YouTube channels by keyword. - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/channel_search?q=mrbeast` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `author.id`, `author.displayName`, `author.username`, `content.text`, `author.avatarUrl`, `ext.followersText` - Reference: https://onekey.dev/docs/api/youtube/channel_search.md ### youtube.channel_shorts Shorts from a YouTube channel (Shorts tab). - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/channel_shorts?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw` with header `x-api-key: YOUR_API_KEY` - Parameters: - `channel_id` (string, required): YouTube channel id (UC + 22 chars) - Fields returned: `content.id`, `content.title`, `media.thumbnailUrl`, `ext.viewsText` - Reference: https://onekey.dev/docs/api/youtube/channel_shorts.md ### youtube.channel_streams Live streams and past broadcasts from a YouTube channel (Live tab). - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/channel_streams?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw` with header `x-api-key: YOUR_API_KEY` - Parameters: - `channel_id` (string, required): YouTube channel id (UC + 22 chars) - Fields returned: `content.id`, `content.title`, `media.thumbnailUrl`, `ext.viewsText`, `ext.publishedText`, `ext.durationText` - Reference: https://onekey.dev/docs/api/youtube/channel_streams.md ### youtube.channel_videos Latest uploads from a YouTube channel (Videos tab). - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/channel_videos?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw` with header `x-api-key: YOUR_API_KEY` - Parameters: - `channel_id` (string, required): YouTube channel id (UC + 22 chars) - Fields returned: `content.id`, `content.title`, `media.thumbnailUrl`, `ext.viewsText`, `ext.publishedText`, `ext.durationText` - Reference: https://onekey.dev/docs/api/youtube/channel_videos.md ### youtube.channels_batch Details and statistics for up to 10 YouTube channels in one call. - Price: 1 credit per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/channels_batch?ids=UCuAXFkgsw1L7xaCfnd5JJOw` with header `x-api-key: YOUR_API_KEY` - Parameters: - `ids` (string, required): Comma-separated YouTube channel ids (UC..., 1 to 10) - Fields returned: `author.id`, `author.displayName`, `author.bio`, `author.username`, `author.createdAt`, `author.avatarUrl`, `author.followers`, `author.contentCount`, `engagement.views` - Reference: https://onekey.dev/docs/api/youtube/channels_batch.md ### youtube.comment_replies Replies to a YouTube comment (cursor from the parent comment's replies continuation). - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/comment_replies?cursor=Eg0SC2RRdzR3OVdnWGNRGAYyJSIRIgtkUXc0dzlXZ1hjUTAAeAJCEGNvbW1lbnRzLXNlY3Rpb24%253D` with header `x-api-key: YOUR_API_KEY` - Parameters: - `cursor` (string, required): Replies continuation token from a comment thread - Fields returned: `content.id`, `content.text`, `author.id`, `author.displayName`, `author.avatarUrl`, `author.verified`, `engagement.comments`, `ext.publishedText`, `ext.likesText` - Reference: https://onekey.dev/docs/api/youtube/comment_replies.md ### youtube.comments Top-level comments of a YouTube video (first 20). - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/comments?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `content.id`, `content.text`, `author.displayName`, `engagement.likes`, `content.createdAt`, `engagement.comments` - Reference: https://onekey.dev/docs/api/youtube/comments.md ### youtube.community_post A YouTube community post: text, images, likes and channel. - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/community_post?url=https%3A%2F%2Fwww.youtube.com%2Fpost%2FUgkxvj2KoApYAXoqLWnKVr6zZe5JjeHrQeP8` with header `x-api-key: YOUR_API_KEY` - Parameters: - `url` (string, required): Full URL of the YouTube community post - Fields returned: `content.id`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `author.username`, `author.url`, `engagement.likes`, `media.url` - Reference: https://onekey.dev/docs/api/youtube/community_post.md ### youtube.playlist YouTube playlist details. - Price: 1 credit per fresh call. Status: beta. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/playlist?id=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube playlist id - Fields returned: `entity.id`, `entity.name`, `entity.description`, `author.displayName`, `entity.stats.itemCount` - Reference: https://onekey.dev/docs/api/youtube/playlist.md ### youtube.playlist_info YouTube playlist metadata: title, owner, video count, views, thumbnail. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/playlist_info?playlist_id=PLi-epCWqWTgKjhTGZVkmN3OLBRQG2mt2W` with header `x-api-key: YOUR_API_KEY` - Parameters: - `playlist_id` (string, required): YouTube playlist id (PL...) - Fields returned: `content.url`, `content.title`, `content.text`, `author.displayName`, `media.thumbnailUrl`, `ext.videosText`, `ext.viewsText` - Reference: https://onekey.dev/docs/api/youtube/playlist_info.md ### youtube.playlist_items Videos in a YouTube playlist (first 25). - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/playlist_items?id=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube playlist id - Fields returned: `content.id`, `content.title`, `content.createdAt`, `author.displayName`, `ext.position` - Reference: https://onekey.dev/docs/api/youtube/playlist_items.md ### youtube.playlist_videos Videos inside a YouTube playlist (first page). - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/playlist_videos?playlist_id=PLi-epCWqWTgKjhTGZVkmN3OLBRQG2mt2W` with header `x-api-key: YOUR_API_KEY` - Parameters: - `playlist_id` (string, required): YouTube playlist id (PL...) - Fields returned: `content.id`, `content.title`, `author.displayName`, `media.thumbnailUrl`, `ext.viewsText`, `ext.durationText` - Reference: https://onekey.dev/docs/api/youtube/playlist_videos.md ### youtube.related Related / up-next videos for a YouTube video. - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/related?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `content.id`, `content.title`, `author.displayName`, `media.thumbnailUrl`, `ext.viewsText`, `ext.publishedText`, `ext.durationText` - Reference: https://onekey.dev/docs/api/youtube/related.md ### youtube.resolve Resolve a YouTube @handle or channel URL to its channel id. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/resolve?handle=MrBeast` with header `x-api-key: YOUR_API_KEY` - Parameters: - `handle` (string, required): YouTube @handle, e.g. MrBeast - Fields returned: `author.id`, `author.username`, `ext.path` - Reference: https://onekey.dev/docs/api/youtube/resolve.md ### youtube.search Search YouTube videos (Data API v3; costs 100 quota units per call). - Price: 3 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/search?q=lofi` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `author.displayName`, `content.createdAt`, `media.thumbnailUrl` - Reference: https://onekey.dev/docs/api/youtube/search.md ### youtube.search_channels Search YouTube channels. - Price: 3 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/search_channels?q=music` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `author.id`, `author.displayName`, `author.bio`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/youtube/search_channels.md ### youtube.search_hashtag YouTube videos tagged with a hashtag. - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/search_hashtag?hashtag=funny` with header `x-api-key: YOUR_API_KEY` - Parameters: - `hashtag` (string, required): Hashtag to search for, without the # symbol - `cursor` (string, optional): Opaque cursor from a previous response's `pagination.next_cursor`. Omit for the first page. - Fields returned: `content.id`, `content.title`, `content.url`, `content.text`, `media.thumbnailUrl`, `author.id`, `author.displayName`, `engagement.views`, `content.createdAt`, `media.durationSeconds` - Reference: https://onekey.dev/docs/api/youtube/search_hashtag.md ### youtube.search_latest Search YouTube videos by keyword, newest uploads first. - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/search_latest?q=lofi` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `content.text`, `author.displayName`, `author.id`, `media.thumbnailUrl`, `ext.viewsText`, `ext.publishedText`, `ext.durationText` - Reference: https://onekey.dev/docs/api/youtube/search_latest.md ### youtube.search_live Search currently live YouTube streams by keyword. - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/search_live?q=lofi` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `content.text`, `author.displayName`, `author.id`, `media.thumbnailUrl`, `ext.viewsText`, `ext.publishedText`, `ext.durationText` - Reference: https://onekey.dev/docs/api/youtube/search_live.md ### youtube.search_playlists Search YouTube playlists by keyword. - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/search_playlists?q=lofi` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `author.displayName`, `media.thumbnailUrl` - Reference: https://onekey.dev/docs/api/youtube/search_playlists.md ### youtube.search_videos Search YouTube videos by keyword. - Price: 2 credits per fresh call. Status: stable. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/search_videos?q=lofi` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `content.text`, `author.displayName`, `author.id`, `media.thumbnailUrl`, `ext.viewsText`, `ext.publishedText`, `ext.durationText` - Reference: https://onekey.dev/docs/api/youtube/search_videos.md ### youtube.shorts_trending Currently trending YouTube Shorts. - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/shorts_trending` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.title`, `content.url`, `content.text`, `media.thumbnailUrl`, `author.id`, `author.displayName`, `author.username`, `engagement.comments`, `engagement.likes`, `engagement.views`, `content.createdAt` - Reference: https://onekey.dev/docs/api/youtube/shorts_trending.md ### youtube.suggest YouTube search autocomplete suggestions for a partial query. - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/suggest?q=lofi` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.text` - Reference: https://onekey.dev/docs/api/youtube/suggest.md ### youtube.transcript Timed transcript segments of a YouTube video (cursor from youtube.video_next). - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/transcript?cursor=CgtkUXc0dzlXZ1hjURIOQ2dBU0FtVnVHZ0ElM0QYASozZW5nYWdlbWVudC1wYW5lbC1zZWFyY2hhYmxlLXRyYW5zY3JpcHQtc2VhcmNoLXBhbmVsMAE4AUAB` with header `x-api-key: YOUR_API_KEY` - Parameters: - `cursor` (string, required): Transcript params from youtube.video_next (cursor.transcript) - Fields returned: `content.text`, `ext.startMs`, `ext.endMs`, `ext.startText` - Reference: https://onekey.dev/docs/api/youtube/transcript.md ### youtube.trending Most popular YouTube videos in a region. - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/trending?region=US` with header `x-api-key: YOUR_API_KEY` - Parameters: - `region` (string, optional, default US): 2-letter region code - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `media.thumbnailUrl`, `engagement.views`, `engagement.likes`, `engagement.comments`, `ext.duration` - Reference: https://onekey.dev/docs/api/youtube/trending.md ### youtube.video YouTube video title and channel via oEmbed (no stats: those need an API key). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/video?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id, e.g. dQw4w9WgXcQ - Fields returned: `content.title`, `media.thumbnailUrl`, `author.displayName`, `author.url` - Reference: https://onekey.dev/docs/api/youtube/video.md ### youtube.video_audio Downloadable audio stream formats of a YouTube video (signed urls). - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/video_audio?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `media.url`, `media.mimeType`, `media.sizeBytes`, `media.durationSeconds`, `ext.itag`, `ext.bitrate`, `ext.audioQuality`, `ext.audioSampleRate` - Reference: https://onekey.dev/docs/api/youtube/video_audio.md ### youtube.video_categories YouTube video categories for a region. - Price: 2 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/video_categories?region=US` with header `x-api-key: YOUR_API_KEY` - Parameters: - `region` (string, optional, default US): 2-letter region code - Fields returned: `entity.id`, `entity.name` - Reference: https://onekey.dev/docs/api/youtube/video_categories.md ### youtube.video_comments Top-level comments on a YouTube video (page of a continuation cursor). - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/video_comments?cursor=Eg0SC2RRdzR3OVdnWGNRGAYyJSIRIgtkUXc0dzlXZ1hjUTAAeAJCEGNvbW1lbnRzLXNlY3Rpb24%253D` with header `x-api-key: YOUR_API_KEY` - Parameters: - `cursor` (string, required): Comments cursor from youtube.video_next (cursor.comments) or a previous page - Fields returned: `content.id`, `content.text`, `author.id`, `author.displayName`, `author.avatarUrl`, `author.verified`, `engagement.comments`, `ext.publishedText`, `ext.likesText` - Reference: https://onekey.dev/docs/api/youtube/video_comments.md ### youtube.video_details YouTube video details and statistics (Data API v3). - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/video_details?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `media.thumbnailUrl`, `engagement.views`, `engagement.likes`, `engagement.comments`, `ext.duration` - Reference: https://onekey.dev/docs/api/youtube/video_details.md ### youtube.video_files Downloadable video stream formats of a YouTube video (signed urls). - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/video_files?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `media.url`, `media.mimeType`, `media.sizeBytes`, `media.durationSeconds`, `media.width`, `media.height`, `ext.itag`, `ext.bitrate`, `ext.qualityLabel`, `ext.fps` - Reference: https://onekey.dev/docs/api/youtube/video_files.md ### youtube.video_info YouTube video details: title, description, channel, views, likes, duration, publish date. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/video_info?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `content.category`, `author.id`, `author.displayName`, `author.url`, `engagement.views`, `engagement.likes`, `media.durationSeconds`, `media.thumbnailUrl`, `ext.isLive` - Reference: https://onekey.dev/docs/api/youtube/video_info.md ### youtube.video_next YouTube watch page data and the continuation cursors needed for comments and transcript. - Price: 1 credit per fresh call. Status: stable. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/video_next?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `content.title`, `author.displayName`, `author.id`, `ext.viewsText`, `ext.publishedText`, `ext.followersText`, `ext.commentsCursor`, `ext.transcriptCursor` - Reference: https://onekey.dev/docs/api/youtube/video_next.md ### youtube.video_sponsors Sponsors a YouTube video appears to promote (paid-promotion badge, description links). - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/video_sponsors?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAVO0ifleOUc` with header `x-api-key: YOUR_API_KEY` - Parameters: - `url` (string, required): Full URL of the YouTube video or short - Fields returned: `content.id`, `content.title`, `content.url`, `author.id`, `author.displayName`, `ext.paidPromotion`, `ext.sponsorName`, `ext.sponsorWebsite`, `ext.sponsorConfidence`, `ext.detectionStatus` - Reference: https://onekey.dev/docs/api/youtube/video_sponsors.md ### youtube.video_subtitles Subtitle files (language, format, download url) of a YouTube video. - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/video_subtitles?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - Fields returned: `entity.name`, `media.mimeType`, `media.url`, `media.previewUrl`, `ext.languageCode` - Reference: https://onekey.dev/docs/api/youtube/video_subtitles.md ### youtube.video_thumbnails Thumbnail image of a YouTube video (oEmbed): URL and pixel size, plus title and channel. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/youtube/video_thumbnails?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id, e.g. dQw4w9WgXcQ - Fields returned: `content.title`, `media.thumbnailUrl`, `media.width`, `media.height`, `author.displayName`, `author.url` - Reference: https://onekey.dev/docs/api/youtube/video_thumbnails.md ### youtube.video_transcript Timed transcript (captions) of a YouTube video by video id. - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/video_transcript?id=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): YouTube video id - `lang` (string, optional, default en): Caption language code (en, es, fr ...) - Fields returned: `content.text`, `ext.offsetSeconds`, `ext.durationSeconds`, `ext.language`, `ext.wordCount` - Reference: https://onekey.dev/docs/api/youtube/video_transcript.md ### youtube.videos_batch Details and statistics for up to 20 YouTube videos in one call. - Price: 1 credit per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/youtube/videos_batch?ids=dQw4w9WgXcQ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `ids` (string, required): Comma-separated YouTube video ids (1 to 20) - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `author.id`, `author.displayName`, `media.thumbnailUrl`, `engagement.views`, `engagement.likes`, `engagement.comments` - Reference: https://onekey.dev/docs/api/youtube/videos_batch.md ## Sample request ```bash curl "https://api.onekey.dev/v1/youtube/channel_profile?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw" \ -H "x-api-key: YOUR_API_KEY" ```