# Telegram Search API (telegram.search)

- Canonical page: [https://everyinfra.com/en/telegram-api/search](https://everyinfra.com/en/telegram-api/search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "telegram", "action": "search", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=telegram&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies the message search query for the search action in public channels. It does not search contact lists or private chats. |
| since | not declared | no | not declared | 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 | not declared | no | not declared | 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 | 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. |

## Response fields (items in `results`)

| 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 | platform-native meaning |
| reactions | platform-native meaning |
| channel_username | platform-native meaning |
| channel_title | platform-native meaning |
| channel_type | platform-native meaning |
| channel_subscriber_count | platform-native meaning |
| channel_description | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
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"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "telegram",
        "action": "search",
        "params": {
            "keyword": "bitcoin",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 16. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "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": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=telegram
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
