# Instagram Post Scraper - Posts, Reels & Comments (`socialscrapers/instagram-post-scraper`) Actor

Instagram post scraper for any post or reel URL: caption, hashtags, mentions, likes, comments count, plays/views, date, location, tagged accounts, collaborators, music, image and video URLs, plus comments (up to every comment shown). No login, no cookies. API, JSON, CSV. $0.30 per 1,000 posts.

- **URL**: https://apify.com/socialscrapers/instagram-post-scraper.md
- **Developed by:** [Social Scrapers](https://apify.com/socialscrapers) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.24 / 1,000 posts

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 Post Scraper** gets public Instagram posts and reels by URL, with their comments, with no Instagram account, login or cookies. For every post or reel you get the caption, hashtags, mentions, likes, comments count, reel plays, video length, date, location, tagged accounts, collaborators, sound, and image and video URLs, plus its newest comments (or every comment Instagram shows), as JSON, CSV or Excel. It costs **$0.30 per 1,000 posts** and **$0.20 per 1,000 comments**.

### What does Instagram Post Scraper do?

Instagram Post Scraper reads what Instagram shows a visitor who opens a post or reel without logging in. You can:

- 📸 **Scrape Instagram posts and reels by URL**: `/p/`, `/reel/` and `/tv/` links or bare short codes, as many as you like.
- 📈 **Get engagement data**: likes, comments count and reel plays of every post.
- 💬 **Collect comments**: the newest comments of each post, or every comment Instagram shows (no upper limit), each with its text, date, likes, reply count and commenter.
- 🎵 **See the context**: tagged location, tagged accounts, collaborators, paid partnership flag, brand partners and the sound of a reel.
- 🖼️ **Download the media**: image and video URLs, every carousel slide with its own media, sizes and Instagram's image descriptions.
- 💸 **Pay only for results**: posts that are deleted, private or age-restricted cost nothing.

Everything the Apify platform gives you comes with it: the Apify API, scheduled runs, webhooks, integrations with Make, Zapier, n8n and Google Sheets, and datasets you can download in any format.

### What data can you extract from Instagram posts?

#### Post fields

| Field | Description |
|---|---|
| `inputUrl` | The URL or short code as given in the input. |
| `id` | Numeric media id. |
| `type` | `Image`, `Video` (reels included) or `Sidecar` (a carousel). |
| `productType` | `feed`, `clips` (a reel), `carousel_container` or `igtv`. |
| `shortCode` | The code in the post URL. |
| `url` | Post URL. |
| `caption` | Caption text. |
| `hashtags` | Hashtags in the caption, without #. |
| `mentions` | Accounts mentioned in the caption, without @. |
| `likesCount` | Likes. |
| `commentsCount` | Comments. |
| `videoPlayCount` | Plays/views of a reel or video (see Limits). |
| `videoDuration` | Video length in seconds. |
| `timestamp` | When it was posted, ISO 8601 in UTC. |
| `displayUrl` | Main image (a video's cover, a carousel's first slide). |
| `images` | Image URLs of every carousel slide. |
| `videoUrl` | Video file URL. |
| `dimensionsHeight`, `dimensionsWidth` | Size in pixels. |
| `alt` | Instagram's automatic image description. |
| `childPosts` | The slides of a carousel, each with its own image or video URL, size and tags. |
| `ownerId`, `ownerUsername`, `ownerFullName` | The account that posted it. |
| `taggedUsers` | Accounts tagged in the post. |
| `coauthorProducers` | Collaborators shown as co-authors. |
| `isPaidPartnership` | `true` for a paid partnership. |
| `isCommentsDisabled` | `true` when comments are turned off. |
| `locationName`, `locationId` | The tagged location. |
| `sponsors` | Brand partners of a paid partnership. |
| `musicInfo` | The sound of a reel: artist, song, whether it is original audio, sound id. |
| `latestComments` | The newest comments, newest first (every comment Instagram shows, if you ask for it). |
| `scrapedAt` | When the post was read, ISO 8601. |

#### Comment fields (in `latestComments`)

| Field | Description |
|---|---|
| `id` | Numeric comment id. |
| `text` | Comment text. |
| `timestamp` | When it was posted, ISO 8601 in UTC. |
| `likesCount` | Likes on the comment. |
| `repliesCount` | Replies to the comment. |
| `ownerId`, `ownerUsername` | The commenter. |
| `ownerIsVerified` | `true` when the commenter shows the verified badge. |
| `ownerProfilePicUrl` | The commenter's profile picture. |

Every field is always present. A field is `null` (or an empty list) when the post leaves it empty or Instagram does not show it. The **Comments** view of the dataset shows one row per comment.

### How to scrape Instagram posts and comments

1. Open Instagram Post Scraper and click **Try for free**.
2. Add post or reel URLs to **Post or reel URLs**, one per line. Share links from the app (`instagram.com/share/…`) work too.
3. Keep **Include comments** on and set **Max comments per post** (`0` for every comment Instagram shows), or turn comments off.
4. Click **Start**. Posts appear in the dataset as they are read.
5. Download the results as JSON, CSV, Excel or HTML, or read them with the Apify API.

### How much does it cost to scrape Instagram posts?

You pay per post saved, **$0.30 per 1,000 posts**, plus **$0.20 per 1,000 comments** included in `latestComments`. Platform usage and proxies are included. On Apify's Silver plan prices are 10% lower, and on Gold 20% lower.

- 1,000 posts with their 20 newest comments (the default) → $0.30 + $4.00 = **$4.30**
- 1,000 posts without comments → **$0.30**
- 10 posts with every comment (say 2,000 each) → $0.003 + $4.00 = **about $4.00**

Posts that are deleted, private or age-restricted are free. To cap the cost of a run, set **Maximum cost per run** in the run options: the scraper saves posts until the next one would go over it, then stops cleanly, trimming the last post's comments to what the budget covers. Apify's free plan includes monthly platform credit, enough to try the scraper on thousands of posts.

### Input example

```json
{
  "postUrls": ["https://www.instagram.com/reel/Dfc1mYxFevS/", "https://www.instagram.com/p/DejHmrpjj-E/", "DfahZrMjAqq"],
  "includeComments": true,
  "maxComments": 20
}
```

| Field | Type | Description |
|---|---|---|
| `postUrls` | array of strings | Post, reel or video URLs (`https://www.instagram.com/p/...`, `/reel/...`, `/tv/...`, with or without the username before them, any `?igsh=…` parameters) or bare short codes. A link inside other text is read as that link; an entry with no post in it is skipped with a warning. Duplicates are read once. |
| `includeComments` | boolean | Add each post's newest comments. Default: `true`. |
| `maxComments` | integer | Comments per post. No upper limit; `0` for every comment Instagram shows. Default: 20. |
| `proxyConfiguration` | object | The scraper picks Apify Proxy's tier itself: datacenter first, residential only when Instagram refuses a request. Your own proxy URLs are used as given. |

### Output example

One dataset item per post, with its comments in `latestComments` (image and video URLs abbreviated, one comment shown, commenter details shortened):

```json
{
  "inputUrl": "https://www.instagram.com/reel/Dfc1mYxFevS/",
  "id": "4025327901360909266",
  "type": "Video",
  "productType": "clips",
  "shortCode": "Dfc1mYxFevS",
  "url": "https://www.instagram.com/p/Dfc1mYxFevS/",
  "caption": "Apply to become an astronaut! ... #NASA #Astronaut #JobSearch",
  "hashtags": ["NASA", "Astronaut", "JobSearch"],
  "mentions": [],
  "likesCount": 43919,
  "commentsCount": 550,
  "videoPlayCount": 1695374,
  "videoDuration": 63.467,
  "timestamp": "2026-11-07T18:35:41.000Z",
  "displayUrl": "https://instagram.fna.fbcdn.net/v/t51.82787-15/892262107_...n.jpg",
  "images": [],
  "videoUrl": "https://instagram.fna.fbcdn.net/o1/v/t2/f2/m86/AQOaFZ...mp4",
  "dimensionsHeight": 1920,
  "dimensionsWidth": 1080,
  "alt": "Video by NASA on November 07, 2026. May be an image of poster and text.",
  "childPosts": [],
  "ownerId": "528817151",
  "ownerUsername": "nasa",
  "ownerFullName": "NASA",
  "taggedUsers": [],
  "coauthorProducers": [],
  "isPaidPartnership": false,
  "isCommentsDisabled": false,
  "locationName": null,
  "locationId": null,
  "sponsors": [],
  "musicInfo": {
    "artistName": "nasa",
    "songName": "Original audio",
    "usesOriginalAudio": true,
    "audioId": "29528949596741274"
  },
  "latestComments": [
    {
      "id": "17900000000000001",
      "text": "Count me in! 🚀",
      "timestamp": "2026-11-08T01:54:33.000Z",
      "likesCount": 0,
      "repliesCount": 0,
      "ownerId": "...",
      "ownerUsername": "...",
      "ownerIsVerified": false,
      "ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/..."
    }
  ],
  "scrapedAt": "2026-11-08T02:26:12.481Z"
}
```

### Use cases

- **Campaign tracking**: measure likes, comments and reel plays of sponsored posts and collaborations.
- **Social listening**: collect what people say in the comments of a brand's or competitor's posts.
- **Content research**: analyze captions, hashtags, sounds and formats of posts that perform well.
- **Media archiving**: save image and video URLs, slide by slide.
- **Academic and market research**: build datasets of public posts and comments.

### Use it via API, Python, JavaScript and integrations

Run Instagram Post Scraper from your own code with the Apify API or the Apify clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("socialscrapers/instagram-post-scraper").call(
    run_input={"postUrls": ["https://www.instagram.com/reel/Dfc1mYxFevS/"], "maxComments": 100}
)
for post in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(post["url"], post["likesCount"], len(post["latestComments"]))
```

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('socialscrapers/instagram-post-scraper').call({ postUrls: ['DfahZrMjAqq'], maxComments: 100 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

You can also schedule runs, get a webhook when a run finishes, send results to Google Sheets, Slack or a database with [Apify integrations](https://docs.apify.com/integrations), connect it to Make, Zapier or n8n, or let AI agents run it through the [Apify MCP server](https://docs.apify.com/mcp).

### Limits

- **Public posts only.** Instagram Post Scraper never logs in, so it sees what a logged-out visitor sees. Deleted, private and age-restricted posts are skipped and cost nothing.
- **Reel plays** are shown for each account's recent posts (about its latest 60). For older reels and videos, `videoPlayCount` is `null`.
- **Comments:** no upper limit. Instagram shows logged-out visitors most top-level comments (replies are counted in `repliesCount` but not listed). A post's comments travel inside its one dataset item, which Apify caps at about 9 MB: about 25,000 comments.
- **Shown to logged-in users only, so not included:** stories, the list of accounts that liked a post, and comment replies. For hashtag feeds, see Instagram Hashtag Scraper.
- Profile details and a profile's latest posts are covered by [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper).
- **Share links** from the app (`https://www.instagram.com/share/…`, `/share/reel/…`, `/share/p/…`) are followed to the post or reel they open; following a link is never charged.
- **A run with 0 results still succeeds when your input was fine.** When every post is deleted, private or age-restricted, or a share link leads nowhere, the run ends as Succeeded with a status message naming each entry and why, and nothing is charged. A run fails only when no entry holds a post link, short code or share link at all, or when Instagram refuses every one of 3 or more inputs.

### FAQ

**Is it legal to scrape Instagram posts and comments?**
Instagram Post Scraper collects only public data that anyone can see without logging in. You are responsible for how you use it: personal data is protected by laws such as the GDPR, so have a legitimate reason to collect it and follow Instagram's terms and the laws that apply to you.

**Do I need an Instagram account or cookies?**
No. You only need the URLs of public posts or reels. The scraper never logs in, so no account of yours is ever at risk.

**How many comments can I get per post?**
As many as Instagram shows a logged-out visitor: set **Max comments per post** to `0`. A busy reel with 2,800 comments (replies included) gave 1,741 top-level comments in our tests.

**Why did I get fewer comments than `commentsCount`?**
`commentsCount` includes replies and comments Instagram hides from logged-out visitors; the scraper lists top-level comments. The run may also have reached its maximum cost.

**Which inputs are accepted?**
Post URLs (`/p/...`), reel URLs (`/reel/...` or `/reels/...`), video URLs (`/tv/...`), the same with the username before them, share links from the app (`/share/...`, `/share/reel/...`, `/share/p/...`), and bare short codes such as `DfahZrMjAqq`.

**What happens with deleted or private posts?**
They are skipped, logged and not charged. The `SUMMARY` record in the run's key-value store lists them under `notFound`. A run in which every post was deleted or private still ends as Succeeded, with a status message that names each one.

**Can I get one row per comment?**
Yes: open the **Comments** view of the dataset, or export with the dataset's `unwind=latestComments` option.

### Other scrapers by Social Scrapers

| Scraper | What it does |
|---|---|
| [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper) | Profiles: bio, followers, posts count and recent posts |
| [Facebook Groups Scraper](https://apify.com/socialscrapers/facebook-groups-scraper) | Posts from public Facebook groups |
| [Facebook Profile Scraper](https://apify.com/socialscrapers/facebook-profile-scraper) | Public details of Facebook profiles and Pages |
| [Facebook Profile Posts Scraper](https://apify.com/socialscrapers/facebook-profile-posts-scraper) | Recent posts of Facebook profiles and Pages |
| [Facebook Ads Library Scraper](https://apify.com/socialscrapers/facebook-ads-library-scraper) | Ads from Meta's Ad Library |
| [Threads Scraper](https://apify.com/socialscrapers/threads-scraper) | Threads profiles, posts, replies and search |
| [X (Twitter) Profile Scraper](https://apify.com/socialscrapers/x-profile-scraper) | X profiles: bio, followers and counts |
| [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) | YouTube videos, channels, search and comments |
| [YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) | Transcripts of YouTube videos |
| [Reddit Scraper](https://apify.com/socialscrapers/reddit-scraper) | Reddit posts, comments, users and search |
| [Quora Scraper](https://apify.com/socialscrapers/quora-scraper) | Quora questions, answers and profiles |
| [LinkedIn Jobs Scraper](https://apify.com/socialscrapers/linkedin-jobs-scraper) | LinkedIn job listings |

# Actor input Schema

## `postUrls` (type: `array`):

Posts and reels to scrape: URLs such as <code>https://www.instagram.com/p/DfahZrMjAqq/</code> or <code>https://www.instagram.com/reel/Dfc1mYxFevS/</code>, or just their short codes. Messy entries are fine: a link inside other text, or a link with extra parameters such as <code>?igsh=…</code>, is read as that link. Share links from the app (<code>instagram.com/share/…</code>) are followed to the post or reel they open. An entry with no post in it is skipped with a warning. Duplicates are read once. Posts that are deleted, private or age-restricted are skipped and never charged.

## `includeComments` (type: `boolean`):

Add each post's newest comments to its <code>latestComments</code> list.

## `maxComments` (type: `integer`):

How many of each post's newest comments to include (when comments are included). <code>0</code> includes every comment Instagram shows, up to what one dataset item can hold (about 25,000 comments). No upper limit otherwise.

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

The scraper picks Apify Proxy's tier itself: datacenter first, residential only when Instagram refuses a request (a country you choose applies to the residential retries). Your own proxy URLs are used exactly as given.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DfahZrMjAqq/",
    "https://www.instagram.com/reel/Dfc1mYxFevS/"
  ],
  "includeComments": true,
  "maxComments": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "postUrls": [
        "https://www.instagram.com/p/DfahZrMjAqq/",
        "https://www.instagram.com/reel/Dfc1mYxFevS/"
    ],
    "maxComments": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/instagram-post-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 = {
    "postUrls": [
        "https://www.instagram.com/p/DfahZrMjAqq/",
        "https://www.instagram.com/reel/Dfc1mYxFevS/",
    ],
    "maxComments": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/instagram-post-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 '{
  "postUrls": [
    "https://www.instagram.com/p/DfahZrMjAqq/",
    "https://www.instagram.com/reel/Dfc1mYxFevS/"
  ],
  "maxComments": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call socialscrapers/instagram-post-scraper --silent --output-dataset

```

## MCP server setup

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