Documentation
Everything you need to integrate TG Parser V2 into your applications.
Quick Start
Get your first channel parsed in seconds. You'll need an API key from the dashboard.
curl -X POST https://api.tgparser.cc/parse \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel": "durov", "limit": 5, "details": true}'
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel": "durov", "limit": 5, "details": true}'
Note: Set "details": true to get views and reactions breakdown (default is false).
API Reference
POST
/parseExtract messages from a public Telegram channel.
Parameters
| Name | Type | Description |
|---|---|---|
| channel | string | The username of the channel (e.g. "@durov") or t.me link. |
| limit | integer | Number of messages to retrieve. Hard-capped at 100 server-side regardless of what's sent. Defaults to 100 if both hours and limit are omitted. |
| hours | integer | Fetch messages from the last X hours. |
| details | boolean | Include extended metrics like views and reactions. Default: false. |
Response Example
{
"status": "success",
"count": 1,
"messages": [
{
"id": 474,
"date": "2026-03-01T21:05:45+00:00",
"text": "🎆 Unfortunately, I had to leave Dubai...",
"link": "https://t.me/@durov/474",
"channel": "@durov",
"channel_title": "Pavel Durov",
"has_media": true,
"media_type": "photo",
"views": 800738,
"reactions": 58375,
"reactions_details": [
{
"emoji": "👍",
"count": 8261
},
{
"emoji": "custom_5265077361648368841",
"count": 28241
}
]
}
]
}GET
/media/{channel}/{message_id}Download the photo, video, or document attached to a message returned by /parse. Check has_media / media_type on the message first.
Parameters
| Name | Type | Description |
|---|---|---|
| channel | string | Channel username, same value as the channel field from /parse. |
| message_id | integer | Message id from /parse. |
curl -X GET https://api.tgparser.cc/media/durov/1235 \
-H "x-api-key: YOUR_API_KEY" \
--output photo.jpg
-H "x-api-key: YOUR_API_KEY" \
--output photo.jpg
Media downloads do not count against your monthly request quota. Files over 10 MB are rejected.
Errors
| Status | Meaning |
|---|---|
| 422 | Missing or malformed X-API-Key header (or request body for /parse). |
| 403 | Invalid or disabled API key. |
| 404 | Channel, message, or media not found. |
| 413 | Media exceeds the 10 MB size limit (/media only). |
| 429 | Monthly usage limit exceeded, or Telegram rate limit (flood wait). |
| 500 | Auth service (Directus) error, or general processing error. |
| 503 | Auth service (Directus) unreachable. |
Code Examples
import requests
url = "https://api.tgparser.cc/parse"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"channel": "@durov",
"hours": 24,
"limit": 10,
"details": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())