# Instagram Profile Scraper (`miccho27/instagram-profile-scraper`) Actor

Scrape public Instagram profile data: bio, followers count, following count, post count, profile picture, verification status, and recent post URLs. No login required for public profiles.

- **URL**: https://apify.com/miccho27/instagram-profile-scraper.md
- **Developed by:** [Tatsuya Mizuno](https://apify.com/miccho27) (community)
- **Categories:** Social media
- **Stats:** 1 total users, 0 monthly users, 45.5% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Instagram Profile Scraper - Free No-Code Instagram Data Extractor (Alternative to PhantomBuster, Instaloader, Gramhir)

Scrape **public** Instagram profile data without a login or API key. Extract follower counts, bio, post counts, profile pictures, and recent post URLs for any public Instagram account. The best free alternative to PhantomBuster ($56/mo), Instaloader (CLI only), Gramhir, and Instagram Graph API (requires app review).

### Who Is This For?

- **Social media marketers** -- Analyze competitor follower growth, posting frequency, and engagement rates
- **Influencer agencies** -- Vet potential influencer partnerships by checking follower counts, verification, and engagement
- **Brand managers** -- Monitor brand mentions and track competitor social profiles at scale
- **Market researchers** -- Build datasets of influencer profiles by niche, location, or follower range
- **PR agencies** -- Find journalists, bloggers, and influencers with verified accounts and high engagement
- **Academic researchers** -- Study social media trends and public profile demographics

### Pricing -- Free to Start

| Tier | Cost | What You Get |
|------|------|-------------|
| **Free trial** | $0 | Apify free tier includes monthly compute credits |
| **Pay per result** | ~$3.00 / 1,000 profiles | Batch profile scraping |
| **vs. PhantomBuster** | Saves $56/mo | No subscription, pay only for what you use |
| **vs. Instagram API** | No app review | No Facebook Developer account needed |

### Quick Start (3 Steps)

1. **Click "Try for free"** on this Actor's page in Apify Store
2. **Enter usernames** (e.g., `["natgeo", "nasa"]`) or paste profile URLs
3. **Click "Start"** and get profile data as JSON, CSV, or Excel

### Features

- **No login required** for public profiles
- **Batch scraping**: process multiple usernames or profile URLs in one run
- **Rich profile data**: bio, followers, following, post count, verification status, external URL, category
- **Recent posts**: extracts up to 50 recent post URLs with like/comment counts (when available)
- **Dual input modes**: usernames array OR direct profile URLs
- **Retry & rate limiting**: exponential backoff + configurable delay between requests
- **Login wall detection**: alerts you when Instagram shows a login gate

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `usernames` | array | Instagram usernames without `@` (e.g. `["natgeo", "nasa"]`) | -- |
| `profileUrls` | array | Direct profile URLs (e.g. `["https://www.instagram.com/natgeo/"]`) | -- |
| `includeRecentPosts` | boolean | Extract recent post URLs and metadata | `true` |
| `maxPostsPerProfile` | integer | Max recent posts per profile (1-50) | `12` |
| `delayBetweenRequestsMs` | integer | Delay between requests in ms (min 1000) | `3000` |

#### Example Input -- Usernames

```json
{
  "usernames": ["natgeo", "nasa", "nike"],
  "includeRecentPosts": true,
  "maxPostsPerProfile": 12
}
````

#### Example Input -- Profile URLs

```json
{
  "profileUrls": [
    "https://www.instagram.com/natgeo/",
    "https://www.instagram.com/nasa/"
  ],
  "includeRecentPosts": false
}
```

### Output

Each record in the dataset:

```json
{
  "success": true,
  "username": "natgeo",
  "fullName": "National Geographic",
  "bio": "Experience the world through the eyes of National Geographic photographers.",
  "followers": 283000000,
  "following": 150,
  "postsCount": 29800,
  "profilePicUrl": "https://instagram.fxxx.cdninstagram.com/...",
  "isVerified": true,
  "isPrivate": false,
  "externalUrl": "https://www.nationalgeographic.com",
  "category": "Publisher",
  "profileUrl": "https://www.instagram.com/natgeo/",
  "recentPosts": [
    {
      "url": "https://www.instagram.com/p/ABC123/",
      "type": "GraphImage",
      "likeCount": 45000,
      "commentCount": 312,
      "imageUrl": "https://...",
      "caption": "Captured in the heart of the Serengeti...",
      "takenAt": "2024-01-15T08:30:00.000Z"
    }
  ],
  "source": "shared_data",
  "scrapedAt": "2024-01-15T10:30:00.000Z"
}
```

### Real-World Use Cases

#### 1. Influencer Vetting for Brand Partnerships

Batch scrape 500+ influencer profiles. Filter by follower count, verification status, and engagement rate to find the best fit for your campaign.

#### 2. Competitive Social Media Analysis

Track competitor profiles weekly. Export follower growth and posting frequency to Google Sheets via Apify integrations.

#### 3. PR Media List Building

Search for journalists and industry experts on Instagram. Extract bios containing "journalist", "editor", or "reporter" and build targeted outreach lists.

#### 4. Academic Research Dataset

Build datasets of public profiles for social media research: posting patterns, follower distributions, and content categories.

#### 5. Brand Monitoring

Schedule daily runs on profiles that mention your brand. Track follower changes and new posts to detect viral moments early.

### FAQ

**Q: Can I scrape private accounts?**
A: No. This Actor only accesses publicly visible data. Private accounts return minimal info with a warning.

**Q: What about Instagram rate limiting?**
A: The Actor includes built-in rate limiting (3s+ delay). Use Apify's proxy pool for best results with large batches.

**Q: How many profiles can I scrape per run?**
A: Hundreds per run. For very large batches (1000+), split into multiple runs to avoid timeouts.

**Q: Is login required?**
A: No. The Actor scrapes public data without authentication.

### Notes & Limitations

- **Public profiles only**: Private accounts return minimal data (the Actor will warn you).
- **Login walls**: Instagram sometimes requires login even for public profiles, especially without a proxy. Use Apify's proxy pool for reliable results.
- **Rate limiting**: Instagram aggressively rate-limits unauthenticated requests. Keep `delayBetweenRequestsMs` at 3000+ and avoid running large batches quickly.
- **Data extraction method**: The Actor tries structured JSON data embedded in page HTML (`window._sharedData`). If unavailable, it falls back to `<meta>` tags (less precise).
- **No private data**: This Actor only scrapes publicly visible information.

# Actor input Schema

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

Array of Instagram usernames to scrape (e.g., \["natgeo", "instagram"]). Can include @ prefix.

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

Array of full Instagram profile URLs (e.g., \["https://www.instagram.com/natgeo/"]). Alternative to usernames.

## `includeRecentPosts` (type: `boolean`):

Whether to extract recent posts from profiles. Default: true

## `maxPostsPerProfile` (type: `integer`):

Maximum number of recent posts to extract per profile (1-50). Default: 12

## `delayBetweenRequestsMs` (type: `integer`):

Milliseconds to delay between requests. Helps avoid rate limiting. Default: 3000

## Actor input object example

```json
{
  "usernames": [
    "instagram"
  ],
  "profileUrls": [],
  "includeRecentPosts": true,
  "maxPostsPerProfile": 12,
  "delayBetweenRequestsMs": 3000
}
```

# 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": [
        "instagram"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("miccho27/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": ["instagram"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=miccho27/instagram-profile-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Profile Scraper",
        "description": "Scrape public Instagram profile data: bio, followers count, following count, post count, profile picture, verification status, and recent post URLs. No login required for public profiles.",
        "version": "1.0",
        "x-build-id": "0yNDdP6gyiwAM9fk3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/miccho27~instagram-profile-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-miccho27-instagram-profile-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/miccho27~instagram-profile-scraper/runs": {
            "post": {
                "operationId": "runs-sync-miccho27-instagram-profile-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/miccho27~instagram-profile-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-miccho27-instagram-profile-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "usernames": {
                        "title": "Instagram Usernames",
                        "type": "array",
                        "description": "Array of Instagram usernames to scrape (e.g., [\"natgeo\", \"instagram\"]). Can include @ prefix.",
                        "default": []
                    },
                    "profileUrls": {
                        "title": "Profile URLs",
                        "type": "array",
                        "description": "Array of full Instagram profile URLs (e.g., [\"https://www.instagram.com/natgeo/\"]). Alternative to usernames.",
                        "default": []
                    },
                    "includeRecentPosts": {
                        "title": "Include Recent Posts",
                        "type": "boolean",
                        "description": "Whether to extract recent posts from profiles. Default: true",
                        "default": true
                    },
                    "maxPostsPerProfile": {
                        "title": "Max Posts Per Profile",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of recent posts to extract per profile (1-50). Default: 12",
                        "default": 12
                    },
                    "delayBetweenRequestsMs": {
                        "title": "Delay Between Requests (ms)",
                        "minimum": 1000,
                        "type": "integer",
                        "description": "Milliseconds to delay between requests. Helps avoid rate limiting. Default: 3000",
                        "default": 3000
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
