Skip to content
scrapeatlas.Dashboard

Video platforms

YouTube API

Retrieve public YouTube channels, their videos, Shorts, playlists, live streams and posts, video details, transcripts and inferred sponsors, search and suggestions, comments and replies, trending Shorts, playlists and community posts.

17 endpointsx-api-key

Retrieve YouTube channels, videos, Shorts, playlists, live streams and community posts. Search by keyword or hashtag, read suggestions, comments and replies, retrieve transcripts and infer sponsors, with pagination tokens.

API availability: Available

Base URL · local workerhttp://localhost:3026Public API: https://api.scrapeatlas.com.
Authenticationx-api-keyCustomer key from your account. See Authentication.

Endpoints

GET/v1/youtube/channel

Get a YouTube channel

Retrieve a public YouTube channel by channelId, handle, url or forUsername, with identity, statistics, links, keywords, avatar and banner.

Reference
GET/v1/youtube/channel-videos

List a channel's videos

Read one page of a channel's Videos tab (30 videos) in the list shape: videos with title, URL, thumbnail, channel, view count, relative publish time with its computed timestamp, duration and badges, plus the continuation token for the next page. sort=latest (default) or popular. includeExtras=true adds per-video description, like and comment counts, publish date, genre and duration from two public API reads per video; extrasDetail=player halves that to the player read alone.

Reference
GET/v1/youtube/channel/shorts

List a channel's Shorts

Retrieve a page of channel Shorts with views, descriptions, engagement, publication dates, genre and duration. Select newest or popular sorting.

Reference
GET/v1/youtube/channel/playlists

List a channel's playlists

Retrieve a page of channel playlists with identifiers, titles, thumbnails, URLs, video counts, first videos and channel information. Pass the continuation token for the next page.

Reference
GET/v1/youtube/channel/lives

List a channel's live streams

Read one page of a channel's Live tab (30 streams): upcoming, live and past streams with title, URL, thumbnail, view or waiting count, displayed time text, duration and a continuation token. Items are returned in lives.

Reference
GET/v1/youtube/channel/community-posts

List a channel's community posts

Read one page of a channel's Posts tab: post ID and URL, channel, text, attached images, like count, relative publish time with its computed timestamp and the attached video when the post links one, with a continuation token when more exist.

Reference
GET/v1/youtube/video

Get a video or Short

Retrieve a YouTube video with title, description, engagement, publication date, uploader, chapters, recommendations, genre, duration, caption tracks, format metadata, replay graph and paid-promotion information.

Reference
GET/v1/youtube/video/transcript

Get a video transcript

Read the public caption track of a video or Short: the timed transcript (text, startMs, endMs, startTimeText), the plain text, the track's language name and every available caption track. The track is the last one whose language code matches the requested language (English by default), which prefers the auto-generated track when both exist. Without a matching track the transcript fields are null and the response is partial.

Reference
GET/v1/youtube/video/sponsors

Infer a video's sponsors

Experimental. Reads the watch page and, when available, the transcript, reports YouTube's paid-promotion disclosure and infers suspected sponsors from sponsorship phrases, promotional description links, promo codes and transcript mentions. Every suspected sponsor carries its evidence and a confidence; this is inference, not a YouTube field.

Reference
GET/v1/youtube/search

Search YouTube

Search YouTube videos, channels, playlists, Shorts, shelves and live streams, with continuation. Filter by upload date, sort, type, duration and region. Set includeExtras=true for expanded video records.

Reference
GET/v1/youtube/search/typeahead

Get search suggestions

Return the live suggestions YouTube shows while typing a query: each suggestion's text and whether it is a plain query or a channel; channel suggestions carry the channel ID, handle, name and thumbnail.

Reference
GET/v1/youtube/search/hashtag

Search by hashtag

Search YouTube for a hashtag (the quoted "#tag" query) and return one page of matching videos and Shorts in the list shape, with a continuation token. type=shorts restricts results to Shorts.

Reference
GET/v1/youtube/video/comments

List a video's comments

Read one page (20) of a video's top-level comments through the public comments continuation: text, author (name, channel ID, verified and creator flags, avatar, channel URL), relative publish time with its computed timestamp, like and reply counts, and a repliesContinuationToken for the replies operation. order=top (default) or newest; pass continuationToken for further pages.

Reference
GET/v1/youtube/video/comment/replies

List a comment's replies

Read one page of replies to a comment using the repliesContinuationToken from the comments operation, or the continuationToken of a previous replies response. Replies use the same comment shape with replyLevel 1.

