channelsstringbắt buộc
Comma-separated channel usernames, up to 20 per request.
https://api.sandbase.ai/v1/api/telegram/web/batch-channel-infoReturns basic channel profile details including title, description, and verified status for multiple public Telegram channels at once.
[
{
"data": {
"count": 1,
"results": [
{
"channel": "telegram",
"info": {
"counters": {
"links": "378",
"photos": "16",
"subscribers": "9.39M",
"videos": "228"
},
"description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
"photo": "https://cdn1.telesco.pe/file/uD1p4tMGhImdMimOPmsCryQhp8WC8j3pnTfxcBrqPyqhV_95GMsh3ZN-IZbMSGNCDwOsmS2YdjyFuuPg1WtqRw9O33otBT0nsTmME4s82WyRLr0w_EqwwERoPwqG-auB75gIa6tqlAfk3iCPZ5XuiH8Uw5kbtwRGHjUWwWEznwOfmZVt7UzNBbCYAv5yhv3p4SP34D6LkkzYZJ3mDPAPqDyppw79yOKDqvduzRUG8TAXHkGTfKRhJcIRb9-bAbr1t7GtcwYdquTJLhJdU3AnJBPZdPTFq9_M2AMSyy-K3llQ4RgOImDEQBEGed5aiOrVrDwpbsWAW1KNiUm9zvu6Wg.jpg",
"subscribers": "9.39M",
"title": "Telegram News",
"username": "telegram",
"verified": true
},
"ok": true
}
]
}
}
]Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
Returns public profile details for up to 20 Telegram channels in one call. You pass a comma-separated list of channel usernames in channels. Each result holds the title, description, photo, verified flag and subscriber and media counts.
curl -X POST "https://api.sandbase.ai/v1/api/telegram/web/batch-channel-info" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channels": "telegram"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channels | string | Yes | Comma-separated channel usernames, up to 20 per request. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"count": 1,
"results": [
{
"channel": "telegram",
"info": {
"counters": {
"links": "378",
"photos": "16",
"subscribers": "9.2M",
"videos": "228"
},
"description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
"photo": "https://cdn1.telesco.pe/file/hnmFZVV6A1_vjW41WnRQI9LiY1404GFwcfT_HbWGXlPkZCJQr6y…",
"subscribers": "9.2M",
"title": "Telegram News",
"username": "telegram",
"verified": true
},
"ok": true
}
]
}
| Field | Meaning |
|---|---|
count | Number of channels in the results list. |
results[].channel | The username you asked for, as sent in the request. |
results[].ok | true when the lookup for this channel worked. |
results[].info.title | Display name of the channel. |
results[].info.username | Channel username without the @. |
results[].info.description | Channel bio text. |
results[].info.verified | true when the channel has the verified badge. |
results[].info.subscribers / results[].info.counters.subscribers | Subscriber count as a short text string, such as 9.2M. It is not an exact number. |
results[].info.counters.photos / results[].info.counters.videos / results[].info.counters.links | Counts of photos, videos and links shared in the channel, returned as strings. |
results[].info.photo | URL of the channel profile picture. |
@, separated by commas, for example telegram,durov. The limit is 20 per request.results[].ok for each channel, since results are returned per channel.subscribers are abbreviated strings, so parse values like 9.2M before you do math.$0.008 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/telegram/web/batch-channel-info" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channels": "telegram"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
channelsstringbắt buộcComma-separated channel usernames, up to 20 per request.
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
[
{
"data": {
"count": 1,
"results": [
{
"channel": "telegram",
"info": {
"counters": {
"links": "378",
"photos": "16",
"subscribers": "9.39M",
"videos": "228"
},
"description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
"photo": "https://cdn1.telesco.pe/file/uD1p4tMGhImdMimOPmsCryQhp8WC8j3pnTfxcBrqPyqhV_95GMsh3ZN-IZbMSGNCDwOsmS2YdjyFuuPg1WtqRw9O33otBT0nsTmME4s82WyRLr0w_EqwwERoPwqG-auB75gIa6tqlAfk3iCPZ5XuiH8Uw5kbtwRGHjUWwWEznwOfmZVt7UzNBbCYAv5yhv3p4SP34D6LkkzYZJ3mDPAPqDyppw79yOKDqvduzRUG8TAXHkGTfKRhJcIRb9-bAbr1t7GtcwYdquTJLhJdU3AnJBPZdPTFq9_M2AMSyy-K3llQ4RgOImDEQBEGed5aiOrVrDwpbsWAW1KNiUm9zvu6Wg.jpg",
"subscribers": "9.39M",
"title": "Telegram News",
"username": "telegram",
"verified": true
},
"ok": true
}
]
}
}
]Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Telegram Batch Channel InfoAPI này Telegram | $0.008 mỗi lần gọi | JSON |
Telegram | $0.001 mỗi lần gọi | JSON |
Telegram | $0.001 mỗi lần gọi | JSON |
Telegram | $0.001 mỗi lần gọi | JSON |
Telegram | $0.001 mỗi lần gọi | JSON |
Telegram | $0.001 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/telegram/web/batch-channel-info với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.008 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: channels (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Telegram Batch Channel Info chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Telegram.