# Instagram Profile Extractor 📸⚡ : Data, Details & Analytics (`thedoor/instagram-profile-scraper`) Actor

Extract public Instagram profile data in seconds — names, bios, followers, following counts, and post stats. No login or cookies required!
Outputs to JSON/CSV/Excel for instant research, marketing, or automation workflows. Fast, reliable, and data-driven.

- **URL**: https://apify.com/thedoor/instagram-profile-scraper.md
- **Developed by:** [TheDoor](https://apify.com/thedoor) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 20 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

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

#### Overview

This actor scrapes public Instagram profiles and collects post data such as post URLs, like counts, comment counts, captions, timestamps, media info, and more for each post. It streams up to 30 posts per profile.

#### How to Input

Provide an input JSON with the following format:

```json
{
	"url": [
		"https://www.instagram.com/profile1/",
		"https://www.instagram.com/profile2/"
	],
	"maxPosts": 30
}
```

- `url`: Array of Instagram profile URLs to scrape.
- `maxPosts`: Maximum number of posts to fetch per profile (default: 30).

#### Output Format

Each post is streamed as a JSON object with the following structure:

```json
{
	"post_url": "https://www.instagram.com/p/SHORTCODE/",
	"like_count": 1234,
	"comment_count": 56,
	"caption": "Post caption text...",
	"human_timestamp": "MM/DD/YYYY, HH:MM:SS AM/PM",
	"id": "POST_ID",
	"shortcode": "SHORTCODE",
	"is_video": false,
	"taken_at_timestamp": 1234567890,
	"dimensions": { "height": 1080, "width": 1080 },
	"display_url": "https://...jpg",
	"hashtags": ["tag1", "tag2"],
	"owner_id": "USER_ID",
	"owner_username": "username",
	"location": "",
	"accessibility_caption": "",
	"carousel": [],
	"profile_url": "https://www.instagram.com/username/"
}
```

##### Example Output

```json
{
	"post_url": "https://www.instagram.com/p/DN3i2FNUuLB/",
	"like_count": 5762,
	"comment_count": 112,
	"caption": "Back on the Joe Rogan Experience for the second time. Big thanks to @joerogan for the invite - always an honor to sit down and talk about the game I love.\nAvailable on YT and Spotify.",
	"human_timestamp": "8/27/2025, 6:05:32 PM",
	"id": "3708586068188259009",
	"shortcode": "DN3i2FNUuLB",
	"is_video": false,
	"taken_at_timestamp": 1756317932,
	"dimensions": { "height": 1080, "width": 1080 },
	"display_url": "https://instagram.fhan3-3.fna.fbcdn.net/v/t51.2885-15/539658308_18525902818053625_7679820747071942483_n.jpg?...",
	"hashtags": [],
	"owner_id": "1205749624",
	"owner_username": "gorstyanich",
	"location": "",
	"accessibility_caption": "",
	"carousel": [],
	"profile_url": "https://www.instagram.com/gorstyanich/"
}
```

# Actor input Schema

## `url` (type: `array`):

The URLs of the Instagram profiles you want to scrape. One URL per line.

## `maxPosts` (type: `integer`):

The maximum number of posts to scrape from the profile.

## Actor input object example

```json
{
  "url": [
    "https://www.instagram.com/gorstyanich/"
  ],
  "maxPosts": 10
}
```

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thedoor/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/Olm5ocFmwhLfHCEMn/builds/aODGLhEMQo56htcDM/openapi.json
