# TeleScope (`combify/telescope`) Actor

Bulk Telegram account and channel lookup tool for public usernames and links. Retrieve profiles, profile pictures, channel data, and structured results for CRM and lead workflows.

- **URL**: https://apify.com/combify/telescope.md
- **Developed by:** [Combify](https://apify.com/combify) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.55 / 1,000 successful telegram lookups

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Telegram Profile & Channel Scraper

**TeleScope** is a bulk **Telegram data extraction** Actor that turns usernames and public `t.me` links into structured account and channel records. Look up Telegram users, bots, channels, groups, and supergroups; add profile pictures and channel metadata; and optionally extract accessible chat history in a single Apify run.

TeleScope handles bulk identifiers independently, writes successful records to the Dataset, and keeps invalid or failed identifiers separate. It runs in the cloud and needs no local setup.

### What does the TeleScope Actor do?

For each identifier, the Actor:

1. **Normalizes the input** - accepts `@username`, public `t.me` URLs, `telegram.me` URLs, and `tg://resolve` links.
2. **Checks the public account** - retrieves the Telegram numeric ID, username, account type, and public profile fields.
3. **Scrapes profile information** - captures display name, first and last name where available, verification and scam/fake flags, and Premium status if Telegram exposes it.
4. **Returns optional profile pictures** - downloads the requested public profile image server-side and returns it as a token-free data URL.
5. **Returns channel or group metadata** - captures title, description, member count, and public URL when Telegram exposes it.
6. **Extracts accessible message history** - returns text and metadata for messages in public channels/groups and chats accessible through an authenticated MTProto session.

#### What data does it extract?

Each profile result is written as one row:

| Data | Details |
|---|---|
| 📥 **Input** | The original username or public Telegram link submitted |
| 🆔 **Telegram ID** | Telegram numeric chat or account ID |
| 🏷️ **Username** | Public Telegram username without `@`, or `null` |
| 🌐 **Public URL** | Public `https://t.me/...` URL when available |
| 👤 **Profile** | First name, last name, display name, bio, and profile picture add-on |
| ✅ **Account flags** | Verified, Premium, scam, and fake statuses when Telegram exposes them |
| 👥 **Account type** | `user`, `bot`, `channel`, `group`, or `supergroup` |
| 📢 **Channel metadata** *(add-on)* | Title, description, subscriber/member count, and public URL |
| 💬 **Messages** *(add-on)* | Text, sender, timestamp, views, forwards, reactions, media metadata, and reply context |

Fields hidden or not exposed by Telegram come back as `null`. `null` means unavailable or not exposed, while `false` means a status was explicitly reported as false.

#### Features

##### Bulk Telegram profile lookup

Pass up to **1,000 unique usernames or public links** in one run. Each identifier is processed independently, so one invalid or inaccessible account does not stop the rest of the batch.

##### Public user, bot, channel, and group data

Identify whether a result is a personal account, bot, channel, basic group, or supergroup. Retrieve the public profile fields that Telegram makes available to the selected authentication method.

##### Profile picture add-on

Turn on `pictures` to include a profile picture as a token-free data URL. Telegram profile fields are hidden by privacy settings or account type may produce `null`.

##### Channel and group metadata

Turn on `channelInfo` to add channel/group title, description, member count, and public URL. Counts are returned only when Telegram exposes them.

##### Telegram message extraction

Turn on `extractMessages` and set `messageLimit`, from 1 to 10,000 messages per chat. Message extraction requires an authenticated MTProto user session and is limited to channels, supergroups, and groups accessible to that session.

Extracted message rows contain:

- Message ID
- Chat ID and username
- Message text
- Sender ID, name, and username
- ISO timestamp
- Views and forwards
- Reactions
- Media metadata
- Reply and thread IDs

The Telegram Bot API does not expose chat-history retrieval. Message extraction is not available for arbitrary personal direct-message history and does not enumerate group members.

##### Clean, structured output

Download profile and message rows as JSON, CSV, Excel, HTML, or XML through Apify Storage, or retrieve them through the Apify API.

### How to use TeleScope

1. Open the Actor and add usernames or public Telegram links to `identifiers`.
2. Choose optional profile picture, channel metadata, and message extraction add-ons.
3. Configure the Telegram authentication and credentials required for the selected lookup mode.
4. Click **Start**.
5. Download results from the **Storage** tab or continue through the Apify API or MCP integration.

### Input example

```json
{
  "identifiers": [
    "@telegram",
    "@vxunderground",
    "https://t.me/telegram"
  ],
  "pictures": true,
  "extendedInfo": false,
  "channelInfo": true,
  "extractMessages": false,
  "messageLimit": 100,
  "lookupMode": "auto",
  "maxIdentifiers": 1000
}
```

Supported inputs include:

- `@username`
- `https://t.me/username`
- `https://telegram.me/username`
- `tg://resolve?domain=username`

### Output example

Profile records use a stable structure:

```json
{
  "input": "@telegram",
  "success": true,
  "telegramId": "777000",
  "username": "telegram",
  "publicUrl": "https://t.me/telegram",
  "profile": {
    "firstName": null,
    "lastName": null,
    "displayName": "Telegram",
    "bio": null,
    "pictureUrl": null,
    "verified": true,
    "premium": null,
    "scam": false,
    "fake": false
  },
  "account": {
    "type": "channel",
    "public": true
  },
  "channelDetails": {
    "title": "Telegram",
    "description": "Official Telegram channel",
    "memberCount": null,
    "publicUrl": "https://t.me/telegram"
  },
  "metadata": {
    "retrievedAt": "2026-11-19T21:00:00.000Z"
  }
}
```

When message extraction is enabled, the Dataset also receives structured message rows:

```json
{
  "messageId": "12345",
  "chatId": "-1001234567890",
  "chatUsername": "channelname",
  "text": "Example Telegram message",
  "sender": {
    "id": "987654321",
    "name": "Example Sender",
    "username": "example"
  },
  "timestamp": "2026-11-19T20:30:00.000Z",
  "views": 1500,
  "forwards": 24,
  "reactions": [
    {
      "emoji": "👍",
      "count": 18
    }
  ],
  "media": null,
  "reply": null
}
```

When extraction is enabled, the profile row and its message rows are kept together in the same run. Personal accounts remain profile results; direct-message history is not extracted.

### Failures

Every failed or invalid identifier is stored in the `FAILED_IDENTIFIERS` Key-Value Store record:

```json
[
  {
    "original": "12345",
    "normalized": "12345",
    "errorCode": "UNSUPPORTED_IDENTIFIER_TYPE",
    "explanation": "Numeric Telegram IDs are not publicly resolvable..."
  }
]
```

Supported failure codes include:

- `INVALID_IDENTIFIER`
- `USER_NOT_FOUND`
- `USERNAME_UNAVAILABLE`
- `PRIVATE_OR_INACCESSIBLE`
- `UNSUPPORTED_IDENTIFIER_TYPE`
- `RATE_LIMITED`
- `TELEGRAM_API_UNAVAILABLE`
- `AUTHENTICATION_REQUIRED`
- `SPENDING_LIMIT_REACHED`
- `LOOKUP_FAILED`

Failed entries do not enter the success Dataset and are not charged.

### Input reference

| Field | Type | Description |
|---|---|---|
| `identifiers` | array | Usernames or public Telegram links. Up to 1,000 unique entries per run. |
| `pictures` | boolean | Add profile picture data URLs. Default `false`. |
| `extendedInfo` | boolean | Add alternative public usernames and other exposed public fields. Default `false`. |
| `channelInfo` | boolean | Add public channel/group title, description, count, and URL. Default `false`. |
| `extractMessages` | boolean | Extract accessible channel/group history through MTProto. Default `false`. |
| `messageLimit` | integer | Messages per chat, from `1` to `10,000`. Default `100`. |
| `lookupMode` | string | `bot`, `mtproto`, or `auto`. Default `auto`. |
| `botToken` | secret | Telegram Bot API token for Bot API lookups. |
| `telegramApiId` | secret | Telegram application API ID for MTProto. |
| `telegramApiHash` | secret | Telegram application API hash for MTProto. |
| `telegramSessionString` | secret | Authorized Telegram user StringSession for MTProto. |
| `maxIdentifiers` | integer | Maximum identifiers processed. Default `1000`. |
| `spendingLimit` | number | Optional maximum USD run budget. |

#### Authentication

The default `bot` mode uses a Telegram Bot API token. It supports public account and channel lookups but cannot extract historical chat messages or reliably resolve arbitrary personal accounts.

Use `mtproto` or `auto` with an authorized Telegram user session to resolve personal accounts and extract history from channels/groups accessible to that account. Credentials are secret Actor inputs and must not be shared or committed.

#### Retries and limits

Telegram requests use bounded retries, configurable timeouts, and exponential backoff. Telegram `429` responses use a bounded retry delay. One failed identifier does not stop processing of the remaining list.

### Run through the API

Start a run and download its Dataset items:

```bash
curl -X POST "https://api.apify.com/v2/acts/<YOUR_ACTOR_ID>/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "identifiers": ["@telegram", "@vxunderground"],
    "pictures": true,
    "channelInfo": true
  }'
```

The same run can be started through the Apify JavaScript or Python clients, REST API, MCP server, integrations, or workflows.

### Standby API

When Standby mode is enabled, send a single lookup or message-extraction request:

```bash
curl -X POST "<STANDBY_URL>/lookup" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "@telegram",
    "pictures": false,
    "channelInfo": true,
    "extractMessages": true,
    "messageLimit": 100
  }'
```

The Standby endpoint requires the Actor's configured Telegram authentication. Optional HTTP API-key protection can be configured through Actor environment variables.

### Pricing

TeleScope uses a pay-per-event model:

- Successful Telegram lookup
- Returned profile picture
- Returned extended information
- Returned channel or group metadata
- Returned extracted message

Invalid, missing, inaccessible, and failed identifiers are not charged. Add-ons are charged only when requested and successfully returned. Empty histories and unsupported direct-message extraction are not charged for messages.

### Frequently asked questions

#### Can TeleScope scrape private Telegram accounts?

No. It only returns data exposed through the selected public Telegram API or chats already accessible to an authenticated MTProto session. It does not bypass privacy settings.

#### Can it extract personal direct messages?

No. Direct-message history extraction is outside the Actor's scope. It does extract history from channels, groups, and supergroups accessible to the authenticated session.

#### Can it resolve numeric Telegram IDs?

No. Arbitrary numeric ID resolution is not promised. Use public usernames or public Telegram links.

#### Can it enumerate channel or group members?

No. TeleScope does not enumerate members or participants.

#### Does it work with channels and groups?

Yes. Public channels and groups can be looked up with Bot API or MTProto credentials. Accessible private groups and supergroups can be used with an authorized MTProto session.

#### Are deleted or hidden messages included?

No. Only messages Telegram exposes to the authenticated session at extraction time are returned.

#### How is missing data represented?

Telegram fields that are unavailable, hidden, or unsupported are returned as `null`. `false` is used only for an explicitly exposed negative status.

### Privacy and legal notice

Use TeleScope only for identifiers and chats you are authorized to access. Telegram terms and applicable privacy laws may apply. The Actor does not circumvent Telegram privacy controls, harvest private account data, download private media permanently, enumerate members, or monitor chats continuously.

# Actor input Schema

## `identifiers` (type: `array`):

Up to 1,000 unique public Telegram usernames or t.me/telegram.me/tg://resolve identifiers.

## `pictures` (type: `boolean`):

Include a token-free profile picture data URL only when explicitly requested and successfully returned.

## `extendedInfo` (type: `boolean`):

Include only additional public fields actually returned by Telegram.

## `channelInfo` (type: `boolean`):

Include public channel/group title, description, member count, and URL when returned.

## `extractMessages` (type: `boolean`):

Extract accessible chat history with an authenticated MTProto user session. Bot API history is not available.

## `messageLimit` (type: `integer`):

Maximum messages to extract per target (bounded to 10,000).

## `botToken` (type: `string`):

Prefer TELEGRAM_BOT_TOKEN. This field is optional and must never be shared or committed.

## `telegramApiId` (type: `integer`):

MTProto application API ID obtained from my.telegram.org.

## `telegramApiHash` (type: `string`):

MTProto application API hash obtained from my.telegram.org.

## `telegramSessionString` (type: `string`):

Encrypted-string-equivalent user MTProto session. Generate locally and store as a secret. Never post or commit it.

## `lookupMode` (type: `string`):

Use a Telegram bot, an authenticated MTProto user session, or automatically select MTProto when user credentials are configured.

## `maxIdentifiers` (type: `integer`):

Maximum number of unique identifiers to process in this run.

## `spendingLimit` (type: `number`):

Optional run budget. A lookup that would exceed the limit is recorded as SPENDING_LIMIT_REACHED and is not charged.

## `basePrice` (type: `number`):

Estimated base charge for each successful public Telegram lookup.

## `picturePrice` (type: `number`):

Estimated add-on charge when a profile picture is actually returned.

## `extendedInfoPrice` (type: `number`):

Estimated add-on charge when extended public information is actually returned.

## `channelInfoPrice` (type: `number`):

Estimated add-on charge when channel or group metadata is actually returned.

## `messagePrice` (type: `number`):

Estimated charge per extracted message. Failed chats and empty histories are not charged.

## `maxRetries` (type: `integer`):

Maximum number of retry attempts for transient Telegram API failures.

## `timeoutMs` (type: `integer`):

Timeout for each Telegram API request.

## `maxRetryDelayMs` (type: `integer`):

Maximum delay between retries for transient Telegram API failures.

## Actor input object example

```json
{
  "identifiers": [],
  "pictures": false,
  "extendedInfo": false,
  "channelInfo": false,
  "extractMessages": false,
  "messageLimit": 100,
  "lookupMode": "auto",
  "maxIdentifiers": 1000,
  "spendingLimit": 0,
  "basePrice": 0.05,
  "picturePrice": 0.02,
  "extendedInfoPrice": 0.015,
  "channelInfoPrice": 0.01,
  "messagePrice": 0.003,
  "maxRetries": 2,
  "timeoutMs": 15000,
  "maxRetryDelayMs": 10000
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items for successful lookups or one structured record per extracted Telegram message.

## `failedIdentifiers` (type: `string`):

Key-value store record containing invalid or failed identifiers.

## `billingSummary` (type: `string`):

Key-value store record containing successful counts and calculated charge information.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("combify/telescope").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("combify/telescope").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call combify/telescope --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,combify/telescope"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/si86vHQsX3CyjpLMD/builds/etpVE5o3u6F6anQKC/openapi.json
