{"openapi":"3.0.3","info":{"title":"YouTube API","version":"1.0.0","description":"Public YouTube videos, channels, posts, search and playlists with stable schemas.","contact":{"email":"support@endpointry.com"},"termsOfService":"https://endpointry.com/legal/terms"},"servers":[{"url":"https://api.endpointry.com/v1/youtube"}],"tags":[{"name":"YouTube API","description":"Public YouTube videos, channels, posts, search and playlists with stable schemas."}],"components":{"schemas":{"ResponseMeta":{"type":"object","properties":{"request_id":{"type":"string","example":"req_9f2c4a1b8d3e0f6a7c5b9d1e"},"as_of":{"type":"string","format":"date-time","description":"When this snapshot of the data was taken (UTC)."},"cache":{"type":"string","enum":["HIT","MISS"]},"pagination":{"$ref":"#/components/schemas/PaginationMeta"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/ResponseWarning"}}},"required":["request_id"]},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer"},"next_cursor":{"type":"string","nullable":true},"next_offset":{"type":"integer","nullable":true},"next_page":{"type":"integer","nullable":true},"limit":{"type":"integer"},"returned":{"type":"integer"},"total":{"type":"integer"}}},"ResponseWarning":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code","detail"]},"YouTubeVideo":{"type":"object","properties":{"id":{"type":"string","example":"dQw4w9WgXcQ"},"url":{"type":"string","format":"uri","example":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},"title":{"type":"string"},"description":{"type":"string","nullable":true,"description":"The full description; null when it is empty."},"channel":{"$ref":"#/components/schemas/YouTubeVideoChannel"},"published_at":{"type":"string","format":"date-time","example":"2009-10-25T06:57:33.000Z"},"duration_seconds":{"type":"integer","nullable":true,"example":214,"description":"Null while the video is a live stream in progress."},"views":{"type":"integer","example":1840584609},"likes":{"type":"integer","nullable":true,"example":19517649,"description":"Null when YouTube shows no like count for the video."},"comments":{"type":"integer","nullable":true,"example":2462540,"description":"Null when YouTube shows no comment count for the video."},"tags":{"type":"array","items":{"type":"string"},"description":"The tags the uploader set; empty when there are none."},"is_live":{"type":"boolean","description":"Whether the video is a live stream in progress."},"thumbnails":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeThumbnail"},"description":"Every size offered, smallest first."}},"required":["id","url","title","description","channel","published_at","duration_seconds","views","likes","comments","tags","is_live","thumbnails"]},"YouTubeVideoChannel":{"type":"object","properties":{"id":{"type":"string","example":"UCuAXFkgsw1L7xaCfnd5JJOw"},"name":{"type":"string","example":"Rick Astley"}},"required":["id","name"]},"YouTubeThumbnail":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["url","width","height"]},"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status","code","request_id"]},"YouTubeChannel":{"type":"object","properties":{"id":{"type":"string","example":"UCX6OQ3DkcsbYNE6H8uQQuVA"},"handle":{"type":"string","nullable":true,"example":"@MrBeast"},"url":{"type":"string","format":"uri","example":"https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA"},"name":{"type":"string","example":"MrBeast"},"description":{"type":"string","nullable":true},"country":{"type":"string","nullable":true,"example":"United States","description":"The country the channel lists, by name as YouTube shows it in English."},"joined_at":{"type":"string","nullable":true,"format":"date","example":"2012-02-19","description":"When the channel was created."},"subscribers":{"type":"integer","nullable":true,"example":528000000,"description":"Rounded as YouTube shows it; null when the channel hides it."},"videos":{"type":"integer","nullable":true,"example":1017},"views":{"type":"integer","nullable":true,"example":148078238266},"keywords":{"type":"array","items":{"type":"string"}},"links":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeChannelLink"},"description":"The links on the About page, in its order."},"has_business_email":{"type":"boolean","description":"Whether the About page offers a business e-mail (the address itself is behind a sign-in)."},"avatar_url":{"type":"string","nullable":true,"format":"uri","description":"The avatar at the largest size offered."},"banner_url":{"type":"string","nullable":true,"format":"uri","description":"The banner at the largest size offered."}},"required":["id","handle","url","name","description","country","joined_at","subscribers","videos","views","keywords","links","has_business_email","avatar_url","banner_url"]},"YouTubeChannelLink":{"type":"object","properties":{"title":{"type":"string","example":"Twitter"},"url":{"type":"string","format":"uri","example":"https://twitter.com/MrBeast"}},"required":["title","url"]},"YouTubeVideoSummary":{"type":"object","properties":{"id":{"type":"string","example":"q6fgVVmdpgY"},"url":{"type":"string","format":"uri","example":"https://www.youtube.com/watch?v=q6fgVVmdpgY"},"title":{"type":"string"},"duration_seconds":{"type":"integer","nullable":true,"example":2038,"description":"Null for a live stream in progress and for Shorts, whose lists show no length."},"views":{"type":"integer","nullable":true,"example":101000000,"description":"The view count the list shows, often rounded (`101M`); null while live."},"live_viewers":{"type":"integer","nullable":true,"description":"People watching now, while the video is a live stream in progress; otherwise null."},"published_text":{"type":"string","nullable":true,"example":"10 days ago","description":"The age as YouTube words it in English, relative to `meta.as_of` (`10 days ago`, `Streamed 3 months ago`). Null for a live stream in progress and for Shorts."},"is_live":{"type":"boolean"},"thumbnails":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeThumbnail"},"description":"Every size offered, smallest first."}},"required":["id","url","title","duration_seconds","views","live_viewers","published_text","is_live","thumbnails"]},"YouTubePost":{"type":"object","properties":{"id":{"type":"string","example":"UgkxIkDHJ9iW7XmjtMbke3Ud7rEiV5jSHDnR"},"url":{"type":"string","format":"uri","example":"https://www.youtube.com/post/UgkxIkDHJ9iW7XmjtMbke3Ud7rEiV5jSHDnR"},"text":{"type":"string","nullable":true},"published_text":{"type":"string","nullable":true,"example":"2 weeks ago","description":"The age as YouTube words it in English, relative to `meta.as_of`."},"likes":{"type":"integer","nullable":true,"description":"Rounded as YouTube shows it."},"comments":{"type":"integer","nullable":true},"attachment":{"oneOf":[{"$ref":"#/components/schemas/YouTubePostImages"},{"$ref":"#/components/schemas/YouTubePostPoll"},{"nullable":true}],"description":"Images or a poll. Null when the post has neither (text only, or a kind not described here)."}},"required":["id","url","text","published_text","likes","comments","attachment"]},"YouTubePostImages":{"type":"object","properties":{"type":{"type":"string","enum":["images"]},"images":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeThumbnail"},"description":"Each image at the largest size offered, in post order."}},"required":["type","images"]},"YouTubePostPoll":{"type":"object","properties":{"type":{"type":"string","enum":["poll"]},"choices":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]},"description":"The choices, in post order."},"votes":{"type":"integer","nullable":true,"example":1800000,"description":"Votes cast, rounded as YouTube shows it."}},"required":["type","choices","votes"]},"YouTubeSearchResult":{"allOf":[{"$ref":"#/components/schemas/YouTubeVideoSummary"},{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/YouTubeVideoChannel"},"description_snippet":{"type":"string","nullable":true,"description":"The part of the description YouTube shows under the result."}},"required":["channel","description_snippet"]}]},"YouTubeAutocompleteResult":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeSuggestion"}}},"required":["suggestions"]},"YouTubeSuggestion":{"type":"object","properties":{"position":{"type":"integer","minimum":0,"exclusiveMinimum":true},"keyword":{"type":"string","example":"lofi hip hop","description":"The full suggested search."}},"required":["position","keyword"]},"YouTubePlaylist":{"type":"object","properties":{"id":{"type":"string","example":"UUSJ4gkVC6NrvII8umztf0Ow"},"url":{"type":"string","format":"uri","example":"https://www.youtube.com/playlist?list=UUSJ4gkVC6NrvII8umztf0Ow"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"channel":{"$ref":"#/components/schemas/YouTubeVideoChannel"},"videos":{"type":"integer","nullable":true,"example":516,"description":"How many videos the playlist holds."},"views":{"type":"integer","nullable":true},"updated_at":{"type":"string","nullable":true,"format":"date","example":"2026-11-24","description":"When the playlist last changed."},"thumbnails":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeThumbnail"},"description":"Every size offered, smallest first."}},"required":["id","url","title","description","channel","videos","views","updated_at","thumbnails"]}},"parameters":{}},"paths":{"/video":{"get":{"operationId":"youtube.video","summary":"Get a video","description":"Returns a public video by id or link: title, full description, channel, publish time, duration, exact view, like and comment counts, tags, live state and every thumbnail size. Returns `404 NOT_FOUND` when no public video has that id.","x-points":10,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","maxLength":256,"example":"dQw4w9WgXcQ","description":"The video id, or a link to the video (`watch`, `shorts`, `live` or `youtu.be`)."},"required":true,"description":"The video id, or a link to the video (`watch`, `shorts`, `live` or `youtu.be`).","name":"id","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/YouTubeVideo"}},"required":["video"]}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/channel":{"get":{"operationId":"youtube.channel","summary":"Get a channel","description":"Returns a channel’s About page: name, handle, description, country, creation date, subscriber, video and view counts, keywords, links, whether it offers a business e-mail, avatar and banner. The channel can be given by id (`UC…`), by handle (`@name`) or by link. Returns `404 NOT_FOUND` when no channel answers to it.","x-points":10,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","maxLength":256,"example":"UCX6OQ3DkcsbYNE6H8uQQuVA","description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel."},"required":true,"description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel.","name":"id","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/YouTubeChannel"}},"required":["channel"]}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/channel/videos":{"get":{"operationId":"youtube.channel-videos","summary":"List a channel’s videos","description":"Lists a channel’s uploads, Shorts or live streams, newest first, one tab per `type`. Lists show what YouTube shows on the page: a view count that is often rounded and the age as text (`published_text`); `/video` returns the exact counts and the publish time. Pagination follows `meta.pagination.next_cursor` until it is `null`. The channel can be given by id (`UC…`), by handle (`@name`) or by link. Returns `404 NOT_FOUND` when no channel answers to it.","x-points":10,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","maxLength":256,"example":"UCX6OQ3DkcsbYNE6H8uQQuVA","description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel."},"required":true,"description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel.","name":"id","in":"query"},{"schema":{"type":"string","enum":["videos","shorts","live"],"default":"videos","description":"Which tab to list: uploaded `videos`, `shorts`, or `live` streams (current and past). Newest first."},"required":false,"description":"Which tab to list: uploaded `videos`, `shorts`, or `live` streams (current and past). Newest first.","name":"type","in":"query"},{"schema":{"type":"string","maxLength":16384,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response."},"required":false,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeVideoSummary"}}},"required":["videos"]}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/channel/search":{"get":{"operationId":"youtube.channel-search","summary":"Search a channel’s videos","description":"Searches one channel’s videos for `query`, 30 per page, in YouTube’s order. Lists show what YouTube shows on the page: a view count that is often rounded and the age as text (`published_text`); `/video` returns the exact counts and the publish time. The channel can be given by id (`UC…`), by handle (`@name`) or by link. Returns `404 NOT_FOUND` when no channel answers to it.","x-points":10,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","maxLength":256,"example":"UCX6OQ3DkcsbYNE6H8uQQuVA","description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel."},"required":true,"description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel.","name":"id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"example":"challenge","description":"Words to look for among the channel's videos."},"required":true,"description":"Words to look for among the channel's videos.","name":"query","in":"query"},{"schema":{"type":"string","maxLength":16384,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response."},"required":false,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeVideoSummary"}}},"required":["videos"]}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/channel/posts":{"get":{"operationId":"youtube.channel-posts","summary":"List a channel’s posts","description":"Lists a channel’s community posts, newest first, 10 per page: text, age, like and comment counts, and the images or poll a post carries. Pagination follows `meta.pagination.next_cursor` until it is `null`. The channel can be given by id (`UC…`), by handle (`@name`) or by link. Returns `404 NOT_FOUND` when no channel answers to it.","x-points":10,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","maxLength":256,"example":"UCX6OQ3DkcsbYNE6H8uQQuVA","description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel."},"required":true,"description":"The channel id (`UC…`), its handle with the `@` (`@MrBeast`), or a link to the channel.","name":"id","in":"query"},{"schema":{"type":"string","maxLength":16384,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response."},"required":false,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/YouTubePost"}}},"required":["posts"]}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/search":{"get":{"operationId":"youtube.search","summary":"Search videos","description":"Searches YouTube for videos, in YouTube’s order: each result with its channel and the description snippet YouTube shows, plus YouTube’s estimate of the total. Lists show what YouTube shows on the page: a view count that is often rounded and the age as text (`published_text`); `/video` returns the exact counts and the publish time.","x-points":10,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"example":"lofi hip hop","description":"What to search for."},"required":true,"description":"What to search for.","name":"query","in":"query"},{"schema":{"type":"string","maxLength":16384,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response."},"required":false,"description":"Opaque cursor from `meta.pagination.next_cursor` of a previous response.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeSearchResult"}},"estimated_results":{"type":"integer","nullable":true,"example":3536678,"description":"YouTube's estimate of how many results the query has."},"did_you_mean":{"type":"string","nullable":true,"description":"The spelling YouTube suggests instead, when it suggests one."}},"required":["videos","estimated_results","did_you_mean"]}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/autocomplete":{"get":{"operationId":"youtube.autocomplete","summary":"Complete a search","description":"Returns the searches YouTube suggests for a partial query, in its order.","x-points":5,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"example":"lofi","description":"Partial search to complete."},"required":true,"description":"Partial search to complete.","name":"query","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"$ref":"#/components/schemas/YouTubeAutocompleteResult"}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/playlist":{"get":{"operationId":"youtube.playlist","summary":"Get a playlist","description":"Returns a public playlist by id or link: title, description, channel, video and view counts, last update and thumbnails. Returns `404 NOT_FOUND` when no public playlist has that id.","x-points":10,"tags":["YouTube API"],"parameters":[{"schema":{"type":"string","maxLength":512,"example":"UUSJ4gkVC6NrvII8umztf0Ow","description":"The playlist id (`PL…`, `UU…`, `OLAK5uy_…`), or a link with a `list` parameter."},"required":true,"description":"The playlist id (`PL…`, `UU…`, `OLAK5uy_…`), or a link with a `list` parameter.","name":"id","in":"query"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ResponseMeta"},"data":{"type":"object","properties":{"playlist":{"$ref":"#/components/schemas/YouTubePlaylist"}},"required":["playlist"]}},"required":["meta","data"]}}}},"default":{"description":"Error response (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}}}