# Instagram Post Scraper: Details by URL, No Login (`automation_craft/instagram-post-scraper`) Actor

Scrape Instagram post details from up to 2,000 post, reel or carousel links, codes or ids, no login. Each row: caption, like and comment count, date, owner, every carousel item, media links, collaborators, place, paid partnership label, sponsors, first 15 comments. JSON, CSV or API; pay per post.

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

## Pricing

from $0.19 / 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: Details by URL, No Login

**Scrape Instagram post details from post, reel and carousel links, post codes or numeric post ids, with no login and no
cookies.** Paste up to 2,000 links and get one full row per post: caption, likes, comment count, date, owner, every carousel item,
image and video links, length, collaborators, place, music, the paid partnership label and its sponsors, and the post's first
comments (tagged accounts too, with the personal data switch on). Pay only for the posts delivered.

- **Every link form**: /p/, /reel/, /reels/ and /tv/ links, links with the owner's name in front, share links (/share/...),
  instagr.am and m.instagram.com links, links with tracking parameters, bare codes (2010 posts have 4 letter codes) and numeric post
  ids.
- **Comments in depth**: the first 15 come with every post; ask for up to 10,000 a post, read page by page.
- **Owner details** (add-on) on every row of an owner (followers, following, post count, bio, category), and engagement rate from
  them.
- **Paid partnerships**: the label and the brands named as sponsors, on every post that carries them.
- Filters that apply to your links: a date window, post types, minimum likes, comments or plays, words to contain, posts with a
  place, collab posts kept, left out or alone.
- Every miss (a removed post, a post of a private account, a link that cannot be read) is named by its place in your list in a
  free status row, one row per kind of miss. Each post is charged once per run, however many of your entries name it.

### Quick start

1. Open the **Input** tab and put one or more post links in **Post links, codes or ids**, for example
   `https://www.instagram.com/p/DYDPkxrkgQk/`.
2. Keep **Comments per post** at 15 (they come with each post), or set more, or 0 for none.
3. Click **Start**. Rows arrive in the **Output** tab within seconds; export them as JSON, CSV or Excel, or read them through the API.
4. Add-ons, each off by default: **Owner details**, **Reel play counts**, **Video files**.

### What you get

One `post` row per post:

