# Instagram Posts Scraper: Captions, Likes, Media (`kaleidoscopelabs/instagram-post-scraper`) Actor

Get Instagram posts: accounts' newest posts or posts by link, each with its caption, hashtags, mentions, date, likes, comments count, images, video link, location and tagged accounts. No login; a post that does not exist is stored as not found and not charged.

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

## Pricing

from $0.35 / 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

**Scrape Instagram posts**: give this Instagram Posts Scraper accounts or post links and get each post as a clean record, with caption, hashtags, mentions, date, likes, comments count, images, video link, location and tagged accounts.

[![Use it from your AI agent: copy the MCP setup prompt](https://assets.kaleidoscopelabs.io/afy/mcp/mcp-setup.5ac6bded.png)](https://mcp.apify.com/?tools=kaleidoscopelabs/instagram-post-scraper)

![The newest 12 posts of UNICEF and NASA, pins older than a week left out, each at the time it was published and as tall as its likes; NASA's most liked has 577,528 likes.](https://assets.kaleidoscopelabs.io/afy/ig-posts/hero.6637799e.png)

- 📄 Read the newest posts of public Instagram accounts, or the posts since a date
- 🔗 Read single posts and reels by their link
- 📊 Get each post's likes, comments count, publishing date, every image of a carousel and the video link
- 🔔 Monitor accounts on a schedule and get only the posts you have not had before
- ✅ Know what the run read: which accounts and posts do not exist, and what any record lacks

No Instagram account or login is needed: the Actor reads what Instagram shows a visitor who is not signed in.

### What data do you get from Instagram posts?

One record per post. The fields you decide on:

| Field | What it is |
|---|---|
| `shortCode`, `url`, `id` | The post's code, its address and Instagram's ID |
| `ownerUsername`, `ownerFullName`, `ownerId`, `ownerVerified` | The account that owns the post |
| `publishedAt` | When it was published, in UTC |
| `createdAt` | When the post was made on Instagram, read from its ID: within minutes of publishing, earlier for a post prepared ahead |
| `type`, `productType` | `photo`, `video` or `carousel`; Instagram's own kind (`feed`, `clips` for a reel) |
| `caption`, `hashtags`, `mentions` | The caption as posted, and the hashtags and accounts it names |
| `likesCount`, `commentsCount` | Likes and comments at the time of the run; `countsHidden` says the owner hides the like count |
| `latestComments` | The first comments the post shows, about ten to a dozen, each with its text, author, time and likes |
| `displayUrl`, `images`, `videoUrl`, `videoDuration` | The image or video cover, every image of a carousel, the video file and its length in seconds |
| `childPosts` | A carousel's items, each with its kind, image, video and tagged accounts |
| `location`, `taggedUsers`, `coauthors`, `audio` | The place, the accounts tagged, the coauthors, a reel's sound |
| `alt` | Instagram's description of the image for screen readers |
| `listedBy` | The account whose list gave the post; empty for a post asked by link |
| `missing` | The parts this record lacks, each with its reason; empty when nothing is missing |
| `scrapedAt` | When the run read the post |

Every field is described in the dataset schema.

### What can you use Instagram posts for?

- **Track competitors' and clients' accounts:** schedule a run with `mode` set to `new` and each run stores only the posts that appeared since the last one.
- **Report on a period:** every post of a list of accounts since a date, with likes and comments, for a weekly or monthly report.
- **Benchmark content:** compare likes and comments across accounts, post kinds and hashtags.
- **Feed posts into your own tools:** rows for a sheet, a database, a dashboard or an AI pipeline.

### How to scrape Instagram posts

1. Create a free Apify account and open this Actor.
2. Enter accounts, one per line: a username (`unicef`), with or without `@`, or a profile link. Or paste post links.
3. Choose how many posts to read from each account, and a date if you only want recent posts.
4. Click **Start**. Download the posts as JSON, CSV or Excel, or read them through the API.

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

You pay per post stored: **$1.50 per 1,000 posts with details** (a post at $0.50 per 1,000 plus its details at $1.00 per 1,000), or **$0.50 per 1,000 posts without details** (`postDetails: false`: caption, kind, image and `createdAt`, no likes or publishing date). Posts asked for by link always come with details. A monitor (`mode: new`) also charges a check of **$0.002 per account** in each run, whether the account has new posts or not. Beside these there is only the platform's start event ($0.00005 a run); a date costs nothing extra. Prices shown are for Apify's free plan; on paid plans they are up to 30% lower.

| What you run | Posts | Checks | Cost |
|---|---|---|---|
| The newest 12 posts of one account, with details | 12 | – | $0.018 |
| The last 7 days of 25 accounts, about 10 posts each, with details | 250 | – | $0.375 |
| The newest 100 posts of 100 accounts, without details | 10,000 | – | $5.00 |
| A monitor of 20 accounts, once a day for a month, with details: 400 posts in its first run (20 an account), then about 30 new posts a day | 1,300 | 600 | $3.15 |
| The same monitor, every hour | 1,300 | 14,400 | $30.79 |

An account or a post that does not exist and a post Instagram does not show without signing in are not charged. A monitor that runs daily costs $0.06 a month per account in checks; hourly, $1.44. A run stops before your maximum charge.

### Input

**The newest posts of a few accounts**

```json
{
  "usernames": ["unicef", "https://www.instagram.com/nasa/"],
  "postsPerProfile": 12
}
```

**Everything published in the last 7 days**

```json
{
  "usernames": ["unicef"],
  "postsPerProfile": 100,
  "newerThan": "7 days"
}
```

**Only new posts, on a schedule (a monitor)**

```json
{
  "usernames": ["unicef", "nasa"],
  "postsPerProfile": 20,
  "mode": "new"
}
```

**Posts by link**

```json
{
  "postUrls": ["https://www.instagram.com/p/DfYzj5tjJB9/"]
}
```

### Output

![One post record, shortened: the post and its account, its caption, kind and media, likes, comments and the first comments, and what it lacks.](https://assets.kaleidoscopelabs.io/afy/ig-posts/record.17e79166.png)

One post asked by link, shortened (the comment's text and author left out here):

```json
{
  "recordType": "post",
  "id": "4024193034576760957",
  "shortCode": "DfYzj5tjJB9",
  "url": "https://www.instagram.com/p/DfYzj5tjJB9/",
  "type": "photo",
  "productType": "feed",
  "caption": "Imagine being thirsty, but water is just not available to you. …",
  "hashtags": ["WaterUnderFire"],
  "mentions": [],
  "alt": "Water is a basic right for children. Conflicts and violence are taking it away. Protect water, protect children.",
  "displayUrl": "https://scontent.cdninstagram.com/v/…",
  "images": ["https://scontent.cdninstagram.com/v/…"],
  "dimensionsWidth": 1080,
  "dimensionsHeight": 1350,
  "publishedAt": "2026-11-06T05:00:21Z",
  "createdAt": "2026-11-06T05:00:14Z",
  "likesCount": 5362,
  "commentsCount": 79,
  "latestComments": [
    {"id": "17911173393666518", "text": "…", "ownerUsername": "…", "ownerVerified": false, "createdAt": "2026-11-16T07:50:45Z", "likesCount": 0}
  ],
  "countsHidden": false,
  "captionEdited": false,
  "ownerUsername": "unicef",
  "ownerId": "249074882",
  "ownerFullName": "UNICEF",
  "ownerVerified": true,
  "missing": [],
  "scrapedAt": "2026-11-16T13:58:19Z"
}
```

### Monitoring: get only the new posts

With `mode` set to `new`, the Actor remembers the posts it has met for each account. The first run stores each account's newest posts as usual (`postsPerProfile`, `newerThan`); every later run stores only the posts that appeared since, up to `postsPerProfile` for each account, and nothing when there is none. When an account has more new posts than that, the log names it and the next runs store the rest. A run with nothing new ends with an empty dataset and charges only the accounts' checks.

The memory lives in a key-value store in your account named `instagram-post-monitor`, one record per account: delete a record to start that account over. Use `monitorName` to keep several monitors of the same accounts apart. A post is new when the monitor has not met it, not because it sits on top: pinned posts it has met are not stored again. A recent post that an account pins after the monitor's first run can be stored once.

### Posts since a date, without the pinned ones

![Everything one account published in the last 7 days: 16 posts by kind and hour, as large as their comments; older posts, pinned ones too, stay out.](https://assets.kaleidoscopelabs.io/afy/ig-posts/week.aa8a52ad.png)

`newerThan` takes a date (`2026-10-01`) or a span back from the run's start (`7 days`, `2 weeks`, `3 months`). With details, each post's own publishing date decides, and older posts pinned to the top of a profile are left out. Without details (`postDetails: false`) posts cost less time to read and have no `publishedAt`; they are then dated by `createdAt`.

### Integrations and the API

Run it from the Apify API or on a schedule, or let an agent call it as a tool ([below](#for-ai-agents)).

```bash
curl -X POST "https://api.apify.com/v2/acts/ACTOR_ID/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_APIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["unicef"], "newerThan": "1 day"}'
```

**Building on this Actor**

- **Output:** fields are added, never renamed or removed within a major version; every change is in the changelog.
- **What a run's end means:** a finished run read every account and post or names it in the summary (`RUN_SUMMARY` in the key-value store: `postsNotRead`, `postsNotListed`, `accountsNotFound`, and `complete`). A run that could not reach Instagram fails; it does not succeed empty. An input that cannot be read ends as succeeded with nothing read or charged, the reason in the status message and in the summary's `inputError`.
- **Cost:** one event, `post`, per stored post; one more, `post-details`, when the post has its details; with a monitor one event, `check`, per account and run. Your maximum charge holds.
- **Record-level reasons:** `missing` lists a part with the reason "notGiven" (Instagram did not give it) or "notRequested" (the input left it out). A post that does not exist has `notFound: true`.

### For AI agents

AI agents can call it through the Apify MCP server ([setup prompt for your agent](https://mcp.apify.com/?tools=kaleidoscopelabs/instagram-post-scraper)). Minimal input: `{"usernames": ["<username>"], "postsPerProfile": 12}`, or `{"postUrls": ["<post link>"]}`. Add `newerThan` (a date or a span such as `7 days`) for recent posts only. Read `caption`, `publishedAt`, `url`, `type`, `likesCount`, `commentsCount` and `ownerUsername`. An empty dataset with `complete: true` in `RUN_SUMMARY` means there are no posts for the input; `accountsNotFound` there lists usernames with no public account. A record's `missing` names any part it lacks.

### Tips

- Try one account with `postsPerProfile: 12` first: it costs $0.018.
- For captions and images alone, turn `postDetails` off: a third of the price, and much faster.
- A span (`7 days`) counts back from the run's start. To track accounts on a schedule use `mode: "new"` instead: it goes by the posts it has met, not by the clock, so runs that come late or overlap neither repeat nor skip posts.
- An account's list also holds posts it coauthors: `ownerUsername` is the owner, `listedBy` the account you asked for. A post that two accounts of your input coauthor is stored once.
- Media addresses are Instagram's own and expire: download what you need to keep.

Did it save you time? A rating on this page helps others find it; an Issue tells us what to fix.

### FAQ

**Is there an official Instagram API for posts?** Meta's Instagram Graph API gives an account's posts to apps the account has authorised, and limited public data of other professional (business and creator) accounts to apps that hold its permissions. This Actor needs neither: it reads what a public account shows any visitor.

**Why does an account return nothing?** Private accounts show no posts to visitors. An account that does not exist, or is not shown to a visitor who is not signed in, is named in `accountsNotFound`, and nothing is charged for it.

**How long does a run take?** Accounts are read in parallel: about 1,000 posts with details across many accounts take a few minutes. One account's long history takes longer, because its list is read 12 posts at a time.

**Can it skip pinned posts?** It does by itself: pinned posts a week or more older than the account's newest are left out, and `postsPerProfile` counts the newest posts past them. With `newerThan`, each post's date decides. The posts list the Actor reads for a visitor who is not signed in does not mark pinned posts, so there is no pinned field.

**Is it legal to scrape Instagram posts?** The Actor reads only what accounts publish to everyone. How you use the data is your responsibility: follow the laws that apply to you, including copyright and data protection law.

**Does it collect personal data?** Posts can name or show people: captions, comments and their authors, mentions, tagged accounts, the owner's name and the media. If you process personal data, you need a lawful basis under GDPR, KVKK or the law that applies to you.

### Limits

- Public accounts only, as shown to a visitor who is not signed in. Private accounts, stories and posts shown only to signed-in visitors are not read.
- A post's first comments, about ten to a dozen, are collected, not all of them.
- Counts are what Instagram shows at the time of the run.
- Up to 1,000 accounts and 1,000 post links a run.

### Support and feedback

Open an Issue on the Actor's page: we answer within 24 hours. If the Actor is useful to you, a bookmark helps others find it.

### Other Actors

| Actor | Use it with this one to |
|---|---|
| [Instagram Profile Scraper: Followers, Bio, Links](https://apify.com/kaleidoscopelabs/instagram-profile-scraper) | Get the same accounts' followers, posts count, biography and links, one record per account |

*Instagram Posts Scraper is an independent tool, not affiliated with, endorsed by or sponsored by Instagram, LLC or Meta Platforms, Inc. Instagram is a trademark of Instagram, LLC.*

# Changelog

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

# Actor input Schema

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

One account per line: its username, with or without @, or its link (`instagram.com/<username>/`). Its newest posts are read, up to Posts per account.

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

One post per line: its link (instagram.com/p/…, /reel/… or /reels/…) or its code. A line that is none of these is skipped and said in the log.

## `postsPerProfile` (type: `integer`):

How many of each account's newest posts to read.

## `newerThan` (type: `string`):

Only accounts' posts published on or after this day (UTC): a date, or a span back from now such as 7 days. Pinned older posts are left out. Posts by link are not filtered. With Post details off, a post is dated by when it was made on Instagram, which for a post prepared ahead is before its publishing.

## `postDetails` (type: `boolean`):

On: each post with its date, likes, comments count, every image, video link, location and tagged accounts, charged as post details on top of the post. Off: accounts' posts as their lists give them (caption, kind, one image, the time the post was made), faster and at the post's price alone; what is left out is named in each record's missing field. Posts by link always come with details.

## `mode` (type: `string`):

All posts asked for, or only new posts: the accounts' posts that this monitor has not stored in an earlier run. The first run of a monitor stores the posts as All does and remembers them; each later run stores the posts that appeared since, up to Posts per account for each account (the rest come with the next run), and nothing when there is none. Schedule it to track accounts. Each run charges one check per account, and each new post as a post. For accounts only, not post links.

## `monitorName` (type: `string`):

A name for this monitor, when you run several over the same accounts: each name remembers on its own, such as daily-brands. Letters, digits, hyphens and underscores, at most 40. The memory is kept in your account's key-value store instagram-post-monitor, one record per account; delete a record to start that account afresh.

## Actor input object example

```json
{
  "usernames": [
    "exampleorg"
  ],
  "postUrls": [
    "https://www.instagram.com/p/ABC123xyz_-/"
  ],
  "postsPerProfile": 3,
  "postDetails": true,
  "mode": "all"
}
```

# Actor output Schema

## `results` (type: `string`):

The posts in the run's default dataset.

# 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": [
        "unicef"
    ],
    "postUrls": [],
    "postsPerProfile": 3,
    "mode": "all"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kaleidoscopelabs/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 = {
    "usernames": ["unicef"],
    "postUrls": [],
    "postsPerProfile": 3,
    "mode": "all",
}

# Run the Actor and wait for it to finish
run = client.actor("kaleidoscopelabs/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 '{
  "usernames": [
    "unicef"
  ],
  "postUrls": [],
  "postsPerProfile": 3,
  "mode": "all"
}' |
apify call kaleidoscopelabs/instagram-post-scraper --silent --output-dataset

```

## MCP server setup

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