# Instagram Profile Scraper – Followers, Bio, Links & Posts (`badr_xba/instagram-profile-scraper`) Actor

Scrape public Instagram profiles from usernames, profile URLs or IDs: followers, following, posts count, bio, website links, verified and business status, profile picture, highlights and the latest posts. No login. Pay per profile.

- **URL**: https://apify.com/badr_xba/instagram-profile-scraper.md
- **Developed by:** [Badr Bouargan](https://apify.com/badr_xba) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 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.
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

## Instagram Profile Scraper – Followers, Bio, Links & Posts

Scrape **public Instagram profiles** from a list of usernames or profile URLs: followers, following, posts count, bio, website links, verified and private status, live story, highlights, linked Threads account, profile picture and the **12 latest posts**. No Instagram account, no login, no API key. **You pay per profile, only for profiles found.**

### What can it do?

- 👤 Profile identity: ID, username, display name, URL, profile picture
- 📝 Bio and **all bio links** (title and URL), plus the first link on its own
- 👥 Followers, following and posts counts
- ✅ Verified badge, private account, memorialized account, pronouns
- 🎞️ Has reels, **story live right now** (and when it was posted), **highlights** with title and cover
- 🧵 Linked **Threads** username and URL
- 📮 The **12 latest posts**: type, shortcode, URL, caption, hashtags, mentions, image, alt text
- ⬇️ Export to JSON, CSV, Excel, XML or HTML, or read through the API

Use it to vet influencers, qualify leads from their bio links, track competitors' audience over time (schedule it daily), or enrich a CRM with Instagram data.

### How to use it in 3 steps

1. **Add** usernames or profile URLs in **Instagram usernames** (Bulk edit accepts a pasted list).
2. **Click Start**.
3. **Download** the dataset (JSON, CSV, Excel) or read it through the API.

The prefilled run (humansofny) returns one profile in about 20 seconds, for less than a cent.

Paste names the way you have them: `nasa`, `@NASA`, `https://www.instagram.com/nasa/?igsh=…`, mobile or `instagr.am` links, or a comma-separated list on one line. Duplicates are read (and billed) once. A post URL, a numeric ID or a typo is listed in **FAILED_INPUTS** with the reason, never billed, and the run carries on.

### Input

```json
{
  "usernames": ["humansofny", "nasa", "https://www.instagram.com/nike/"]
}
```

### Output example

```json
{
  "inputUrl": "nasa",
  "id": "528817151",
  "username": "nasa",
  "url": "https://www.instagram.com/nasa",
  "fullName": "NASA",
  "biography": "🚀 🌎 Exploring the universe and our home planet.",
  "externalUrl": "https://www.nasa.gov/",
  "externalUrls": [{ "title": "NASA+", "url": "https://plus.nasa.gov", "link_type": "external" }],
  "followersCount": 104267078,
  "followsCount": 90,
  "postsCount": 4954,
  "highlightReelCount": 12,
  "highlights": [{ "id": "18195781759377100", "title": "Roman", "coverUrl": "https://…" }],
  "hasReels": true,
  "hasPublicStory": true,
  "verified": true,
  "private": false,
  "threadsUsername": "nasa",
  "threadsUrl": "https://www.threads.net/@nasa",
  "profilePicUrl": "https://…",
  "latestPosts": [
    { "id": "3983118388705688735", "type": "Video", "productType": "clips", "shortCode": "DdG4RIxIPyf",
      "url": "https://www.instagram.com/reel/DdG4RIxIPyf/", "caption": "…", "hashtags": ["nasa"] }
  ]
}
```

Each run also writes **RUN_SUMMARY** (profiles saved, failures, amount charged) and **FAILED_INPUTS** (each username that gave nothing, with a code: `not_found`, `invalid_input`, `blocked`). Failed inputs are **never billed**.

### How much does it cost?

Pay per profile. Platform usage is included.

| Apify plan | Price per 1,000 profiles |
|---|---|
| Free | $2.60 |
| Starter | $2.30 |
| Scale | $1.90 |
| Business and above | $1.60 |

With the free $5 monthly credit you can read about 1,900 profiles. Set **Maximum profiles** or a maximum cost per run and the run stops cleanly there.

### What it cannot do

This Actor reads profiles as a logged-out visitor sees them. Instagram keeps some details for signed-in users only, so they are **not** included:

- the "About this account" panel (join date, country, former usernames) — the `includeAboutSection` option is accepted for compatibility but adds nothing and costs nothing;
- business category and contact buttons, related ("suggested") profiles, IGTV counts;
- likes and comments counts of the latest posts (use the Instagram Scraper with post URLs for those);
- numeric profile IDs as input — use the username.

Private profiles return their public details (name, bio, counts) but no posts.

### Use it via API

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("badr_xba/instagram-profile-scraper").call(run_input={
    "usernames": ["humansofny", "nasa", "https://www.instagram.com/nike/"],
})
for profile in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(profile["username"], profile["followersCount"], profile["externalUrl"])
```

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('badr_xba/instagram-profile-scraper').call({
    usernames: ['humansofny', 'nasa'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**cURL** (runs the Actor and returns the rows in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/badr_xba~instagram-profile-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["humansofny", "nasa"]}'
```

### Integrations

- **Make**, **Zapier** and **n8n**: use the Apify app or node with `badr_xba/instagram-profile-scraper` and push each profile to Google Sheets, Airtable, HubSpot or any CRM.
- **AI agents (MCP)**: add `https://mcp.apify.com/?actors=badr_xba/instagram-profile-scraper` to Claude, Cursor or any MCP client.
- **Schedules and webhooks**: run it daily on the same accounts to chart follower growth, and get notified when a run ends.

### Troubleshooting

| What you see | What to do |
|---|---|
| `invalid_input` in FAILED_INPUTS | The line is not a username or profile URL (often a post URL or a typo). The reason tells you which. |
| `id_not_supported` | Numeric IDs need a signed-in session: use the username. |
| `not_found` | The account does not exist, was renamed, or is not shown to visitors. Check it in a private browser window. |
| `blocked` | Instagram refused every address tried. Keep the **RESIDENTIAL** proxy group and run again; never billed. |
| `latestPosts` is empty | The profile is private or has no posts. |

### FAQ

**Do I need an Instagram account?** No. Nothing is asked from you but usernames.

**Why is postsCount rounded for big accounts?** For logged-out visitors Instagram shows "32K posts" rather than the exact number.

**Is it legal?** The Actor only reads what profiles show publicly. That can include personal data protected by laws like the GDPR: collect it only for a legitimate purpose.

**Something does not work?** Open an issue on the **Issues** tab with the run ID and the username.

# Actor input Schema

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

One per line: a username (humansofny or @humansofny) or a profile URL (https://www.instagram.com/humansofny/, mobile and ?igsh=… links work too). Use Bulk edit to paste a whole list — a comma-separated list on one line is split for you, and the same profile given twice is read (and billed) once.

## `includeAboutSection` (type: `boolean`):

Instagram shows the join date, country and former usernames only to signed-in users, so this Actor cannot read them. The option is accepted for compatibility and nothing extra is billed.

## `maxItems` (type: `integer`):

Stop after this many profiles (and bill no more). 0 = no limit. The run also stops cleanly at your maximum cost per run.

## `proxyConfiguration` (type: `object`):

Instagram blocks datacenter addresses: keep the residential group.

## Actor input object example

```json
{
  "usernames": [
    "humansofny"
  ],
  "includeAboutSection": false,
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Table: picture, username, name, followers, following, posts, verified, private, website.

## `allFields` (type: `string`):

Every field, latest posts and highlights included, as JSON, CSV or Excel.

## `runSummary` (type: `string`):

Profiles saved, failures, pages loaded and amount charged.

## `failedInputs` (type: `string`):

Usernames that gave nothing, with an error code (not_found, invalid_input, blocked…).

# 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": [
        "humansofny"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("badr_xba/instagram-profile-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 = {
    "usernames": ["humansofny"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("badr_xba/instagram-profile-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 '{
  "usernames": [
    "humansofny"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call badr_xba/instagram-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,badr_xba/instagram-profile-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/5QKSK3ISyqLLmDDnE/builds/RP9EYk0jUNJwGbzHS/openapi.json