| Field | What it holds | Filled on |
|---|---|---|
| `type` | `post` (paid); the free rows say `status` or `summary` | every row |
| `input`, `inputKind`, `inputList`, `inputPosition` | Your entry as given, whether it was a link, a share link, a code or an id (`link`, `share`, `code`, `id`), its field (`postUrls` or `postUrl`) and its place there | every post |
| `code`, `id`, `url` | The post's code, its numeric id (as text) and link | every post |
| `postType`, `productType` | photo, carousel, reel, video (a feed video) or igtv; Instagram's own product type | every post |
| `caption`, `hashtags`, `captionIsEdited`, `captionCreatedAt` | The caption as Instagram serves it, its hashtags in order, whether it was edited and when it was written | posts with a caption (1,028 of 1,040) |
| `captionLanguage` | The caption's language as a two letter code: our own estimate, null when the caption is too short to tell | 526 of 1,040 |
| `title` | A post's own title, where Instagram gives one | 2 of 1,040 |
| `likeCount`, `likesHidden`, `commentCount`, `commentsDisabled` | Likes (null when the owner hid them, never 0), comments, whether likes are hidden, `true` when comments are turned off (null otherwise) | every post |
| `engagementCount`, `engagementRate` | Likes plus comments; that as a percent of the owner's followers | the count on every post with likes, the rate with `includeOwnerDetails` |
| `postedAt`, `postedAtTimestamp`, `createdAtFromId` | Publication time (UTC, and as a Unix time), and the time the post's id carries | every post |
| `imageUrl`, `imageUrlExpiresAt`, `width`, `height` | The largest image Instagram offers, when its link expires (about four days after the run) and its size | every post |
| `videoUrl`, `videoUrlExpiresAt`, `audioUrl`, `durationSeconds`, `hasAudio`, `videoQualityCount` | Video link (it expires about a day and a half after the run), audio only track, length, quality count | videos and reels (the audio track on reels) |
| `carouselCount`, `carouselItems` | Every item of a carousel in order: `position`, `id`, `type`, `imageUrl`, `videoUrl`, `durationSeconds`, `width`, `height`, `accessibilityCaption`, `taggedUsers` | carousels |
| `accessibilityCaption` | Instagram's alt text | posts that carry one |
| `viewCount` | Instagram's own view count | older feed videos that carry one |
| `playCount`, `playCountSource`, `playCountStatus`, `playsToFollowersPercent` | A reel's play count, where it was read (`sound_page` or `reels_tab`), why it is missing, plays as a percent of the owner's followers | reels, with `includePlayCount` |
| `isPaidPartnership`, `sponsors`, `affiliate` | The paid partnership label, the brands it names (`username`, `id`, `fullName`, `isVerified`), Instagram's affiliate block | the label on every post, the rest where Instagram sends them |
| `coauthors`, `location`, `audio`, `aiLabel` | Collaborators, place (`id`, `name`, `lat`, `lng`, `url`), a reel's sound (`type` original or music, `title`, `artist`, `audioId`, `isExplicit`), AI label | where the post carries them |
| `fbLikeCount`, `fbPlayCount`, `isSharedToFacebook` | The Facebook copy's counts, and whether a reel is shared to Facebook | where Instagram's answer carries them |
| `owner` | `username`, `id`, `fullName`, `isVerified`, `profilePicUrl`, `url` | every post |
| `comments`, `commentsStatus` | Comments: `id`, `text` (null on a GIF comment), `createdAt`, `likeCount`, and with `includePersonalData` the author's `ownerUsername`, `ownerId`, `ownerIsVerified`; why the list ended (`commentsStatus`) | posts with comments (the first 15 by default) |
| `ownerDetails`, `ownerDetailsStatus` | `username`, `fullName`, `followerCount`, `followingCount`, `postsCount`, `category`, `accountType`, `isVerified`, `isPrivate`, `biography`, `externalUrl`, `bioLinks`, `profileUrl` | with `includeOwnerDetails` |
| `isOnProfileGrid` | Whether the post shows on its owner's profile grid | with `checkProfileGrid` |
| `videoViewCount`, `videoViewCountStatus` | The view counter of a video's embed page | with `includeViewCount` |
| `taggedUsers`, `mentions` | Accounts tagged in the post (`username`, `fullName`, and `x`, `y` where the tag sits) and mentioned in its caption; carousel items carry their own tags | with `includePersonalData` |
| `videoFile`, `videoFileStatus` | `key`, `url`, `bytes`, `megabytes` of the stored MP4 | with `downloadVideos` |
| `raw` | Instagram's own answer for the post | with `includeRawData` |
| `scrapedAt` | When the row was written (UTC) | every post |

Every add-on's status field (`commentsStatus`, `ownerDetailsStatus`, `playCountStatus`, `videoFileStatus`, `videoViewCountStatus`)
says `not_requested` when the add-on is off, and otherwise why its field is filled or empty (for example `allowance`,
`charge_limit`, `failed`, `not_a_reel`, `no_video`, `too_large`).

Measured on 1,040 distinct posts of this Actor's own runs on 2026-11-04 (272 photos, 301 carousels, 450 reels, 17 feed and IGTV videos; `platform-results/fill-rates.json`): date, comment count, image link and owner on 100 percent, likes 99.7 (the rest hidden by their owners), caption 98.8, video link and length on 100 percent of videos, every carousel item on 100 percent of carousels, music on 97.8 percent of reels, caption language 50.6, hashtags 37.2, collaborators 27.7, place 13.0, AI label 4.7, alt text 3.0, Instagram's own view count on 13 of 17 feed and IGTV videos, the paid partnership label on 17 posts with sponsors named on 7 of them, a post's own title on 2. The Facebook copy's counts and the affiliate block were on 0 of the 1,040 posts. With the default of 15 comments, a 1,000 link run on the final build brought the first comments of 997 of its 997 posts with comments (run kFQIaC3DHY0k1zS7w): when Instagram refuses a first page on its usual door, the page is asked on a second door. A post whose comments Instagram still refuses after retries is delivered with `commentsStatus` failed and billed as a post.

