> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram Search API

> Telegram posts matching a keyword, with channel handle and title, posted time and text.

`POST /v1/data/telegram/search/run`

**Pricing:** $0.0065 per post ($6.50 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**queries** `string[]` *required*

One or more search keywords. One request reads them all.

**channels** `string[]`

One or more channels. One request reads them all.

**maxResults** `integer` (default: 100)

How many posts to return in total. Defaults to 100; use 0 for all.

**onlyPostsNewerThan** `date`

Only Posts Newer Than as a date (YYYY-MM-DD).

**onlyPostsOlderThan** `date`

Only Posts Older Than as a date (YYYY-MM-DD).

**exactPhrase** `boolean` (default: false)

Exact Phrase.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/telegram/search/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "queries": [
      "privacy"
    ],
    "channels": [
      "durov"
    ],
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/telegram/search/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "queries": [
        "privacy"
    ],
    "channels": [
        "durov"
    ],
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/telegram/search/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "queries": [
    "privacy"
  ],
  "channels": [
    "durov"
  ],
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one post, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `postUrl` | Post URL | url |
| `postId` | Post ID | text |
| `channelHandle` | Channel Handle | text |
| `channelTitle` | Channel Title | text |
| `searchKeyword` | Search Keyword | text |
| `postedAt` | Posted At | datetime |
| `text` | Text | text |
| `viewsApprox` | Views Approx | number |
| `reactions` | Reactions | number |
| `reactionBreakdown` | Reaction Breakdown | object\_array |
| `contentType` | Content Type | text |
| `isEdited` | Is Edited | boolean |
| `author` | Author | text |
| `forwardedFrom` | Forwarded From | text |
| `forwardedFromUrl` | Forwarded From URL | url |
| `replyToUrl` | Reply To URL | url |
| `linkPreview` | Link Preview | object |
| `outboundLinks` | Outbound Links | array |
| `hashtags` | Hashtags | array |
| `photoUrls` | Photo URLs | array |
| `videoUrls` | Video URLs | array |
| `channelId` | Channel ID | text |
| `channelSubscribersApprox` | Channel Subscribers Approx | number |
| `channelVerified` | Channel Verified | boolean |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "telegram/search",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "channelVerified": true,
      "author": "Pavel Durov",
      "reactionBreakdown": [
        {
          "emoji": "⭐",
          "count": 6760
        },
        {
          "emoji": "custom",
          "count": 54400
        }
      ],
      "searchKeyword": "privacy",
      "channelSubscribersApprox": 10200000,
      "forwardedFromUrl": null,
      "isEdited": false,
      "viewsApprox": 11700000,
      "postedAt": "2026-05-23T13:26:07+00:00",
      "contentType": "text",
      "channelTitle": "Pavel Durov",
      "forwardedFrom": null,
      "postUrl": "https://t.me/durov/520",
      "text": "🎭 WhatsApp encryption is a giant fraud.\n\n🇺🇸 The state of Texas just sued WhatsApp for lying to users about privacy — because WhatsApp employees have access t...",
      "linkPreview": null,
      "photoUrls": [],
      "channelHandle": "durov",
      "replyToUrl": null,
      "reactions": 96831,
      "outboundLinks": [
        "https://www.reuters.com/legal/government/texas-sues-meta-whatsapp-over-encryption-privacy-claims-2026-05-21/"
      ],
      "channelId": "1006503122",
      "postId": "520",
      "hashtags": [],
      "videoUrls": []
    }
  ]
}
```

## Related APIs

For every post from a known channel use [`telegram/posts`](https://docs.mindcase.co/apis/telegram/posts).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.