The APIVex YouTube API retrieves public channel, video, playlist, comment, and transcript data. This tutorial resolves a channel handle into a channel ID and then lists videos from that channel’s Videos tab.
This is APIVex’s third-party data service, separate from Google’s official YouTube Data API. The workflow uses your APIVex key and does not download videos, return playback streams, or upload content.
Resolve a handle before listing videos
A handle such as @GoogleDevelopers is convenient for people, but the channel-list routes use a channel ID beginning with UC. Get an APIVex key from the dashboard and keep it in your server environment.
curl --get 'https://api.apivex.com/youtube/api/channels/resolve' \
--header "x-apivex-key: $APIVEX_API_KEY" \
--data-urlencode 'query=@GoogleDevelopers'The response contained these selected fields under data:
{
"browse_id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"channel_id": "UC_x5XG1OV2P6uZZ5FSM9Ttw"
}The resolver can also return other identifier fields depending on the input. Check that channel_id is present before using a channel route. A video ID or playlist ID belongs to a different resource.
List the channel’s videos with Node.js
The base URL is https://api.apivex.com/youtube. Save the following as channel-videos.mjs, set APIVEX_API_KEY, and run it with Node.js 20 or newer.
const key = process.env.APIVEX_API_KEY;
if (!key) throw new Error('Set APIVEX_API_KEY first');
const base = 'https://api.apivex.com/youtube';
// Demonstration pacing; use the request rate allowed by your plan.
const pause = () => new Promise(resolve => setTimeout(resolve, 2500));
async function get(path, params) {
const url = new URL(base + path);
url.search = new URLSearchParams(params).toString();
const response = await fetch(url, {
headers: {'x-apivex-key': key},
signal: AbortSignal.timeout(30000)
});
if (!response.ok) throw new Error('HTTP ' + response.status);
const body = await response.json();
if (body.status !== true) throw new Error(body.message || 'API request failed');
return body.data;
}
const channel = await get('/api/channels/resolve', {query: '@GoogleDevelopers'});
if (!channel.channel_id?.startsWith('UC')) throw new Error('No channel ID returned');
await pause();
const page = await get('/api/channels/videos', {channel_id: channel.channel_id, sort: 'newest', hl: 'en'});
console.table(page.videos.map(v => ({id: v.video_id, title: v.title, published: v.published, views: v.views})));
console.log({hasAnotherPage: Boolean(page.continuation)});The videos response has data.videos and can include data.continuation. Returned video entries include video_id, title, and display fields such as published, views, and duration.
In the captured response, views were represented as text such as 24K views, publication time as 1 day ago, and duration as 1:12. Do not parse these display strings as exact analytics measurements without an explicit conversion policy. A relative publication label also changes meaning if stored without its retrieval time.
Continue to the next page
Pass the opaque continuation token returned by the previous channel-videos response to /api/channels/videos. The documentation specifies omitting channel_id when sending a continuation token.
Keep pagination sequential and stop when no next token is returned. Do not try to decode or construct the token yourself. Store video IDs as strings and deduplicate them when collecting more than one page.
This endpoint represents the channel’s Videos tab. Do not assume it is an exhaustive list of every item associated with the channel. For Shorts, use the separate /api/channels/shorts route documented for that view.
Add video details or transcripts
Use a returned video_id with /api/videos/detail for the video’s public metadata. The detail route does not return downloadable media or streaming URLs.
For text analysis, /api/videos/transcript takes a video ID and a language code. Transcript availability is not guaranteed: the documented route returns 404 when the requested transcript language is unavailable. Handle that as a missing transcript, rather than treating it as proof the video itself was deleted.
Comments and comment replies have their own pagination. Reply retrieval uses the reply_continuation from a comment response, not a channel-video continuation token. Keep those token types separate in your application.
Build a dependable channel monitor
Resolve and save the channel ID first. Fetch a bounded number of pages, retain the video IDs you have already seen, and record when each batch was retrieved. Keep the API key server-side and schedule refreshes within your plan’s request allowances.
If a refresh fails, do not replace your existing channel inventory with an empty list. The example checks HTTP and API success before returning data, which lets a worker distinguish a failed request from a successful empty result.
Try a handle in the YouTube API documentation. For a related public-video workflow, see the TikTok Data API guide.