Free rows beside the posts: one `status` row per kind of miss and per filter that left posts out, naming their places in your list
(`not_found`, `age_restricted`, `failed`, `already_delivered`, `left_out`, `entry_refused`, `skipped`; `invalid` for an input that
cannot be used, `proxy_mapped` when a residential group was read through the datacenter pool, `free_run` when part of a run was
delivered free), and a `summary` row with the run's counters and charges. For one row per comment, read the dataset through the API with `unwind=comments`.

Example post row (shortened, from a run of the prefill):

```json
{
  "type": "post",
  "input": "https://www.instagram.com/p/DecPSQfoaRe/",
  "inputKind": "link",
  "inputList": "postUrls",
  "inputPosition": 3,
  "code": "DecPSQfoaRe",
  "url": "https://www.instagram.com/p/DecPSQfoaRe/",
  "postType": "reel",
  "likeCount": 22945,
  "commentCount": 119,
  "engagementCount": 23064,
  "postedAt": "2026-10-13T16:30:08.000Z",
  "durationSeconds": 30.03,
  "isPaidPartnership": true,
  "sponsors": [
    {
      "username": "rolex",
      "isVerified": null
    }
  ],
  "audio": {
    "type": "original",
    "title": "Original audio",
    "artist": "natgeo"
  },
  "owner": {
    "username": "natgeo",
    "isVerified": true
  },
  "commentsStatus": "capped"
}
```

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

Pay per event, in US dollars. The price falls with your Apify plan:

| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Post (each post delivered, with its first 15 comments) | $0.27 | $0.24 | $0.22 | $0.19 |
| Play count (play count add-on, each reel whose lookup ran to its end) | $0.60 | $0.55 | $0.50 | $0.45 |
| Owner profile (owner details add-on, once per post owner per run) | $2.00 | $1.90 | $1.70 | $1.50 |
| Comment (each comment past a post's first 15) | $0.27 | $0.24 | $0.22 | $0.19 |
| Video megabyte (video file add-on, each started MB of a stored file) | $10.00 | $7.50 | $6.00 | $5.00 |

Prices are per 1,000 events. The Actor start is $0.0075 once per run, the same on every plan.
Platinum and Diamond plans pay the Gold price. The Store pricing card shows these same prices per 1,000 events: "$0.19 / 1,000" on
the Post row means one post costs 0.019 cents on a Gold plan, so 1,000 posts cost USD 0.19, and "$5.00 / 1,000" on the Video
megabyte row means one stored megabyte costs half a cent. Posts a filter leaves out, repeats, misses and anything Instagram did not
answer are free; only the run's start fee is charged for a run that delivers nothing.

Examples at the Free price, each link delivering a post: 100 post links cost 0.0075 + 100 x 0.00027 = USD 0.0345; 1,000 links
cost 0.0075 + 1,000 x 0.00027 = USD 0.2775; one post with 500 comments costs 0.0075 + 0.00027 + 485 x 0.00027 = USD 0.1387; 100 posts of 20 owners with owner details cost 0.0075 + 100 x
0.00027 + 20 x 0.002 = USD 0.0745. At the Gold price the same 1,000 links cost USD 0.1975.

### Input

| Setting | What it does |
|---|---|
| `postUrls` | Post, reel, reels, tv and share links, codes or numeric post ids (up to 2,000) |
| `postUrl` | One post, read before the list |
| `maxPosts` | Stop after this many posts were delivered |
| `postedSince`, `postedUntil` | A day (2026-10-01) or "30 days", "24 hours"; and an end day |
| `postTypes` | photo, carousel, reel, video, igtv |
| `minLikes`, `minComments`, `minPlays` | Leave out posts below these counts (a post without the count asked is left out; `minPlays` needs `includePlayCount`) |
| `mustContain` | Words or phrases, one of which must be in the caption, hashtags, place, owner, collaborators, sponsors or music |
| `onlyWithLocation`, `collabPosts` | Only posts with a place; include, leave out or keep only collab posts |
| `maxCommentsPerPost` | 0 to 10,000 comments a post (default 15; each past 15 is a Comment event) |
| `includeOwnerDetails`, `includePlayCount`, `downloadVideos`, `maxVideoSizeMb` | The add-ons: owner details, reel play counts, video files (a file larger than `maxVideoSizeMb`, 1 to 25, default 25, is not stored and costs nothing) |
| `maxOwnerPagesPerLink`, `checkProfileGrid`, `includeViewCount` | How far a play count or the grid check reads the owner's pages (1 to 100, default 10 pages of 12: the owner's 120 newest reels or posts); the grid mark; the embed's view counter (both free) |
| `compactRows`, `includeRawData` | A compact row, or Instagram's raw answer for each post (needs `includePersonalData`); not both in one run |
| `includePersonalData` | Off by default. On: `taggedUsers` (post and carousel items), `mentions`, the comment authors' usernames, ids and verified marks, the website and bio links of owner details naming Instagram, Facebook, Messenger, Threads or WhatsApp profiles, and the raw answer if asked. Captions and comment texts are always delivered as Instagram serves them |
| `maxConcurrency`, `maxRunSeconds`, `requestTimeoutSecs`, `maxRetries`, `proxyConfiguration` | Run settings: posts read at once (1 to 4, default 4), a time limit (30 to 86,400 seconds), a request timeout (5 to 60, default 30), retries (0 to 5, default 2), the proxy |

