BWM XMD APIS

Telegram Video API - Fetch & Stream Videos from Telegram

Disconnected

API Configuration

Video Object Schema

// Response structure for video objects { "id": number, // Telegram message ID "chatId": number, // Telegram chat ID "title": string, // Video title (filename or caption) "thumbnailUrl": string, // Proxy URL for inline thumbnail display "streamingUrl": string, // Proxy URL for inline video playback "downloadUrl": string, // Direct Telegram URL (triggers download) "directUrl": string, // Direct Telegram file URL "uploadedAt": number, // Unix timestamp "caption": string, // Original caption text "fileSize": number, // File size in bytes "duration": number, // Duration in seconds "mimeType": string // e.g., "video/mp4" }

API Endpoints

GET
/api

Returns API information and list of available endpoints.

GET
/health

Health check endpoint. Returns server status and timestamp.

GET
/debug

Debug information including bot status, cache stats, and recent messages.

GET
/search?q={keyword}

Search videos by keyword. Searches through captions and filenames.

Parameters

q (required) Search keyword
GET
/trending

Fetch the latest videos sorted by date (newest first).

Parameters

limit (optional) Max videos (1-50, default: 50)
GET
/video/{id}

Get a single video by message ID.

Parameters

id (required) Telegram message ID
GET
/video/{chatId}/{id}

Get a single video by chat ID and message ID (more precise).

Parameters

chatId (required) Telegram chat ID
id (required) Telegram message ID
GET
/stream/{id}

Stream a video inline (plays in browser instead of downloading).

Parameters

id (required) Telegram message ID
GET
/thumbnail/{id}

Stream a video thumbnail inline.

Parameters

id (required) Telegram message ID

API Response

// Click any button above to test an endpoint...