# Telegram Profile Photo Scraper (`akula.marketing/telegram-get-username-photos`) Actor

Fetch Telegram profile photo history and user metadata by username. Returns IDs, names, status, premium flags, and signed photo URLs.

- **URL**: https://apify.com/akula.marketing/telegram-get-username-photos.md
- **Developed by:** [akula.marketing](https://apify.com/akula.marketing) (community)
- **Categories:** Lead generation, Social media, Other
- **Stats:** 466 total users, 14 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $7.50 / 1,000 results

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Telegram Get Username Photos

Actor retrieves profile photos and detailed Telegram user information based on a provided username. It fetches data such as Telegram ID, username, first/last name, about, status, last online timestamp, language code, premium status, blocked status, bot status, and a list of profile photos.

### 📥 Input

The Actor accepts a single input field:

- **username**: A Telegram username (e.g., `"username", "t.me/username"`).

#### 📋 Input Schema

| Field     | Type   | Description                              | Required |
|-----------|--------|------------------------------------------|----------|
| `username`| String | Telegram username or URL                 | Yes      |

The username can be provided as `@username`, `username`, or a URL like `https://t.me/username`.

### 📤 Output

The Actor outputs a dataset with the following fields:

| Field           | Type    | Description                              |
|-----------------|---------|------------------------------------------|
| `id`            | String  | Telegram user ID                         |
| `username`      | String  | Input username                           |
| `firstName`     | String  | User's first name                        |
| `lastName`      | String  | User's last name                         |
| `phone`         | String  | User's phone                             |
| `state`         | String  | User's status (e.g., online, offline)    |
| `wasOnline`     | String  | Last online timestamp                    |
| `langCode`      | String  | User's language code                     |
| `premium`       | Boolean | Premium account status                   |
| `blocked`       | Boolean | Blocked status                           |
| `bot`           | Boolean | Whether the account is a bot             |
| `photos`        | Array   | List of profile photos                   |
| `status`        | String  | Request status (e.g., `success`)         |
| `error`         | String  | Error message (if any)                   |

Each photo in the `photos` array includes:

| Field  | Type   | Description                              |
|--------|--------|------------------------------------------|
| `id`   | String | Photo ID                                 |
| `dcId` | String | Data center ID                           |
| `date` | String | Photo upload date                        |
| `url`  | String | Photo URL, expire in a week              |

### 🛠️ Usage

1. **Input Username**: Provide a Telegram username.
2. **Run the Actor**: Execute the Actor to fetch user details and photos.
3. **View Results**: Check the dataset or the "Telegram User Details" table view in the Apify console.

### Example Result

```json
{
  "id": "123456789",
  "username": "crypto",
  "firstName": "Crypto",
  "lastName": "Enthusiast",
  "phone": "",
  "state": "online",
  "wasOnline": "2025-08-13T18:30:00Z",
  "langCode": "en",
  "premium": true,
  "blocked": false,
  "bot": false,
  "photos": [
    {
      "id": "photo_001",
      "dcId": "2",
      "date": "2025-01-15T12:00:00Z",
      "url": "https://t.me/i/userpic/123456789/photo_001.jpg"
    },
    {
      "id": "photo_002",
      "dcId": "2",
      "date": "2025-02-20T14:00:00Z",
      "url": "https://t.me/i/userpic/123456789/photo_002.jpg"
    }
  ],
  "status": "success",
  "error": null
}
```

### 🔌 Automate with Zapier & Make

No code needed — trigger this Actor from your existing tools.

- **Zapier**: search for the "Apify" app → action **Run Actor** → select `akula.marketing/telegram-get-username-photos` → map a trigger field (e.g. a username column in a spreadsheet) to `username` → send the output (photo URLs, metadata) back to Sheets or a Drive folder. [Docs](https://docs.apify.com/platform/integrations/zapier)
- **Make**: add the **Apify → Run an Actor** module, select this Actor, set "Run synchronously" to `Yes`, then chain a **Get Dataset Items** module to pull results into your scenario. [Docs](https://docs.apify.com/platform/integrations/make)

Example: new username added to a verification queue → scenario runs this Actor → profile photo history gets attached to the record for manual review.

#### Support

Support 24/7 - [@KoteamSupport](https://t.me/KoteamSupport).
We also offer specialized solutions for Telegram-related tasks — contact us to learn more

🏷️ Find This Tool When You Search For
"telegram profile photo scraper" - Download profile picture history from any username
"telegram profile picture downloader" - Get current and past avatar photos
"telegram user photo history" - Track when a profile photo was changed
"telegram avatar finder" - Fetch avatars for OSINT and identity checks
"telegram user metadata lookup" - Get name, status, and premium flags by username
"telegram reverse image research" - Source profile images for identity checks
"telegram osint photo tool" - Photo-based investigation from a username
"telegram bot detector" - Identify automated accounts and bots
"telegram premium finder" - Identify Premium accounts for outreach
"telegram profile lookup" - Find complete user profiles and contact info
🎯 Turn a username into a full photo and profile history
🛡️ Verify identities before you trust a Telegram account
💰 Spot high-value prospects from their profile data

# Actor input Schema

## `username` (type: `string`):

Username to get photos

## Actor input object example

```json
{
  "username": "AkulaMarketingBot"
}
```

# Actor output Schema

## `userPhotos` (type: `string`):

User profile fields plus an array of profile photos with URLs, dates, and Telegram file identifiers.

# 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 = {
    "username": "AkulaMarketingBot"
};

// Run the Actor and wait for it to finish
const run = await client.actor("akula.marketing/telegram-get-username-photos").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 = { "username": "AkulaMarketingBot" }

# Run the Actor and wait for it to finish
run = client.actor("akula.marketing/telegram-get-username-photos").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "username": "AkulaMarketingBot"
}' |
apify call akula.marketing/telegram-get-username-photos --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=akula.marketing/telegram-get-username-photos",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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