YouTube Channel ID Extractor Pro avatar
YouTube Channel ID Extractor Pro

Pricing

$7.00/month + usage

Go to Apify Store
YouTube Channel ID Extractor Pro

YouTube Channel ID Extractor Pro

This Apify Actor extracts YouTube channel IDs from multiple channel URL formats (direct /channel/, @username, /c/, and /user/). It intelligently resolves non-direct URLs using yt-dlpvalidates inputs, processes multiple URLs, and outputs results with success/failure status to the Apify Dataset along

Pricing

$7.00/month + usage

Rating

0.0

(0)

Developer

Data Pilot

Data Pilot

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Share

YouTube Channel ID Extractor

A powerful Apify Actor that extracts YouTube channel IDs from various URL formats including direct channel links, @usernames, custom URLs, and legacy user URLs. Uses yt-dlp for reliable channel resolution.

🎯 Features

  • πŸ”— Multiple URL Formats - Supports all YouTube channel URL types
  • 🎯 Direct Extraction - Instant extraction from channel/ID URLs
  • πŸ” Username Resolution - Resolves @username to channel ID
  • 🌐 Custom URL Support - Handles youtube.com/c/customname
  • πŸ‘€ User URL Support - Processes youtube.com/user/username
  • πŸ“Š Batch Processing - Extract multiple channel IDs at once
  • βœ… Error Handling - Graceful handling of invalid URLs
  • πŸ“ˆ Detailed Output - Includes URL type and resolution method

πŸ“₯ Input

{
"channelUrls": www.youtube.com/@rotonmusictv
"useApifyProxy": True
}

Input Parameters

ParameterTypeRequiredDefaultDescription
channelUrlsString/ArrayYes-YouTube channel URLs (one per line)
useApifyProxyBooleanNofalseEnable Apify Proxy

Supported URL Formats

  1. Direct Channel ID: https://www.youtube.com/channel/UC...
  2. Username Handle: https://www.youtube.com/@username
  3. Custom URL: https://www.youtube.com/c/channelname
  4. Legacy User: https://www.youtube.com/user/username

Input Examples

Single Channel:

{
"channelUrls": "https://www.youtube.com/@youtube"
}

Multiple Channels:

{
"channelUrls": [
"https://www.youtube.com/@youtube",
"https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
"https://www.youtube.com/c/YouTube",
"https://www.youtube.com/user/YouTube"
]
}

Text Area Format:

{
"channelUrls": "https://www.youtube.com/@youtube\nhttps://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw\nhttps://www.youtube.com/c/YouTube"
}

πŸ“€ Output

Successful Extraction (Direct)

{
"youtubeChannelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"urlType": "direct",
"status": "success"
}

Successful Extraction (Resolved)

{
"youtubeChannelUrl": "https://www.youtube.com/@youtube",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"urlType": "username",
"identifier": "youtube",
"status": "success"
}

Failed Extraction

{
"youtubeChannelUrl": "https://www.youtube.com/@invalidchannel",
"channelId": "Not Found",
"urlType": "username",
"identifier": "invalidchannel",
"error": "Failed to resolve channel ID",
"status": "failed"
}

Summary Record

{
"_summary": {
"extractedAt": "2026-01-18T12:00:00.000Z",
"totalChannels": 3,
"successCount": 2,
"failedCount": 1,
"channels": [...]
}
}

πŸš€ Usage

On Apify Platform

  1. Navigate to Actor page
  2. Click "Try for free" or "Start"
  3. Paste YouTube channel URLs (one per line)
  4. Click "Start"
  5. View results in Dataset

πŸ› οΈ How It Works

  1. URL Parsing - Extracts identifier from URL using regex
  2. Direct Channel IDs - Returns immediately if URL contains channel ID
  3. Username Resolution - Uses yt-dlp to resolve @username to channel ID
  4. Custom URL Resolution - Resolves custom URLs via yt-dlp
  5. Error Handling - Reports failures with detailed error messages
  6. Batch Processing - Processes all URLs sequentially
  7. Summary Generation - Creates summary record with statistics

Invalid YouTube URL

  • Ensure URL contains youtube.com or youtu.be
  • Check URL is properly formatted
  • Example: https://www.youtube.com/@username βœ…

Channel ID Not Found

  • Channel might be deleted or private
  • @username might be incorrect
  • Some channels may not have public IDs
  • Try using direct channel/ID URL format

Resolution Timeout

  • Enable useApifyProxy if getting blocked
  • Some channels may take longer to resolve
  • Verify channel exists and is public

πŸ“Š Output Data Fields

FieldTypeDescription
youtubeChannelUrlStringOriginal input URL
channelIdStringExtracted YouTube channel ID
urlTypeStringURL format type (direct/username/custom/user)
identifierStringExtracted identifier (for non-direct URLs)
statusString"success" or "failed"
errorStringError message (only if failed)

πŸ’‘ Tips for Best Results

  1. URL Format: Use complete URLs with https://
  2. Batch Size: Process 10-20 channels at a time
  3. Error Checking: Always check status field
  4. Direct URLs: Use channel/ID format when possible (fastest)
  5. Validation: Verify URLs are YouTube channel links

πŸ†š Comparison with Original Script

FeatureOriginal ScriptApify Actor
InputTerminal promptWeb form / API
OutputLocal JSON fileApify Dataset
Multiple URLsManual loopBatch processing βœ…
VS Code IntegrationAuto-openN/A (cloud-based)
Error HandlingBasicComprehensive βœ…
Proxy SupportNoYes βœ…
Cloud StorageNoYes βœ…
API AccessNoYes βœ…

🎯 URL Format Examples

βœ… Supported:
https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw
https://www.youtube.com/@youtube
https://www.youtube.com/c/YouTube
https://www.youtube.com/user/YouTube
❌ Not Supported:
https://www.youtube.com/watch?v=... (video URLs)
https://www.youtube.com/playlist?list=... (playlist URLs)