# Instagram Profile All Data Scraper (`dead00/instagram-profile-all-data-scraper`) Actor

A powerful Instagram profile scraper that allows you to extract posts and reels from any Instagram profile with advanced filtering and sorting capabilities.

- **URL**: https://apify.com/dead00/instagram-profile-all-data-scraper.md
- **Developed by:** [Dead](https://apify.com/dead00) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 21 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$23.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

A powerful Instagram profile scraper that allows you to extract posts and reels from any Instagram profile with advanced filtering and sorting capabilities.

### 🌟 Features

- **Content Type Filtering**: Scrape posts (photos), reels (videos), or both
- **Detailed Post Data**: Get comprehensive information about each post including likes, comments, views, captions, and more
- **Profile Information**: Extract complete profile metadata including followers, bio, verification status, etc.
- **Multiple Profiles**: Scrape multiple Instagram profiles in a single run
- **Cookie-Based Authentication**: Secure authentication using your Instagram session cookies

### 📋 Prerequisites

- An Apify account
- Instagram session cookies (exported from your browser)
- A browser extension like [Cookie-Editor](https://cookie-editor.cgagnier.ca/) to export cookies

### 🚀 Quick Start

#### 1. Export Instagram Cookies

1. Log in to Instagram in your browser
2. Install the Cookie-Editor browser extension
3. Navigate to instagram.com
4. Click the Cookie-Editor extension icon
5. Click "Export" and copy the cookies
6. You'll need cookies in JSON format

#### 2. Configure Input

```json
{
  "usernames": ["natgeo", "nasa"],
  "maxPosts": 10,
  "contentType": "both",
  "sortBy": "newest",
  "cookies": [
    {
      "domain": ".instagram.com",
      "name": "sessionid",
      "value": "YOUR_SESSION_ID_HERE",
      "path": "/",
      "secure": true,
      "httpOnly": true
    }
  ]
}
```

### ⚙️ Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `usernames` | Array | ✅ Yes | - | List of Instagram usernames to scrape (without @) |
| `maxPosts` | Integer | No | 10 | Number of posts to scrape (1-100) |
| `contentType` | String | No | "both" | Filter by content type: `both`, `posts`, `reels` |
| `cookies` | Array | ✅ Yes | - | Instagram session cookies (JSON format) |

#### Content Type Options

- **both**: Scrape all content (photos and videos)
- **posts**: Only scrape photo posts
- **reels**: Only scrape video content/reels

### 📊 Output Format

Each scraped post is returned as a separate row with the following structure:

```json
{
  "scraped_at": "2026-01-03T10:30:00.000000",
  "content_type_filter": "reels",
  "user": {
    "username": "natgeo",
    "user_id": "787132",
    "full_name": "National Geographic",
    "biography": "Experience the world through the eyes of National Geographic photographers.",
    "external_url": "https://www.natgeo.com",
    "followers": 275788786,
    "followees": 172,
    "total_posts": 31238,
    "is_verified": true,
    "is_private": false,
    "is_business_account": true,
    "profile_pic_url": "https://..."
  },
  "shortcode": "ABC123xyz",
  "url": "https://www.instagram.com/p/ABC123xyz/",
  "type": "video",
  "caption": "Amazing wildlife captured in 4K...",
  "date_posted": "2026-01-02T15:30:00",
  "likes": 125430,
  "comments": 3421,
  "is_video": true,
  "video_url": "https://...",
  "video_view_count": 2500000,
  "video_duration": 45.5,
  "thumbnail_url": "https://...",
  "media_count": 1,
  "tagged_users": ["photographer_name"],
  "location": "Serengeti National Park"
}
```

### 🔑 Data Fields Explained

#### User Fields (nested in `user` object)

- `username`: Instagram handle
- `user_id`: Instagram user ID
- `full_name`: Display name
- `biography`: Profile bio text
- `external_url`: Website link in bio
- `followers`: Follower count
- `followees`: Following count
- `total_posts`: Total number of posts on profile
- `is_verified`: Blue checkmark status
- `is_private`: Private account status
- `is_business_account`: Business account status
- `profile_pic_url`: Profile picture URL

#### Post Fields

- `shortcode`: Unique Instagram post identifier
- `url`: Direct link to the post
- `type`: "photo" or "video"
- `caption`: Post caption text
- `date_posted`: Publication date (ISO format)
- `likes`: Number of likes
- `comments`: Number of comments
- `is_video`: Boolean indicating video content
- `video_url`: Direct video URL (videos only)
- `video_view_count`: View count (videos only)
- `video_duration`: Duration in seconds (videos only)
- `thumbnail_url`: Post thumbnail URL
- `media_count`: Number of media items (for carousels)
- `tagged_users`: Array of tagged usernames
- `location`: Location name if geo-tagged

#### Optimization Tips

1. **Start with fewer posts**: Test with 5-10 posts before requesting 50+
2. **Content filtering is efficient**: Filtering for "reels" or "posts" doesn't significantly impact speed
3. **Private accounts**: You must follow private accounts to scrape their content

### 🚨 Important Notes

#### Rate Limiting

- Scraping too frequently may result in temporary blocks
- Use responsibly and respect Instagram's Terms of Service

#### Authentication

- **Cookies are required** - the scraper cannot work without valid Instagram cookies
- Cookies expire after some time; you may need to refresh them periodically
- Keep your cookies secure - they provide access to your Instagram account

#### Private Accounts

- You can only scrape private accounts if you follow them
- The scraper will warn you if an account is private

### 🛠️ Troubleshooting

#### "Cookie login failed"

- Your session cookies are invalid or expired
- Re-export fresh cookies from your browser
- Make sure you're logged into Instagram when exporting

#### "This is a private account"

- You can only scrape private accounts you follow
- Log in with an account that follows the target profile

#### "No reels found"

- The profile might not have video content
- Try using "both" instead of "reels"
- Some accounts post primarily photos

**Happy Scraping! 🎉**

# Actor input Schema

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

List of Instagram usernames to scrape (without @). Example: natgeo, nasa, bbcearth

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

Number of recent posts to scrape from each profile

## `contentType` (type: `string`):

Filter content by type: 'posts' (photos only), 'reels' (videos only), or 'both' (all content)

## `cookies` (type: `array`):

Instagram session cookies exported from your browser. Required for authentication. Export using Cookie-Editor or similar browser extension.

## Actor input object example

```json
{
  "usernames": [
    "natgeo",
    "nasa",
    "bbcearth"
  ],
  "maxPosts": 10,
  "contentType": "both",
  "cookies": []
}
```

# Actor output Schema

## `overview` (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": [
        "natgeo"
    ],
    "cookies": []
};

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

# Run the Actor and wait for it to finish
run = client.actor("dead00/instagram-profile-all-data-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": [
    "natgeo"
  ],
  "cookies": []
}' |
apify call dead00/instagram-profile-all-data-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/igrivbR75uGG32hT7/builds/SseTeVBlK663OPfGv/openapi.json