Reference
GET/v1/youtube/shorts/trending

List trending Shorts

Retrieve a batch of YouTube Shorts with titles, descriptions, engagement, publication dates, channels, chapters, genres and durations.

Reference
GET/v1/youtube/playlist

Get a playlist

Read a public playlist through the public browse API and follow its continuations (up to ten pages, about 1,100 videos): title, owner, total video count and every video's ID, title, thumbnail, URL, duration and channel. Longer playlists are returned truncated with playlist_truncated.

Reference
GET/v1/youtube/community-post

Get a community post

Read one public community post page: ID, channel, text, attached images, like count, relative publish time with its computed timestamp and the attached video when present. The page must describe the requested post; missing posts answer 404.

Reference

Quick start

Create an API key on your account page, then call the public API. Values below are placeholders.

Terminal
curl "https://api.scrapeatlas.com/v1/youtube/channel?handle=ExampleChannel" \
  -H "x-api-key: YOUR_API_KEY"

Coverage & limits

  • Four concurrent requests per worker; saturation returns 503 busy. One page or record per request: list operations return one page (30 videos, 48 Shorts, 30 playlists, 30 streams, 10 posts, 20 comments, one search page) and YouTube's continuation token; the caller carries tokens, nothing is stored.
  • Base operations (channel, playlists, lives, posts, typeahead, hashtag, comments, replies, community post): 20-second deadline (video, transcript, sponsors and playlist reads: 30 seconds), at most four upstream HTTP attempts (handle resolution, the channel browse, the About panel or sort continuation, and one transient network/5xx retry), 8 MiB decoded bytes (playlist reads follow up to ten continuations under a 12-attempt, 16 MiB budget; sponsors read the page, the Android player and one caption track under five attempts).
  • Enrichment operations (channel Shorts, includeExtras on channel-videos and search, trending Shorts): two small public API calls per video (player metadata and watch-next data, issued together; one with extrasDetail=player), 12 videos at a time, at most 48 videos, 128 upstream attempts, 32 MiB decoded bytes and a 60-second deadline. Videos whose details could not be read keep null extras (extras_incomplete) instead of failing the request; an exhausted budget ends the batch early and batches stop starting reads eight seconds before the deadline. Trending Shorts read the feed page plus at most six sequence continuations while enrichment already runs.
  • Every parsed document is bounded to depth 96 and 1,000,000 nodes; oversized or malformed responses fail explicitly (response_too_large, payload_too_complex, unsupported_page). A redirect to Google's "sorry" interstitial (an over-used address) is reported as 429 upstream_rate_limited.
  • Logged-out reads of the fixed www.youtube.com origin (pages, the public navigation resolver, browse, next, search, player and reel sequence routes and timed text) and the public suggest origin only: no cookies, consent bypass, account session, API key or YouTube Data API quota. Thumbnails, avatars, download and caption URLs are returned as data and never fetched (the transcript operation reads exactly one caption track).
  • Relative publish times ("6 days ago", "2w ago") are converted to timestamps at retrieval time; texts with a prefix ("Streamed 2 days ago", "Scheduled for …") keep a null timestamp. Displayed counts reflect the moment of retrieval.
  • Channel-videos extras are read with includeExtras=true; transcript text is whitespace-normalised; sponsor inference is a heuristic with evidence and confidence on every suspected sponsor.
  • No result cache, billing, shared database, or consuming-product dependency.
Error codes
13
HTTPfailure.codeMeaning
400invalid_requestMissing, malformed, duplicate or conflicting parameters, unsupported parameters or an unsafe URL.
400invalid_continuationYouTube rejected the supplied continuation token.
401unauthorizedMissing or invalid worker API key.
403restricted_pageThe channel, video, playlist or post is terminated, private, members-only or otherwise unavailable.
403age_restrictedThe video is age restricted and cannot be read logged out.
404not_foundYouTube reports no channel, video, playlist or post for the identifier.
429upstream_rate_limitedYouTube rate limited the request; no automatic retry.
502upstream_challengedYouTube rejected or challenged the request.
502unsupported_pageThe response lacks the embedded data, the data is malformed, or the resolved identity does not match the request.
502response_too_large payload_too_complexThe response exceeded byte, depth or node limits.
502unsafe_redirect request_limit upstream_errorThe bounded request could not complete.
503busyAll worker slots are in use.
504timeoutThe total retrieval deadline expired.