🎬 YT-DLP API

Fast and reliable YouTube video information extraction service

Get detailed video info, search content, and access streaming URLs with our optimized API

🚀

Lightning Fast

Optimized yt-dlp integration with Chrome cookie support for enhanced access and faster processing

🤖

Telegram Integration

Get your API token instantly through our Telegram bot with built-in user management

🔒

Secure & Reliable

Token-based authentication with rate limiting and Redis-backed user management

🔍

Free Search

Unlimited YouTube search functionality without authentication or rate limits

📋 API Endpoints

GET /info
Extract detailed video information or search YouTube with full metadata. ✅ Returns direct streamable URL for video downloads and streaming.
GET http://api.nubcoder.com/info?token=YOUR_TOKEN&q=https://youtube.com/watch?v=VIDEO_ID
GET /search Free
Search YouTube videos without detailed extraction - unlimited usage. ❌ No stream URLs (metadata only).
GET http://api.nubcoder.com/search?q=python%20tutorial&max_results=5
POST /batch-info
Process multiple YouTube URLs concurrently (up to 5 URLs). ✅ Returns direct streamable URLs for each video.
POST http://api.nubcoder.com/batch-info?token=YOUR_TOKEN Content-Type: application/json ["url1", "url2", "url3"]
GET /rate-limit-status No Auth
Check your current rate limit status and remaining requests
GET http://api.nubcoder.com/rate-limit-status?token=YOUR_TOKEN
GET /health No Auth
Health check endpoint to verify API status
GET http://api.nubcoder.com/health

🤖 Get Started with Telegram Bot

Get your API token instantly and manage your account through our Telegram bot

📱 Start Telegram Bot

Rate Limits:

👤 Regular Users: 1,000 requests/day

👑 Admin Users: 10,000 requests/day

🔍 Search Endpoint: Unlimited & Free

🐍 Python Example Usage

import requests
import json

# Your API token from the Telegram bot
API_TOKEN = "your_token_here"
BASE_URL = "http://api.nubcoder.com"

def get_video_info(query):
    """Get video information from URL or search query"""
    url = f"{BASE_URL}/info"
    params = {
        "q": query,
        "token": API_TOKEN
    }

    try:
        response = requests.get(url, params=params)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:
        print(f"Error: {e}")
        return None

def search_videos(query, max_results=1):
    """Search YouTube videos (no token required)"""
    url = f"{BASE_URL}/search"
    params = {
        "q": query,
        "max_results": max_results
    }

    try:
        response = requests.get(url, params=params)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:
        print(f"Error: {e}")
        return None

def check_rate_limit():
    """Check your current rate limit status"""
    url = f"{BASE_URL}/rate-limit-status"
    params = {"token": API_TOKEN}

    try:
        response = requests.get(url, params=params)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:
        print(f"Error: {e}")
        return None

# Example usage
if __name__ == "__main__":
    # Search for videos (free)
    search_results = search_videos("python tutorial", max_results=1)
    if search_results:
        print("Search Results:")
        for video in search_results["results"]:
            print(f"- {video['title']} by {video['channel_name']}")

    # Get detailed info for a specific video
    video_info = get_video_info("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    if video_info:
        print(f"\nVideo Title: {video_info['title']}")
        print(f"Duration: {video_info['duration']} seconds")
        print(f"Views: {video_info['views']:,}")
        print(f"Stream URL: {video_info['url']}")

    # Check rate limit
    rate_status = check_rate_limit()
    if rate_status:
        print(f"\nRate Limit Status:")
        print(f"Used: {rate_status['requests_used']}/{rate_status['daily_limit']}")
        print(f"Remaining: {rate_status['requests_remaining']}")

📦 Installation

Install the required Python package:

pip install requests

🔑 Getting Your Token

  1. Message @ytdlp_api_bot on Telegram
  2. Send /start to get your API token
  3. Replace your_token_here in the code above