Telegram Search API
API health
- 24h health
- Normal
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Search messages across public Telegram channels by keyword. Each hit has channel name, type, subscriber count, views, reactions and media. Narrow the window with since and until. Private chats are never searched, and results do not represent all of Telegram.
Send POST https://api.everyinfra.com/api/v1/social with platform set to telegram and action set to search. Price $0.56 per 1,000 requests ($0.000556 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
AI prompt
#Please help me write a data collection script with the EveryInfra Telegram Search endpoint (telegram/search).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to telegram and action to search, and put the parameters inside params.
- Required parameters:
- keyword: Specifies the message search query for the search action in public channels. It does not search contact lists or private chats.
- Optional parameters:
- since: Sets the lower message date bound for the search action. It does not filter by group creation date, and channel_posts has no date filter.
- until: Sets the upper message date bound (beforeDate) for the search action. Used alongside since to narrow public message results; it does not guarantee complete message coverage within the specified range.
- limit: The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. (default: 20)
- Returns a list of records. Main fields of each record: id, url, text, posted_at, view_count, media_url, reactions, channel_username, channel_title, channel_type, channel_subscriber_count, channel_description.
- Example request body:
{
"platform": "telegram",
"action": "search",
"params": {
"keyword": "bitcoin"
}
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
#| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | telegram | Platform identifier, fixed value. |
action | body | string | Yes | search | Capability identifier, fixed value. |
keyword | body.params | string | Yes | - | Specifies the message search query for the search action in public channels. It does not search contact lists or private chats. |
since | body.params | date | No | - | Sets the lower message date bound for the search action. It does not filter by group creation date, and channel_posts has no date filter. |
until | body.params | date | No | - | Sets the upper message date bound (beforeDate) for the search action. Used alongside since to narrow public message results; it does not guarantee complete message coverage within the specified range. |
limit | body.params | integer (1–100) | No | 20 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |
Code samples
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "telegram",
"action": "search",
"params": {
"keyword": "bitcoin"
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
#{ "id": "req_…", "platform": "telegram", "action": "search", "results": [ { "id": 17347, "url": "https://t.me/s/BitcoinBullets?before=17348", "text": "#ALGO Market Analysis\n\nALGO is at 0.1065 on the 8h. A steady slide from the 0.1350 highs has walked it straight into the rising trendline from the mid August lows near 0.1045. The trendline last caught price in mid September and launched the move to the highs, so this test carrie…", "posted_at": "2026-10-24T03:12:51+00:00", "view_count": 3760, "media_url": "https://cdn1.telesco.pe/file/L8xXzg-1fMU1_C3CIFPJrV2jLFtIv-dKS6i26m0q2ih1q5qmi6TuPK3xc2BnJjAcmyZYpQoh1Cq4lPpcKu93ot-IQLOj2oyJrEXAICkGf5LQn8o9LrEbSC5m3s0IgGRKXRYVe_6wI3eGPqL3JnAvP9aF6gEhvYJ7zeCF1CnFpk-IKpy07ou-98er0QyXBX_0ONu6vn7Lnk9UJktsjySTFjCTkouy62mtSppMXnJ-JqOhMpgkQrK4NvhRLcS…", "channel_username": "•••", "channel_title": "Bitcoin Bullets®", "channel_type": "Channel", "channel_subscriber_count": 98900, "channel_description": "The most accurate trading signals on Telegram since 2018.\n\nVIP: @•••\nCONTACT: @•••\n\nBINGX $5K Bonus: https://bingx.com/invite/XJKYUGIC\nBybit $30K Bonus: https://bit.ly/btcbullets\nMEXC $20k Bonus: https://bit.ly/BBMEXC", "platform": "telegram" }, { "id": 72823, "url": "https://telegram.me/s/cointelegraph", "text": "🔥 JUST IN: Spot Bitcoin ETFs just bled $635.6M in a single day, the biggest outflow since June. \n\nBlackRock's $IBIT alone dumped $254.1M.\n\nNews | Markets | YouTube", "posted_at": "2026-10-24T04:35:40+00:00", "view_count": 7590, "media_url": "https://cdn5.telesco.pe/file/fw7hVR8Ye5Sca20t8mXruSNy9t6lWEjm7ZP-CkQsWKx0YVnz0FVuo6694XBR6RrHeV4-dMQ-rAgc9fVg0hRQEZ4GUb03077FdE9yFtoI1WS7fCeL8Bo3exP5ztWf9ESnIUwKHc6x3hOzcmGZkQGvplwicupu4CSlZLWpMpK6b_WjPMern2avP3bupXdqdONF3wFOwHe4nvgwKWQRFvGIaZDTsHhmMsbsP5d44DteJlike1ZL3kwkD9FR8n2…", "reactions": [ { "emoji": "🔥", "count": 27 }, { "emoji": "🤡", "count": 20 }, { "emoji": "❤", "count": 12 } ], "channel_title": "Cointelegraph", "channel_type": "Channel", "channel_subscriber_count": 328000, "channel_description": "The Future of Money \n\nUnbiased crypto, markets & Web3 news in real-time. Trusted since 2013.\n\n🔔 Turn on notifications to catch the calls that move markets.\n\nExplore: linktr.ee/cointelegraph_mobile\n\nFor ads: •••", "platform": "telegram" } ], "count": 16, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
Response fields
#Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
url | Link to the record on the platform. |
text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
view_count | Views or plays. null means not disclosed, not 0. |
media_url | Keeps the platform's own meaning |
reactions | Keeps the platform's own meaning |
channel_username | Keeps the platform's own meaning |
channel_title | Keeps the platform's own meaning |
channel_type | Keeps the platform's own meaning |
channel_subscriber_count | Keeps the platform's own meaning |
channel_description | Keeps the platform's own meaning |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
Official references
#Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.
- Telegram Official: Content Licensing and AI Usage Restrictions ↗
Official Telegram terms restrict content access beyond normal intended platform usage and prohibit scraping or aggregating platform data for AI model training, validation, enhancement, benchmarking, and deployment; exceptions require explicit, continuous consent from relevant users per piece of content and context, as public visibility does not grant a general usage license.
Checked 2026-09-04