# Instagram Scraper - Profiles, Posts & Reels in One Run (`swerve/instagram-scraper`) Actor

The all-in-one Instagram scraper. One run takes a list of usernames or profile URLs and returns each profile plus its posts and reels: captions, hashtags, likes, comments, views and timestamps. No login or API key. Pay only for the results you get.

- **URL**: https://apify.com/swerve/instagram-scraper.md
- **Developed by:** [Swerve](https://apify.com/swerve) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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 Scraper - Profiles, Posts & Reels in One Run

Scrape **Instagram** in one run: profiles, posts and reels with their captions and stats. Paste a list of usernames or profile URLs and get back one clean row per post, with the profile behind it attached. **No login and no API key.**

### Why this scraper

Most Instagram tools do one job each: one for profiles, one for posts, one for reels, one for comments. Covering a set of accounts means running several tools and joining their output yourself.

This actor replaces that stack. Give it a list of usernames once and every post and reel comes back with its caption, hashtags, likes, comments, views and timestamp, plus the profile stats, in a single run.

### What you can do with it

- Turn a set of accounts into a dataset of posts and reels for research or reporting
- Track a competitor's or creator's posting cadence, engagement and reach over time
- Pull captions and hashtags at scale for content and trend analysis
- Export follower counts, bios and links for a list of profiles

### Input

| Field | What it does | Example |
|-------|--------------|---------|
| **Instagram usernames or profile URLs** | The accounts to scrape. | `nasa`, `@natgeo`, `https://www.instagram.com/nike/` |
| **What to return** | Posts and reels (one row per post), or profile details only (one row per profile). | Posts and reels |
| **Max posts per profile** | How many recent posts and reels to take from each account. Leave blank for the full history. | `100` |
| **Include reels** | Include reels alongside regular posts. On by default. | on |

### Output

**Posts and reels mode** - one row per post, with the profile attached:

```json
{
  "ownerUsername": "nasa",
  "ownerFullName": "NASA",
  "ownerFollowers": 104339764,
  "ownerVerified": true,
  "postId": "3641234567890123456",
  "shortCode": "Dabg9j1xNHM",
  "url": "https://www.instagram.com/reel/Dabg9j1xNHM/",
  "type": "reel",
  "caption": "For 250 years, America has inspired generations to dream bigger...",
  "hashtags": ["#nasa", "#space"],
  "mentions": ["@nasawebb"],
  "likeCount": 49444,
  "commentCount": 1753,
  "viewCount": 3971766,
  "playCount": 3971766,
  "timestamp": "2026-07-05T23:40:02.000Z",
  "isVideo": true,
  "displayUrl": "https://...jpg",
  "videoUrl": "https://...mp4",
  "scrapedAt": "2026-07-10T15:30:00.000Z"
}
````

**Profile details mode** - one row per profile: username, full name, biography, follower and following counts, post count, verified and business flags, category, external URL and profile picture.

Fill rates on the core post fields (owner, id, url, type, caption, likes, comments, timestamp) are ~100%.

### How it works

Uses Instagram's own public web endpoints, the same ones the website calls, so it reads profile and post data reliably. It fetches the profile, then pages through the account's feed to the depth you ask for. Runs through a residential connection by default because Instagram limits datacenter addresses at volume; you can switch that off for small runs. No API key required.

### Limits

- Public accounts only. Private accounts return the profile but no posts.
- Comments are not returned in this version (Instagram requires a login for comment bodies); post comment counts are included.
- "Max posts per profile" left blank pulls the full available history.

### Export formats

Results download as JSON, CSV, Excel or XML, or pull them straight from the Apify API into your own app, spreadsheet or database.

### Frequently asked questions

**Do I need an Instagram API key or login?** No. This Instagram scraper needs no API key and no account. It reads Instagram's public web data directly.

**Can I scrape an Instagram profile's posts and reels?** Yes. Give it a username or profile URL and it returns the profile plus its posts and reels, with captions, likes, comment counts, hashtags and media URLs, in one run.

**Can I scrape many Instagram accounts at once?** Yes. Paste a list of usernames or profile URLs and each is returned in the same run, so it works as a bulk Instagram profile and posts scraper.

**Does it get follower counts and bio?** Yes. Profile rows include followers, following, post count, bio, external link, verified and business flags.

**How many posts can I scrape per account?** As many as are public. Leave the limit blank for the full available history, or set it to control cost.

**Is scraping Instagram legal?** This tool collects only public data. You are responsible for how you use it. Review Instagram's terms and your local laws before large-scale use.

### Pricing

Pay per result. You only pay for the posts or profiles you actually get.

# Actor input Schema

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

Paste Instagram usernames, @handles or profile URLs. Examples: nasa, @natgeo, https://www.instagram.com/nike/ . Each one returns that profile plus its posts and reels.

## `resultType` (type: `string`):

Posts and reels: one row per post with the profile attached. Profile details only: one row per profile with follower and bio data (no posts).

## `resultsLimit` (type: `integer`):

How many recent posts and reels to take from each profile. Leave blank for the full history.

## `includeReels` (type: `boolean`):

Include reels (short videos) alongside regular posts. On by default. Turn off to return only feed posts.

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

Optional overall cap on rows across every profile. Leave blank for everything.

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

Instagram limits datacenter addresses at volume, so a residential proxy is the default. You can switch it off for small runs.

## Actor input object example

```json
{
  "usernames": [
    "nasa"
  ],
  "resultType": "posts",
  "includeReels": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

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

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

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Scraper - Profiles, Posts & Reels in One Run",
        "description": "The all-in-one Instagram scraper. One run takes a list of usernames or profile URLs and returns each profile plus its posts and reels: captions, hashtags, likes, comments, views and timestamps. No login or API key. Pay only for the results you get.",
        "version": "0.1",
        "x-build-id": "WakfcNNWHVU8xlSmi"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/swerve~instagram-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-swerve-instagram-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/swerve~instagram-scraper/runs": {
            "post": {
                "operationId": "runs-sync-swerve-instagram-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/swerve~instagram-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-swerve-instagram-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 or profile URLs",
                        "type": "array",
                        "description": "Paste Instagram usernames, @handles or profile URLs. Examples: nasa, @natgeo, https://www.instagram.com/nike/ . Each one returns that profile plus its posts and reels.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "resultType": {
                        "title": "What to return",
                        "enum": [
                            "posts",
                            "details"
                        ],
                        "type": "string",
                        "description": "Posts and reels: one row per post with the profile attached. Profile details only: one row per profile with follower and bio data (no posts).",
                        "default": "posts"
                    },
                    "resultsLimit": {
                        "title": "Max posts per profile",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many recent posts and reels to take from each profile. Leave blank for the full history."
                    },
                    "includeReels": {
                        "title": "Include reels",
                        "type": "boolean",
                        "description": "Include reels (short videos) alongside regular posts. On by default. Turn off to return only feed posts.",
                        "default": true
                    },
                    "maxItems": {
                        "title": "Max results in total",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Optional overall cap on rows across every profile. Leave blank for everything."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Instagram limits datacenter addresses at volume, so a residential proxy is the default. You can switch it off for small runs.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