Example input:

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DYDPkxrkgQk/",
    "https://www.instagram.com/reel/DZsrTAps_jI/?igsh=abc",
    "FvAt",
    "3611994339457734692"
  ],
  "maxCommentsPerPost": 100,
  "includeOwnerDetails": true
}
```

### How it reads Instagram

Logged out and with no cookies of any account: Instagram's own details of each post (one light request a post, four posts at a
time), the post's comments page by page, the owner's profile and its embed page for the owner details, and for a reel's play count
the reel's own sound page or the owner's Reels tab, as the Instagram web app asks for them. Requests go from the run's own address
first, and a request type moves to Apify's datacenter proxy for the rest of the run after two refusals in a row there; no residential
proxy is needed.

### Work that earns nothing

A run's unpaid work (links that do not exist, filters nothing passes, failing answers) is bounded: it may spend about 72 seconds of
work before its first billed post, and every billed event adds a little more. A run that only meets misses stops there with a free
row for what it did not read; a run that delivers posts earns more work with each one (a measured run read 1,000 of 1,000
links). The add-ons (comments past the first page, owner details, video files) have an allowance of their own: an add-on is left off a row (its status says `allowance`) when its
allowance is spent; comments and stored video files pay for the next reads of their round.

### What this Actor does NOT do

- No share, save or repost counts: the post's logged out answer does not carry them (52 of 52 answers read, 2010 to 2026 posts).
- No pinned mark: neither a post's own page nor the profile grid Instagram shows a logged out visitor says which posts are pinned.
- No photo filter name, no remix (reuse) flag, no city or street of a place (name and coordinates are delivered): the post's
  logged out answer does not carry them.
- No comment replies: Instagram does not serve them logged out.
- No age restricted (18+) posts, no posts of private accounts, and no login or cookies of yours, ever.
- No profile feeds, Reels tabs, hashtag or keyword search: the tools of ours listed at the end do these. No stories, highlights,
  tagged posts, place search, related profiles or transcripts either.
- A reel's play count is not on its own page for a visitor who is not logged in: the play count add-on reads it from the reel's
  sound page or the owner's Reels tab, and says why when it is not found.
- No change tracking between runs and no "new posts only" memory: schedule the Actor and compare runs in your own sheet.
- No custom code runs inside the Actor (no mapping functions) and no delivery into other apps beyond Apify's integrations.
- No music on photos and carousels: Instagram's logged out answer carries a sound only for reels (0 of 573 photos and carousels
  measured on 2026-11-04).

### FAQ

#### How do I scrape all the comments of an Instagram post?

Set `maxCommentsPerPost` up to 10,000: the first 15 comments come with every post, and the next ones are read page by page, each one
past 15 a Comment event. `commentsStatus` says why a list ended: `read` (every comment Instagram shows), `capped` (your limit),
`partial` (a page failed), `failed` (Instagram refused the first page after retries; the post is still delivered and billed),
`not_shown`, `allowance`, `charge_limit`, `none` or `disabled`. Instagram shows a visitor who is not logged in fewer
comments than the count and no replies (the count includes replies): 111 of 185 and 5,023 of 16,579 on two posts measured.

#### Can I get the follower count of a post's owner?

Yes: `includeOwnerDetails` adds the owner's followers, following, post count, category, account type, bio and links to every row of
that owner, charged once per owner per run, and fills `engagementRate` (likes plus comments as a percent of followers).

#### Can I scrape Instagram posts without logging in or cookies?

Yes. This Actor reads public posts as a visitor who is not logged in: no Instagram account, no cookies and no residential proxy.
Posts of private accounts and age restricted posts are not shown to such a visitor; each one gets a free status row (an age
restricted post is named as such).

#### How do I track the likes and comments of a list of Instagram posts?

Save your links in an Apify task and schedule it (hourly, daily): each run reads the current counts of every post. Compare runs in
your own sheet or through the API; the Actor keeps no memory between runs.

#### How do I get a reel's view count from its link?

Turn on `includePlayCount`: the play count is read from the reel's own sound page when the reel made that sound, else from the
owner's Reels tab (`playCountStatus` says why when it is not found). A lookup that ran to its end is a Play count event even when
it found no count (`not_in_reels_tab`, `not_in_recent_reels`, `not_shown`); one the run could not finish is free. Older feed
videos carry Instagram's own `viewCount` (13 of 17 measured), and `includeViewCount` adds the embed page's counter for free.

#### Why does this Actor run with limited permissions?

It needs nothing beyond its own run: it reads public Instagram pages and writes only to the run's own dataset and key-value store
(its record of the posts it charged, so a restarted run never charges a post twice, and the video files of the add-on); it opens
no named store. Limited permissions keep it from touching any other storage of your account.

### Use with the API

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~instagram-post-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' -d '{"postUrls": ["https://www.instagram.com/p/DYDPkxrkgQk/"]}'
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation_craft/instagram-post-scraper').call({ postUrls: ['https://www.instagram.com/p/DYDPkxrkgQk/'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((x) => x.type === 'post'));
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation_craft/instagram-post-scraper").call(run_input={"postUrls": ["https://www.instagram.com/p/DYDPkxrkgQk/"]})
posts = [x for x in client.dataset(run["defaultDatasetId"]).iterate_items() if x["type"] == "post"]
```

