# Telegram Media Downloader 📥 (`easyapi/telegram-media-downloader`) Actor

A powerful Telegram media downloader that extracts videos, photos, and other media content from Telegram posts. Simply input the post URLs and get high-quality downloadable media files with detailed metadata.

- **URL**: https://apify.com/easyapi/telegram-media-downloader.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media, Videos, Integrations
- **Features:** Limited permissions
- **Stats:** 1,635 total users, 7 monthly users, 100.0% runs succeeded, 8 bookmarks
- **User rating**: 4.69 out of 5 stars

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Telegram Media Downloader 📥

Extract and download media content from Telegram posts with ease! This actor helps you download videos, photos, and other media files from public Telegram channels and groups.

### Features 🌟

- 📹 Downloads high-quality videos from Telegram posts
- 🖼️ Extracts images and photos
- 📊 Provides detailed metadata for each post
- 🚀 Fast and efficient processing
- 💾 Supports batch processing of multiple URLs
- ⚡ Handles both single posts and channel content

### Input Parameters ⚙️

The actor accepts the following input parameters:

| Field | Type | Description |
|-------|------|-------------|
| links | Array | List of Telegram post URLs to process |

### Output Format 📋

The actor provides detailed output for each processed URL, including:

- Original post URL
- Media download URLs
- Post title and description
- Thumbnail URLs
- Media quality information
- Processing status and metadata

### Limitations ⚠️

- Only works with public Telegram channels and groups
- Respects Telegram's rate limiting
- Maximum 100 URLs per run recommended

### Use Cases 🎯

- Media archiving from Telegram channels
- Content curation and collection
- Social media management
- Research and data collection

#### Input Example

A full explanation of an input example in JSON.

```json
{
    "links": [
        "https://t.me/csifeducacionmadrid/2508"
    ]
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
    {
        "url": "https://t.me/csifeducacionmadrid/2508",
        "result": {
            "url": "https://t.me/csifeducacionmadrid/2508?embed=1&mode=tme",
            "source": "telegram",
            "title": "CSIF CONVOCA HUELGA EL 13/02📢 𝗖𝗦𝗜𝗙 convoca una jornada de huelga el día 13 de febrero 𝗽𝗼𝗿 𝗹𝗮 𝗶𝗻𝗰𝗲𝗿𝘁𝗶𝗱𝘂𝗺𝗯𝗿𝗲 𝗲𝗻 𝗠𝘂𝗳𝗮𝗰𝗲.▫️Miguel Borra, presidente de CSIF: &quot;Vamos a parar la Administración del Estado&quot;.▫️Lamentamos el perjuicio que esta huelga pueda generar sobre los ciudadanos, pero nos vemos obligados  a elevar el tono de la protesta para defender el derecho de nuestros/as funcionarios a recibir una asistencia sanitaria,  en el marco de la ley del mutualismo administrativo.➕INFO👇🏻https://tinyurl.com/35fnkjsz➡️ Síguenos en nuestras Redes Sociales:▫️Telegram:https://t.me/csifeducacionmadrid▫️Resto de RRSS:https://linktr.ee/csifeducacionmadrid",
            "thumbnail": "https://cdn4.cdn-telegram.org/file/nT1Rryao12GiA_OYOPKEzqa_qZ8GTXVb-hqg-xHeGv2mXJ0ljBCKRrsMqtRgbs-2fbDEX5si7rYGOgV-odQU4yGc5YcyIyw72QIJIJqv_mIQUtTbxAV5prXxfKvgpRZkCcVzwdfVvEIzuUfOQNamCuIwSTANzJfkLeIR4mvFCPoo_UNIklGMCnn4Et55x7Vlf2ZU55of9sVjH-L16qSQ2O5K8Hfm6SgWjNnZpnemOvmo227T_yn482wGDyPPSdX6sfXEnECUGJ6idr__eZeiRlxypDi8v_VSrlk_wTtUwDCM7--vWX5S3AHQyGfpSIaP-mVj2diwJnzQU8t3UkLz-w.jpg",
            "medias": [
                {
                    "url": "https://cdn4.cdn-telegram.org/file/73fddf2b66.mp4?token=SqPZ209pwujrJGtk0OBbKCYCmwyq1RgKsPLRpBoZX8-6fviu7-5pWmg3IlyUt1T4DZRe2oXDxBubS_IIb_D4xPsX6IZiBct99Na-l3vNv6kzBScnChAD1w92obv7v0j-Hud86TEAjpdXQtKyvALBXgUI45RdNqNBFiUSyzP7p7pTps5dOl_OywAiCpoMH8T8rsRCBbjcGHrovMHoZKV7RVUSQyfvYNRfm7bmNNRFM9zrQtmjllINzxrIAZGQjh-U_pc8gZsCC9ZOtiEOIgzJURz7anq4qdQEMbJy_kwornmDOXKEC_Bg4m74cwjCveJp-eNHlP1yZQeD_1A17rhLZA",
                    "quality": "HD",
                    "extension": "mp4",
                    "type": "video"
                }
            ],
            "type": "single",
            "error": false,
            "time_end": 692
        }
    }
]
```

