YouTube URL Resolver API
Resolve any YouTube URL to a canonical video, channel, or playlist ID. Handle shortened URLs and redirects programmatically from $0.01/call.
Convert any YouTube URL (short links, share links, channel URLs) into a structured response with the content type and ID. Useful for normalizing user-submitted URLs.
Try it live
Fill in the fields and hit Run to see a real response.
{
"ok": true,
"data": {
"webPageType": "WEB_PAGE_TYPE_WATCH",
"videoId": "dQw4w9WgXcQ"
}
}Features
POST any URL to /v1/youtube/resolve — watch links, youtu.be short links, share links, or channel vanity URLs — and get a normalized, structured result.
The response includes a webPageType (e.g. WEB_PAGE_TYPE_WATCH) so you know whether the URL points to a video, channel, or playlist before routing it.
Get the canonical videoId (or channel/playlist ID) extracted from the URL, ready to pass directly into any other YouTube endpoint.
Follows youtu.be redirects, @handle channel URLs, and /c/ vanity links to their canonical identifiers without you parsing them by hand.
Use cases
URL Normalization
Convert user-submitted YouTube URLs in any format into canonical video/channel/playlist IDs.
Input Validation
Verify and validate YouTube URLs submitted by users in your application.
Link Processing
Process scraped or imported YouTube links into a consistent format for your database.
API Orchestration
Use as a first step to get the ID before calling other YouTube API endpoints.
Quick start
Copy this snippet and start making calls.
const res = await fetch('https://api.yepapi.com/v1/youtube/resolve', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}),
});
const data = await res.json();
console.log(data);The YouTube URL Resolver API — any link to a canonical ID
The YouTube URL Resolver API turns any YouTube URL into a clean, typed identifier. POST a watch link, a youtu.be short link, a share URL, or a channel vanity URL to /v1/youtube/resolve and get back a webPageType (e.g. WEB_PAGE_TYPE_WATCH) and the canonical ID — videoId, channelId, or playlistId. It removes the fragile, regex-heavy URL parsing every YouTube integration otherwise reinvents.
At $0.01 per call it's the cheap, reliable first step in any pipeline: resolve the user's messy link once, then route the clean ID to Video Details, Channel, Playlist, or Transcript. It's the glue endpoint of the YouTube suite.
What is a YouTube URL Resolver API?
A YouTube URL Resolver API takes any YouTube link — in any of its many formats — and returns the canonical content type and ID it points to. You POST a URL and get back a webPageType (WEB_PAGE_TYPE_WATCH for a video, and the equivalents for channels and playlists) plus the extracted ID. It exists because YouTube URLs are inconsistent: full watch URLs, youtu.be short links, share links with tracking params, @handle channel URLs, and legacy /c/ vanity URLs all point at the same content but parse differently. Rather than maintaining brittle regexes, you hand the resolver a URL and trust it to normalize.
Build your own link-normalization layer
Drop the resolver in front of any feature that accepts a user-pasted YouTube link. A user submits a youtu.be share link; you resolve it to a videoId and immediately call Video Details or Transcript with confidence. Validating imported or scraped link lists? Resolve each one to confirm it's live and to get a consistent ID for your database, deduplicating different URL forms of the same video. It's also the safe entry point for an orchestration flow — resolve first, branch on webPageType, then call the channel, playlist, or video endpoint accordingly.
YouTube URL Resolver API pricing — $0.01/call
Each resolution costs $0.01 and returns the type and canonical ID in one lightweight call. There's no daily quota. Because it's so cheap and so fast, it's economical to resolve every inbound URL by default rather than risk a malformed link breaking a downstream call. The official Data API has no general URL-resolution endpoint, so this fills a gap that otherwise lands as custom parsing code in every project.
Resolver as the first step in an API chain
The resolver's real value is composition. Most YouTube endpoints expect a clean ID, but users and external systems supply URLs. Putting Resolve at the front means everything downstream — Video, Comments, Transcript, Channel, Playlist — receives validated, canonical IDs. Branch on the returned webPageType to decide which endpoint to call: watch types go to video endpoints, channel types to channel endpoints, playlist types to the Playlist endpoint. One $0.01 call saves a class of edge-case bugs.
Try the YouTube URL Resolver API free
Get $5 in free credit at signup with no card required — 500 resolutions. Throw your messiest mix of short links, share URLs, and @handle channel links at it to confirm it normalizes them all before you wire it in.
Start making API calls in 30 seconds
$5 free credit on signup. No credit card required. Pay per call.
What developers say
“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”
“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”
“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”
Frequently asked questions
Convert any YouTube URL (short links, share links, channel URLs) into a structured response with the content type and ID. Useful for normalizing user-submitted URLs.
Each API call costs $0.01. No monthly minimums or subscriptions — you only pay for what you use.
Sign up for a free API key, then send a POST request to /v1/youtube/resolve. Check the code example above for a ready-to-use snippet in JavaScript, cURL, or Python.
YepAPI bundles SEO, AI, and web scraping APIs under one key with no monthly minimums. You get lower per-call pricing, a unified dashboard, and one billing account instead of managing multiple providers.
Ready to integrate?
Get your API key and start making calls in 30 seconds. $5 free credit on signup — no credit card required.
More youtube api endpoints
Search
$0.01YouTube search API — find videos, channels, and playlists with filters for date, duration, and type. Structured JSON results from $0.01/call.
Video Details
$0.02Full YouTube video metadata — title, views, likes, description, keywords, thumbnails, and available formats. Video intelligence from $0.02/call.
Comments
$0.01YouTube comments API — fetch top-level comments and replies with author info, likes, and timestamps. Sentiment analysis and engagement research from $0.01/call.