### Changelog

- 0.1: first version (post links, codes and ids; filters; comments; owner details, play count and video file add-ons).

### More data tools by Automation Craft

- [Instagram Posts Scraper: Profiles, Reels, No Login](https://apify.com/automation_craft/instagram-posts-scraper)
- [Instagram Reels Search Scraper: Reels by Keyword](https://apify.com/automation_craft/instagram-reels-search-scraper)
- [Instagram User Search Scraper: Profiles by Keyword](https://apify.com/automation_craft/instagram-user-search-scraper)
- [Instagram Search Scraper: Reels, Users, Hashtags](https://apify.com/automation_craft/instagram-search-scraper)
- [Threads Profile Scraper: Followers, Bio, Posts](https://apify.com/automation_craft/threads-profile-scraper)
- [Facebook Post Scraper: Reactions and Shares by URL](https://apify.com/automation_craft/facebook-post-scraper)
- [Facebook Reels Scraper: Views, Likes, No Login](https://apify.com/automation_craft/facebook-reels-scraper)
- [Meta Ads Library Scraper - Meta Ad Library API](https://apify.com/automation_craft/meta-ads-library-scraper)

# Changelog

This Actor's version history is a separate document: https://apify.com/automation_craft/instagram-post-scraper/changelog.md

# Actor input Schema

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

Instagram post, reel, carousel or video links (instagram.com/p/<code>/, /reel/, /reels/, /tv/, also with the owner's name in front, share links /share/..., instagr.am and m.instagram.com links, tracking parameters ignored), bare post codes (2010 posts have 4 letter codes), or numeric post ids (digits only, also as <post id>\_<owner id>). One full row per post, in your order. Up to 2,000 a run; each post once per run.

## `postUrl` (type: `string`):

A single post, as an alternative to the list: any link, code or id the list takes. Read before the list; a post named in both is read once.

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

Stop after this many posts were delivered (1 to 2,000); the entries not read get one free skipped row. Leave empty for every entry.

## `postedSince` (type: `string`):

Deliver posts published on or after this day (YYYY-MM-DD, from 00:00 UTC) or within the last N days or hours ("30 days", "24 hours", counted back from the run's start).

## `postedUntil` (type: `string`):

Deliver posts published on or before this day (YYYY-MM-DD, up to 23:59:59 UTC).

## `postTypes` (type: `array`):

Deliver only these kinds of post: photo, carousel, reel, video (a feed video that is not a reel) or igtv. Empty = every kind.

## `minLikes` (type: `integer`):

Deliver only posts with at least this many likes. A post whose owner hid its likes is left out.

## `minComments` (type: `integer`):

Deliver only posts with at least this many comments.

## `minPlays` (type: `integer`):

Deliver only reels with at least this many plays. Needs includePlayCount; a post without a play count (not a reel, or not found by the lookup) is left out.

## `mustContain` (type: `array`):

Deliver only posts where one of these words or phrases (up to 50, case ignored) is in the caption, a hashtag, the place, the owner's username or name, a collaborator's or sponsor's username, or the music's title or artist.

## `onlyWithLocation` (type: `boolean`):

Deliver only posts tagged with a place (location).

## `collabPosts` (type: `string`):

Posts with collaborators (posted with one or more co-authors): include them (default), leave them out, or deliver only them.

## `maxCommentsPerPost` (type: `integer`):

How many of each post's comments to deliver on its row (0 to 10,000; default 15): text, time and likes (the author with includePersonalData). The first 15 come with the post at no extra charge; each comment past 15 is a Comment event. Comments past the first page stop (commentsStatus allowance) when the add-on's unpaid work allowance is spent. 0 = no comments.

## `includeOwnerDetails` (type: `boolean`):

Adds each post owner's profile to their rows (ownerDetails): followers, following, post count, full name, category, account type, verified, bio and links. Charged once per owner per run as an Owner profile event; left off (ownerDetailsStatus allowance) when the add-on's work allowance is spent. Links naming an Instagram, Facebook, Messenger, Threads or WhatsApp profile are left out unless includePersonalData is on.

## `includePlayCount` (type: `boolean`):

Adds each reel's play count (playCount), which Instagram does not serve on a post's own page to a visitor who is not logged in: read from the reel's own sound page when the reel made that original sound, else from the owner's Reels tab, newest first, down to the reel's date (see maxOwnerPagesPerLink). A Play count event per reel whose lookup ran to its end; photos, carousels and other videos are free (playCountStatus not_a_reel).

## `maxOwnerPagesPerLink` (type: `integer`):

For a reel's play count and for the grid check: at most this many pages of the owner's Reels tab or grid are read, 12 posts a page, newest first (1 to 100, default 10: the owner's 120 newest), shared by every post of one owner in a run. An older post says not_in_recent_reels (play count) or null (grid check).

## `checkProfileGrid` (type: `boolean`):

Marks whether each post shows on its owner's profile grid (isOnProfileGrid true or false; null when the grid could not be read far enough): the owner's grid is read newest first down to the post's date, within maxOwnerPagesPerLink pages. No extra charge.

## `downloadVideos` (type: `boolean`):

Stores each delivered post's video file (MP4 as Instagram serves it; photos and carousels say no_video) in the run's key-value store and puts its link on the row (videoFile). Charged per started MB of the stored file as a Video megabyte event (1 MB = 1,000,000 bytes). A file is left off its row (videoFileStatus allowance) when the add-on's work allowance is spent. Instagram's own links are free on the rows: videoUrl expires about a day and a half after the run, imageUrl about four days.

## `maxVideoSizeMb` (type: `integer`):

A video file larger than this is not stored (its row says too_large and nothing is charged for it). 1 to 25, default 25.

## `includeViewCount` (type: `boolean`):

Adds the view counter of each video post's embed page (videoViewCount), a counter apart from a reel's play count. One more page read per video post, no extra charge. Older feed videos also carry Instagram's own view count (viewCount) on their rows (13 of 17 measured).

## `compactRows` (type: `boolean`):

Delivers a compact row: the post's code, link, type, owner, caption, hashtags, likes, comments, views, plays, date, length, paid partnership, image and video links, carousel size, and the add-ons asked for.

## `includeRawData` (type: `boolean`):

Adds Instagram's own answer for each post (raw), as served. Needs includePersonalData, since the answer names the people tagged in a post.

## `includePersonalData` (type: `boolean`):

Off by default. When on, rows also carry taggedUsers (accounts tagged in a post and its carousel items), mentions (accounts a caption mentions), comment authors (ownerUsername, ownerId, ownerIsVerified), the website and bio links of owner details naming Instagram, Facebook, Messenger, Threads or WhatsApp profiles, and the raw answer if asked. Captions and comment texts are always delivered as served. You are responsible for a lawful use of personal data, GDPR included.

## `maxConcurrency` (type: `integer`):

How many posts are read at the same time (1 to 4, default 4). Lower it to go slower.

## `maxRunSeconds` (type: `integer`):

Stop after this many seconds (30 to 86,400), with free rows for what was not read. Leave empty to run until done or until the Apify run timeout.

## `requestTimeoutSecs` (type: `integer`):

How long one request may take (5 to 60). Default 30.

## `maxRetries` (type: `integer`):

How often a failed request is tried again (0 to 5, default 2); through a proxy each try takes a fresh exit.

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

Default: Apify Proxy without a group or country, which reads from the run's own address first and moves a request type to Apify's datacenter proxy after two refusals in a row there. Choose a group or a country to read only through Apify Proxy, or give your own proxy links. A residential group is read through the datacenter pool instead (no extra cost).

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DYDPkxrkgQk/",
    "https://www.instagram.com/reel/DZsrTAps_jI/",
    "https://www.instagram.com/p/DecPSQfoaRe/"
  ],
  "onlyWithLocation": false,
  "collabPosts": "include",
  "maxCommentsPerPost": 15,
  "includeOwnerDetails": false,
  "includePlayCount": false,
  "checkProfileGrid": false,
  "downloadVideos": false,
  "includeViewCount": false,
  "compactRows": false,
  "includeRawData": false,
  "includePersonalData": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (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/DYDPkxrkgQk/",
        "https://www.instagram.com/reel/DZsrTAps_jI/",
        "https://www.instagram.com/p/DecPSQfoaRe/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/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/DYDPkxrkgQk/",
        "https://www.instagram.com/reel/DZsrTAps_jI/",
        "https://www.instagram.com/p/DecPSQfoaRe/",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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