### Related Actors

- 🎥 [All-in-One Media Downloader](https://apify.com/easyapi/all-in-one-media-downloader) - Download videos, images, or audio from various platforms including TikTok, Instagram, YouTube, and more
- 🎥 [TikTok Video Downloader](https://apify.com/easyapi/tiktok-video-downloader) - Download TikTok videos without watermarks in original quality
- 📥 [Instagram Videos Downloader](https://apify.com/easyapi/instagram-videos-downloader) - Download videos from Instagram posts, reels, and stories
- 🎥 [YouTube Video and MP3 Downloader](https://apify.com/easyapi/youtube-video-and-mp3-downloader) - Download high-quality videos and audio from YouTube
- 🎥 [Facebook Video Download](https://apify.com/easyapi/facebook-video-download) - Download Facebook videos in Full HD, 1080p, 2K, and 4K resolutions
- 🎥 [Twitter/X Video Downloader](https://apify.com/easyapi/twitter-x-video-downloader) - Download high-quality videos from Twitter/X platform
- 🎥 [Reddit Media Downloader](https://apify.com/easyapi/reddit-media-downloader) - Download high-quality videos, GIFs, and images from Reddit posts
- 🎥 [Vimeo Video Downloader](https://apify.com/easyapi/vimeo-video-downloader) - Download Vimeo videos in multiple quality options from 240p to 1080p
- 🎥 [DailyMotion Video Downloader](https://apify.com/easyapi/dailymotion-video-downloader) - Extract video metadata and download links from DailyMotion videos
- 🎥 [Rumble Video Downloader](https://apify.com/easyapi/rumble-video-downloader) - Download videos from Rumble.com in multiple quality options
- 🎥 [VK Video Downloader](https://apify.com/easyapi/vk-video-downloader) - Extract and download high-quality videos from VK.com and VKVideo.ru
- 🎥 [Bilibili Video Downloader](https://apify.com/easyapi/bilibili-video-downloader) - Extract and download videos from Bilibili platform
- 📥 [9GAG Media Downloader](https://apify.com/easyapi/9gag-media-downloader) - Download high-quality images and videos from 9GAG posts
- 🎥 [Streamable Video Downloader](https://apify.com/easyapi/streamable-video-downloader) - Extract and download videos from Streamable.com with high quality
- 🎥 [TED Talk Video Downloader](https://apify.com/easyapi/ted-talk-video-downloader) - Download TED talk videos and audio in multiple quality options

# Actor input Schema

## `links` (type: `array`):

List of Telegram post URLs to process

## `proxyConfiguration` (type: `object`):

Optionally, use Apify Proxy or custom HTTP proxy to avoid IP address-based blocking.

## Actor input object example

```json
{
  "links": [
    "https://t.me/csifeducacionmadrid/2508"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/telegram-media-downloader").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/telegram-media-downloader").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call easyapi/telegram-media-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,easyapi/telegram-media-downloader"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/h2jfj7OCBMIsNhuwO/builds/MgKhRR5h5zKH8niuH/openapi.json
