# Instagram Profile Scraper (Bio, Metrics & Recent Posts) (`hephaestus.dev/fast-ig-profile-api`) Actor

Scrape public Instagram profile data from a batch of usernames or profile URLs. Returns bio, metrics, 6 recent posts, and related profile suggestions — 1 profile = 1 dataset item.

- **URL**: https://apify.com/hephaestus.dev/fast-ig-profile-api.md
- **Developed by:** [hephaestus.dev](https://apify.com/hephaestus.dev) (community)
- **Categories:** Developer tools, Social media, Automation
- **Features:** Limited permissions
- **Stats:** 76 total users, 8 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Instagram Profile Scraper (Bio, Metrics & Recent Posts)

**Extract public Instagram profile data (bio + links + metrics) plus the 6 most recent posts — at batch scale.**\
**1 profile = 1 dataset item** (recent posts are embedded inside the profile result).

***

### ✅ What this actor does

Given a list of Instagram **usernames** or **profile URLs**, this actor fetches publicly available profile data and returns one clean JSON result per profile.

#### 📦 Data you get (per profile)

- 👤 **Profile basics**: username, full name, profile URL, pronouns
- 📝 **Bio text + bio links**
- 🔗 **Parsed outbound links**: website + common social platforms (when present)
- 🖼️ **Profile photo URLs**: default + HD (when available)
- ✅ **Account status**: verified / private / business / professional flags
- 📊 **Metrics**: followers, following, media count, highlight count
- 🧾 **Recent posts (6)**: engagement fields + media URLs (when available)
- 🧭 **Related accounts**: suggested profiles (when available)

***

### ⭐ Why this actor?

- **Predictable results:** exactly **one dataset item per profile** (no exploding outputs per post)
- **Batch-friendly:** paste hundreds/thousands of usernames or URLs
- **No Instagram login required:** public data only
- **No proxy setup required:** nothing to configure in input
- **Operational controls:** concurrency, retries, timeouts
- **Debuggable:** failures and optional diagnostics saved to Key‑Value Store

***

### 💡 Common use cases

- **Influencer research:** quickly pull follower counts, bios, and recent content
- **Brand monitoring:** track competitor profiles and posting activity
- **Link enrichment:** collect website / Link-in-bio destinations at scale
- **Content analysis:** review the latest posts for themes and engagement signals
- **Account validation:** confirm whether a profile is public/private/verified

***

### ⚙️ Input

#### Required

- `usernames` *(array of strings)*: Instagram usernames or profile URLs\
  Examples: `"nasa"`, `"@natgeo"`, `"https://www.instagram.com/nasa/"`

#### Advanced (optional)

- `maxConcurrency` *(1–10, default: 3)*: parallel profile requests
- `maxRetries` *(0–5, default: 2)*: retries for transient failures (e.g., timeouts, 429/5xx)
- `timeoutSeconds` *(10–120, default: 60)*: per-request timeout
- `debug` *(boolean, default: false)*: save per-handle diagnostics to Key‑Value Store (`DEBUG.json`)

> This actor also accepts legacy keys (hidden in the Store UI) such as `username`, `usernamesText`, `handles`.

#### Example input JSON

```json
{
  "usernames": ["nasa", "https://www.instagram.com/natgeo/"],
  "maxConcurrency": 3,
  "maxRetries": 2,
  "timeoutSeconds": 60,
  "debug": false
}
```

***

### 📤 Output

#### Dataset

- **One item per successfully fetched profile**
- Each item contains: `requested_at`, `handle`, `profile`, `metrics`, `recent_posts`, `related_accounts`

#### Key‑Value Store

- `FAILED.json`: failures (no dataset item is created for failed handles)
- `DEBUG.json`: optional per-handle diagnostics (only when `debug = true`)

#### Example output (single dataset item)

```json
{
  "requested_at": "2026-02-15T15:30:00.000000",
  "handle": "nasa",
  "profile": {
    "id": "528817151",
    "username": "nasa",
    "full_name": "NASA",
    "profile_url": "https://www.instagram.com/nasa/",
    "external_url": "https://www.nasa.gov",
    "pronouns": [],
    "profile_pic": {
      "default": "https://scontent.../default.jpg",
      "hd": "https://scontent.../hd.jpg"
    },
    "bio": {
      "text": "Explore the universe and discover our home planet with NASA",
      "links": [
        {
          "title": "NASA",
          "url": "https://www.nasa.gov",
          "lynx_url": "https://l.instagram.com/...",
          "link_type": ""
        }
      ]
    },
    "links": {
      "websiteUrl": "https://www.nasa.gov",
      "websiteUrls": ["https://www.nasa.gov"],
      "instagramUrl": "",
      "facebookUrl": "",
      "twitterUrl": "",
      "linkedinUrl": "",
      "youtubeUrl": "",
      "twitchUrl": "",
      "snapchatUrl": "",
      "discordUrl": "",
      "pinterestUrl": ""
    },
    "category": {
      "business_category_name": "Government Organization",
      "overall_category_name": "Government Organization",
      "category_enum": "GOVERNMENT_ORGANIZATION"
    },
    "status": {
      "is_private": false,
      "is_verified": true,
      "is_business_account": true,
      "is_professional_account": true,
      "hide_like_and_view_counts": false
    }
  },
  "metrics": {
    "followers": 98000000,
    "following": 85,
    "media_count": 4200,
    "highlight_reel_count": 45
  },
  "recent_posts": {
    "count": 6,
    "items": [
      {
        "id": "3512345678901234567",
        "shortcode": "C1AbCdEfGhI",
        "media_type": "GraphImage",
        "is_video": false,
        "caption": "A stunning view of Earth from the ISS...",
        "like_count": 2500000,
        "comment_count": 15000,
        "view_count": null,
        "taken_at": "2026-02-14T18:00:00Z",
        "permalink": "https://www.instagram.com/p/C1AbCdEfGhI/",
        "display_url": "https://scontent.../image.jpg",
        "thumbnail_src": "https://scontent.../thumb.jpg",
        "accessibility_caption": "Photo of Earth from space"
      }
    ],
    "page_info": {
      "has_next_page": true,
      "end_cursor": "QVFBbG9..."
    }
  },
  "related_accounts": [
    {
      "id": "123456789",
      "username": "nasahubble",
      "full_name": "Hubble Space Telescope",
      "profile_pic_url": "https://scontent.../pic.jpg",
      "is_verified": true,
      "is_private": false
    }
  ]
}
```

***

### ❓ FAQ

**Do I need proxies?**\
No proxy configuration is required in this actor’s input.

**Do I need an Instagram login?**\
No. This actor pulls **public** profile data only.

**Will it work for private accounts?**\
Private profiles may fail or return limited data, depending on what is publicly available.

**How many posts does it return?**\
Up to **6 recent posts** are included in `recent_posts.items` (when available).

**Where do failures go?**\
Failures are recorded in Key‑Value Store as `FAILED.json`. Successful profiles are written to the dataset.

***

### Limitations

- Instagram changes frequently; occasional upstream failures can happen even with retries.
- This actor only returns what is available publicly.

***

### Disclaimer

Unofficial. Not affiliated with, endorsed by, or sponsored by Instagram or Meta. You are responsible for ensuring your use complies with applicable laws and Instagram/Meta terms.

# Actor input Schema

## `usernames` (type: `array`):

Instagram usernames or profile URLs. One dataset item is produced per successfully fetched profile.

## `usernamesText` (type: `string`):

Paste usernames or profile URLs (one per line). Merged with `usernames`.

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

Single Instagram username or profile URL (convenience).

## `instagramUsernames` (type: `array`):

Deprecated alias for `usernames`.

## `instagramUsername` (type: `string`):

Deprecated alias for `username`.

## `handles` (type: `array`):

Deprecated alias for `usernames`.

## `handle` (type: `string`):

Deprecated alias for `username`.

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

Maximum number of parallel profile requests.

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

Maximum retry attempts for transient errors (timeouts, 429, 502, 503, 504).

## `timeoutSeconds` (type: `integer`):

Per-request timeout in seconds.

## `debug` (type: `boolean`):

If true, stores per-handle diagnostics in the Key-Value Store (never in the dataset).

## Actor input object example

```json
{
  "usernames": [
    "nasa",
    "https://www.instagram.com/natgeo/"
  ],
  "maxConcurrency": 3,
  "maxRetries": 2,
  "timeoutSeconds": 60,
  "debug": false
}
```

# Actor output Schema

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

No description

## `failures` (type: `string`):

No description

## `debug` (type: `string`):

No description

# 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 = {
    "usernames": [
        "nasa",
        "https://www.instagram.com/natgeo/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hephaestus.dev/fast-ig-profile-api").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 = { "usernames": [
        "nasa",
        "https://www.instagram.com/natgeo/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hephaestus.dev/fast-ig-profile-api").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 '{
  "usernames": [
    "nasa",
    "https://www.instagram.com/natgeo/"
  ]
}' |
apify call hephaestus.dev/fast-ig-profile-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hephaestus.dev/fast-ig-profile-api"
        }
    }
}
```

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/9bvvUUecEDzLyZepx/builds/1bkMfGoeg5aELzy8L/openapi.json
