API Reference
Telegram API
Access Telegram channel and group data {{i18n.for_ai_agents}}
Version
1.0.0
Endpoints
7
Base URL
https://api.pressmonitor.com/telegram/v1 Authentication
All requests use Bearer token authentication. Add the Authorization header to every call.
Authorization: Bearer YOUR_TOKEN GET
/bot-info Bot Info
Bot Info
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| username | string | query | Yes | Username |
Code Examples
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/bot-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/bot-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/bot-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/bot-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/bot-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Responses
200 Success
GET
/channel-info Channel Info
Channel Info
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| username | string | query | Yes | Username |
Code Examples
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/channel-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/channel-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/channel-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/channel-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/channel-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Responses
200 Success
GET
/get-messages Get Messages
Get Messages
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| username | string | query | Yes | Username |
| offset | string | query | No | Offset |
Code Examples
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/get-messages" querystring = {"username":"SOME_STRING_VALUE","offset":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Responses
200 Success
GET
/group-info Group Info
Group Info
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| username | string | query | Yes | Username |
Code Examples
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/group-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/group-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/group-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/group-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/group-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Responses
200 Success
GET
/search Search
Search
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| keyword | string | query | Yes | Keyword |
Code Examples
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/search?keyword=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/search?keyword=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/search" querystring = {"keyword":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/search?keyword=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/search?keyword=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Responses
200 Success
GET
/search-hashtag Search Hashtag
Search Hashtag
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| hashtag | string | query | Yes | Hashtag |
| offset | string | query | No | Offset |
Code Examples
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/search-hashtag" querystring = {"hashtag":"SOME_STRING_VALUE","offset":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Responses
200 Success
GET
/user-info User Info
User Info
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| username | string | query | Yes | Username |
Code Examples
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/user-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/user-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/user-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/user-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/user-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); Responses
200 Success