# Instagram Profile – User Profile & Metadata Scraper (`transcriptdl/instagram-profile---user-profile-metadata-scraper`) Actor

Verified 99.4% Success. BULK extract complete Instagram profiles and posts with follower stats, engagement metrics, captions, hashtags, media URLs, and related accounts.

- **URL**: https://apify.com/transcriptdl/instagram-profile---user-profile-metadata-scraper.md
- **Developed by:** [Transcript Downloader](https://apify.com/transcriptdl) (community)
- **Categories:** Automation, Social media, AI
- **Features:** Full permissions
- **Stats:** 131 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Instagram Profile & Posts Scraper

Extract complete Instagram profiles and posts with follower stats, engagement metrics, captions, hashtags, media URLs, and related accounts. Supports instant fetch (recent posts) or full scraping, batch processing, concurrency control, polling, and detailed error tracking.

***

### ✨ Features

- 👤 **Profile extraction**: Get follower count, following, bio, verified status, and more
- 📸 **Posts scraping**: Extract recent posts with likes, comments, captions, and media URLs
- 🎯 **Two modes**: Instant fetch (recent posts) or full scraping (all posts)
- 🔁 **Batch processing**: Handle multiple profiles simultaneously
- ⚙️ **Concurrency control**: Adjust processing speed with configurable limits
- 🔄 **Automatic polling**: Waits for full profile scraping when enabled
- 🔔 **Webhook support**: Receive results via webhook instead of polling
- 🚦 **Rate limiting**: Built-in delays to respect API limits
- 💰 **Cost tracking**: Monitor API usage per profile
- 🧠 **Error tracking**: All failures logged with detailed error information
- 📊 **Rich metadata**: Hashtags, related accounts, highlights, engagement scores

***

### 📚 API Documentation

For complete API reference, endpoint details, and advanced usage examples, visit our official documentation:

**[Transcript Downloader API Documentation](https://documentation.transcriptdownloader.com)**

**[Get Your API Key](https://dashboard.transcriptdownloader.com/settings)** • **[API Pricing](https://transcriptdownloader.com/#pricing)**

***

### 🔧 Input Parameters

The actor accepts the following input:

| Parameter          | Type    | Required | Default | Description                                                    |
| ------------------ | ------- | -------- | ------- | -------------------------------------------------------------- |
| `profileUrls`      | array   | ✅ Yes    | -       | List of Instagram profile URLs                                 |
| `apiToken`         | string  | ✅ Yes    | -       | Your Transcript Downloader API bearer token                    |
| `waitForCompletion`| boolean | No       | `true`  | Whether to wait for full profile scraping (all posts)          |
| `maxWaitTime`      | number  | No       | `10`    | Max time to wait for scraping completion (1-30 minutes)        |
| `pollingInterval`  | number  | No       | `30`    | How often to check status when waiting. API recommends 30s for profile operations (10-120 seconds) |
| `maxConcurrency`   | number  | No       | `2`     | Max concurrent profile requests (range: 1-5)                   |
| `includeWebhook`   | string  | No       | -       | Webhook URL to receive results when profile processing completes. Must be publicly reachable and accept POST requests |

#### 📥 Sample Input

##### Instant Mode (Recent posts)

```json
{
  "profileUrls": [
    "https://www.instagram.com/mrbeast",
    "https://www.instagram.com/cristiano"
  ],
  "apiToken": "your-api-token",
  "waitForCompletion": false,
  "maxConcurrency": 2
}
```

##### Full Mode (All posts, waits for completion)

```json
{
  "profileUrls": [
    "https://www.instagram.com/mrbeast"
  ],
  "apiToken": "your-api-token",
  "waitForCompletion": true,
  "maxWaitTime": 10,
  "pollingInterval": 30,
  "maxConcurrency": 1
}
```

***

### 📤 Output Format

Each profile will produce a dataset item with the following structure:

#### Successful Response

```json
{
  "profileUrl": "https://www.instagram.com/mrbeast",
  "status": "success",
  "profile": {
    "account": "mrbeast",
    "instagram_id": "12345678",
    "fbid": "17841400455970028",
    "profile_name": "MrBeast",
    "full_name": "Jimmy Donaldson",
    "biography": "Doing things that no one has done before...",
    "profile_image_link": "https://scontent.cdninstagram.com/...",
    "followers": 150000000,
    "following": 500,
    "posts_count": 1250,
    "is_verified": true,
    "is_private": false,
    "is_business_account": true,
    "is_professional_account": true,
    "avg_engagement": 5.2,
    "category_name": "Entrepreneur",
    "highlights_count": 8,
    "is_joined_recently": false,
    "has_channel": true,
    "business_address": "Los Angeles, CA",
    "email": "contact@example.com",
    "external_url": ["https://website.com"],
    "profile_url": "https://www.instagram.com/mrbeast/"
  },
  "posts": [
    {
      "id": 123,
      "instagram_id": "post_12345",
      "url": "https://www.instagram.com/p/ABC123/",
      "caption": "Post caption text with #hashtags",
      "likes": 5000000,
      "comments": 25000,
      "date_posted": "2025-09-10T15:30:00Z",
      "content_type": "image",
      "image_url": "https://...",
      "video_url": null,
      "thumbnail": "https://...",
      "hashtags": ["#challenge", "#giveaway"],
      "location": {"name": "Los Angeles"},
      "shortcode": "ABC123",
      "is_paid_partnership": false,
      "post_content": [
        {
          "index": 0,
          "type": "image",
          "url": "https://image.jpg",
          "instagram_id": "content_id_123"
        }
      ]
    }
  ],
  "related_accounts": [
    {
      "instagram_id": "87654321",
      "user_name": "related_user",
      "profile_name": "Related User",
      "is_private": false,
      "is_verified": true,
      "profile_pic_url": "https://..."
    }
  ],
  "highlights": ["highlight1", "highlight2"],
  "bio_hashtags": ["#entrepreneur", "#creator"],
  "post_hashtags": ["#challenge", "#giveaway"],
  "summary": {
    "totalPosts": 1250,
    "totalCost": "0.050",
    "listCost": "12.500",
    "processingTime": "15.2s"
  },
  "downloadInfo": {
    "id": "01K575ZB8HT9BY4QATJ7848BVK",
    "type": "instagram_profile",
    "status": "success"
  },
  "listInfo": {
    "list_id": "01K575ZB8HT9BY4QATJ784DJN",
    "list_cost": "12.500"
  }
}
```

#### Pending Response (when waitForCompletion is false)

```json
{
  "profileUrl": "https://www.instagram.com/mrbeast",
  "status": "pending",
  "download_id": "01HXYZ123456789",
  "message": "Profile scraping initiated. All posts will be processed. Please be patient as it may take a few minutes.",
  "summary": {
    "processingTime": "2.1s"
  }
}
```

#### Failed Response

```json
{
  "profileUrl": "https://www.instagram.com/invalid",
  "error": "Profile does not exist or has been deleted",
  "status": "failed"
}
```

***

### 🚀 How to Use

1. **Get your API token** from [Transcript Downloader](https://dashboard.transcriptdownloader.com/settings)
2. **Add Instagram profile URLs** in the format:
   - `https://www.instagram.com/username`
   - `https://instagram.com/username` (also supported)
3. **Choose your mode**:
   - **Instant mode**: Set `waitForCompletion: false` for instant results with recent posts
   - **Full mode**: Set `waitForCompletion: true` to get all posts (takes longer)
4. **Run the actor** and access results in the dataset

***

### ❌ Error Handling

The actor gracefully handles common API errors:

| Status Code | Meaning                                      | Action                           |
| ----------- | -------------------------------------------- | -------------------------------- |
| 400         | Invalid Instagram URL                        | Check URL format                  |
| 401         | Insufficient credits or invalid token        | Check credits and API token       |
| 403         | Invalid API token                            | Regenerate API token              |
| 404         | Profile does not exist or has been deleted   | Verify profile exists             |
| 429         | Rate limit exceeded                          | Actor handles with delays         |
| 500         | Third party service error or processing error| Retry automatically               |
| 503         | Service temporarily unavailable              | Retry later                       |

Failed profiles are captured in the dataset with error information.

***

### ⚠️ Rate Limiting & Performance

#### API Rate Limits

| Scope | Limit | Window |
| ----- | ----- | ------ |
| Per User (API Token) | 90 requests | 1 minute |
| Per IP (unauthenticated) | 90 requests | 1 minute |

When rate limits are exceeded, the API returns `429 Too Many Requests`. The actor handles this automatically with built-in retry logic.

#### Processing Times

| Operation | Typical Duration | Maximum Wait | Recommended Poll Interval |
| --------- | ---------------- | ------------ | ------------------------- |
| Profile Fetch | 5-30 seconds | 60 minutes | 30 seconds |
| Content Metadata | 5-60 seconds | 60 minutes | 30 seconds |

- **Instant mode** (recent posts): ~5-15 seconds per profile
- **Full mode** (all posts): ~2-10 minutes per profile depending on post count

#### Retry Behavior

The actor automatically retries on transient errors (429, 500, 503) with exponential backoff (base delay 1s, max delay 60s, up to 5 attempts). It does **not** retry on client errors (401, 403, 404) since those require user action.

#### Response Headers

The API returns rate limit headers you can monitor in logs:

| Header | Description |
| ------ | ----------- |
| `X-RateLimit-Limit` | Max requests allowed in window |
| `X-RateLimit-Remaining` | Requests remaining in current window |
| `Retry-After` | Seconds to wait before retrying (on 429) |

***

### 🔔 Webhook Support

Instead of polling, you can receive results automatically via webhook. Pass a publicly reachable URL in the `includeWebhook` field, and the API will POST the results directly to your server when profile processing completes.

#### How It Works

1. The webhook URL is sent with the **initial API request only** (not during polling)
2. One webhook is fired per profile when processing completes or fails
3. The webhook payload is the exact same JSON the API endpoint would return
4. Failed deliveries are retried up to 3 times (at 10s, 30s, and 60s intervals)

#### Webhook Headers

Each delivery includes these custom headers to identify the event:

| Header | Description |
| ------ | ----------- |
| `X-Webhook-Endpoint` | `instagram/profile` |
| `X-Webhook-Original-Status` | HTTP status code of the result (e.g. `200`) |
| `X-Webhook-Download-Id` | The download record ID |

#### Example with Webhook

```json
{
  "profileUrls": ["https://www.instagram.com/mrbeast"],
  "apiToken": "your-token",
  "waitForCompletion": false,
  "includeWebhook": "https://your-domain.com/webhook"
}
```

> **Tip**: When using webhooks, you can set `waitForCompletion: false` so the actor returns immediately after initiating the request. Your webhook URL will receive the full results when ready.

#### Important Notes

- The URL must be publicly reachable (no localhost or private IPs)
- Your endpoint must accept **POST** requests and return a `2xx` status
- Test your webhook URL first using the [API test endpoint](https://documentation.transcriptdownloader.com)
- The webhook is registered once at request time — it cannot be added after a job has started

***

### 💡 Best Practices

#### For Quick Analysis (Instant Results)

```json
{
  "profileUrls": ["https://www.instagram.com/profile1", "https://www.instagram.com/profile2"],
  "apiToken": "your-token",
  "waitForCompletion": false,
  "maxConcurrency": 2
}
```

**Use case**: Quick profile checks, follower counts, recent engagement

#### For Deep Analysis (All Posts)

```json
{
  "profileUrls": ["https://www.instagram.com/profile"],
  "apiToken": "your-token", 
  "waitForCompletion": true,
  "maxWaitTime": 15,
  "pollingInterval": 30,
  "maxConcurrency": 1
}
```

**Use case**: Complete content analysis, historical data, all posts metadata

#### With Webhook (No Polling)

```json
{
  "profileUrls": ["https://www.instagram.com/profile"],
  "apiToken": "your-token",
  "waitForCompletion": false,
  "includeWebhook": "https://your-domain.com/webhook"
}
```

**Use case**: Fire-and-forget — results delivered to your server automatically

#### General Tips

- ✅ Use `waitForCompletion: false` for quick checks
- ✅ Use `waitForCompletion: true` for comprehensive analysis
- ✅ Use `includeWebhook` with `waitForCompletion: false` to avoid long actor runtimes
- ✅ Keep `maxConcurrency` low (1-2) to avoid rate limits
- ✅ Keep `pollingInterval` at 30 seconds as recommended by the API
- ✅ Monitor costs using the `summary.totalCost` field
- ✅ Validate profile URLs before running large batches
- ✅ Private accounts may return limited data or errors
- ✅ Business accounts typically provide richer metadata

#### 🆕 New Profile Fields Available

The API now returns additional profile information:

- **`fbid`**: Facebook ID associated with the Instagram account
- **`is_professional_account`**: Whether the account is a professional account
- **`highlights_count`**: Number of story highlights on the profile
- **`is_joined_recently`**: Indicates if the user joined Instagram recently
- **`has_channel`**: Whether the account has a broadcast channel
- **`business_address`**: Physical address for business accounts
- **`list_cost`**: Cost for fetching the complete posts list (returned upfront)

These fields are available in the `profile` object of the response.

***

### 🔗 Supported URL Formats

The actor supports Instagram profile URLs in the following formats:

```
✅ https://www.instagram.com/username
✅ https://instagram.com/username
✅ http://www.instagram.com/username
✅ http://instagram.com/username
```

❌ Not supported:

```
❌ https://www.instagram.com/p/POST_ID/ (individual posts)
❌ https://www.instagram.com/username/reels/
❌ https://www.instagram.com/username/tagged/
```

***

### 📈 Monitoring & Analytics

Track your usage with the built-in summary data:

```json
{
  "summary": {
    "totalPosts": 1250,
    "totalCost": "0.050",
    "listCost": "12.500",
    "processingTime": "45.2s"
  }
}
```

Use this data to:

- Monitor API costs per profile
- Track processing performance
- Plan batch processing strategies
- Optimize concurrency settings

***

### 💳 Pricing & Billing

The Transcript Downloader API used by this actor requires a valid API token. API usage is billed separately:

- **Instant fetch** (recent posts): Lower cost per profile
- **Full scraping** (all posts): Higher cost based on post count
- **List processing**: Additional cost shown in `listCost` field

📊 Pricing varies by profile size and data volume. Visit our site to checkout pricing.\
View full details and subscription plans on our [pricing page](https://transcriptdownloader.com/#pricing)

***

### 🎯 Use Cases

- **Influencer Marketing**: Analyze engagement rates, follower counts, content strategy
- **Competitor Research**: Track competitors' posting frequency, hashtags, content types
- **Brand Monitoring**: Monitor brand mentions, user-generated content, partnerships
- **Content Analysis**: Analyze successful post patterns, optimal posting times
- **Market Research**: Identify trends, popular hashtags, related accounts
- **Social Listening**: Track conversations, comments, engagement metrics

***

### 🙋 Support

Need help? Visit [Transcript Downloader Support](https://www.transcriptdownloader.com/#contact).
We respond within 24 business hours.

For technical issues with this actor, check the run logs for detailed error messages.

***

### 📄 License

This actor is provided under the [ISC License](https://opensource.org/licenses/ISC).

# Actor input Schema

## `profileUrls` (type: `array`):

List of Instagram profile URLs to process. Example: https://www.instagram.com/mrbeast

## `apiToken` (type: `string`):

Your Transcript Downloader API bearer token. Get it from your dashboard at https://dashboard.transcriptdownloader.com

## `waitForCompletion` (type: `boolean`):

If true, waits for complete profile data processing (~1 minute) including followers, bio, engagement, and related accounts. If false, returns immediately with list_id and pending status (useful if you only need the list_id to scrape posts/reels).

## `maxWaitTime` (type: `integer`):

Maximum time to wait for profile data processing when waitForCompletion is enabled. Profile data typically takes ~1 minute to process. (1-30 minutes)

## `pollingInterval` (type: `integer`):

How often to check processing status when waiting for completion. API recommends 30 seconds for profile operations. (10-120 seconds)

## `maxConcurrency` (type: `integer`):

Maximum number of concurrent profile requests. Higher values process faster but may hit rate limits. Recommended: 1-3.

## `includeWebhook` (type: `string`):

Optional webhook URL to receive results when profile processing completes. Must be a publicly reachable URL that accepts POST requests.

## Actor input object example

```json
{
  "profileUrls": [
    "https://www.instagram.com/mrbeast",
    "https://www.instagram.com/cristiano"
  ],
  "waitForCompletion": true,
  "maxWaitTime": 15,
  "pollingInterval": 45,
  "maxConcurrency": 2
}
```

# 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 = {
    "profileUrls": [
        "https://www.instagram.com/mrbeast"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("transcriptdl/instagram-profile---user-profile-metadata-scraper").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 = { "profileUrls": ["https://www.instagram.com/mrbeast"] }

# Run the Actor and wait for it to finish
run = client.actor("transcriptdl/instagram-profile---user-profile-metadata-scraper").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 '{
  "profileUrls": [
    "https://www.instagram.com/mrbeast"
  ]
}' |
apify call transcriptdl/instagram-profile---user-profile-metadata-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,transcriptdl/instagram-profile---user-profile-metadata-scraper"
        }
    }
}
```

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/HCYypZ054ZJ9dixt8/builds/xCekc8rvc8RsoVCH0/openapi.json
