# Instagram Post & Reel Stats + Campaign Report (`getdataforu/instagram-post-stats`) Actor

Likes, comments, author, date and caption for any list of Instagram posts and reels, with engagement rate and a campaign report. No login needed.

- **URL**: https://apify.com/getdataforu/instagram-post-stats.md
- **Developed by:** [EMT Crawler](https://apify.com/getdataforu) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 post checkeds

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 & Reel Stats + Campaign Report

Paste a list of Instagram post and reel links. Get back **likes, comments, author, posting date and the full caption** for each — plus the author's follower count, an **engagement rate**, and a campaign report you can send straight to a client.

No login, no Instagram account, no cookies.

### What it's for

- **Influencer campaign reporting** — you paid 20 creators to post; paste their 20 links and get total likes, comments, engagement and cost per interaction in one run.
- **Creator vetting** — compare engagement rates across creators before you book them.
- **Competitor content tracking** — re-run on a rival brand's posts and see which formats perform.
- **Content research** — export captions, hashtags and mentions of top-performing posts.

### What you get for each post

| | |
|---|---|
| **Performance** | Likes, comments, engagement rate (likes + comments ÷ followers) |
| **Author** | Username, display name, follower count, profile link |
| **Content** | Full caption, hashtags, mentions, post type (post or reel) |
| **Timing** | Posting date |
| **Media** | Cover image |

### The campaign report

Every run writes a **`CAMPAIGN_REPORT`** to the key-value store. Real output from a test run on four NASA-family posts with a $5,000 budget:

```json
{
  "postsFound": 4,
  "totals": { "likes": 1491000, "comments": 7620, "interactions": 1498620, "followersReached": 109736000 },
  "engagementRate": 0.0137,
  "countsApproximate": true,
  "budget": {
    "total": 5000,
    "currency": "USD",
    "costPerPost": 1250,
    "costPerInteraction": 0.003336,
    "costPerThousandFollowersReached": 0.04556
  },
  "failed": [
    { "input": "https://www.instagram.com/p/ZZzz9nonexist1/", "error": "Instagram post not found - deleted, private, or a mistyped link" }
  ]
}
```

It also lists the top posts by likes and by engagement rate, and a per-creator breakdown.

### Read this first: what Instagram shows logged-out visitors

| Figure | What you get |
|---|---|
| **Likes** | Exact below 10,000; rounded above it (`234K`, `1M`) — flagged by `likesExact` |
| **Comments** | Exact below 10,000; rounded above it — flagged by `commentsExact` |
| **Reel views** | **Not available.** Instagram does not publish them without a login. |
| **Follower counts** | Exact below 10,000; rounded above it |

Because views are not public, engagement here is measured against **followers**, the standard metric agencies use for Instagram. When any post in a run has rounded counts, the report sets `countsApproximate: true`.

### Input

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DeAYvsnn4la/",
    "https://www.instagram.com/reel/DeCPVhERA8e/"
  ],
  "campaignBudget": 5000,
  "currency": "USD"
}
```

| Field | Default | Notes |
|---|---|---|
| `postUrls` | — | **Required.** Post, reel or IGTV links. Links containing the username and tracking parameters both work. Duplicates are removed. |
| `includeAuthorFollowers` | `true` | Look up each author once to add follower counts and engagement rate. |
| `campaignBudget` | — | Optional total spend. Adds cost per post, per interaction and per 1,000 followers reached. |
| `currency` | `USD` | Label for the budget. |
| `maxConcurrency` | `10` | Posts fetched in parallel. |

### Speed and cost

Measured: **36 posts from 11 accounts in 31 seconds, with no retries.** The actor reads only the top ~15% of each page, where Instagram keeps the post summary, and looks up each author just once however many of their posts you include.

### You only pay for posts that load

Deleted, private and mistyped links are never written to the dataset, so they are never charged. They are listed with the reason in `CAMPAIGN_REPORT.failed`.

### Limitations

- Private accounts' posts cannot be read without logging in.
- Instagram may hide like counts on some posts; those rows have `likesHidden: true` and `likes: null`.
- Large counts are rounded by Instagram itself, so totals that include them are approximate.

### Legal

Reads only what Instagram shows any visitor without logging in. You are responsible for how you use the data.

# Actor input Schema

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

Instagram post, reel or IGTV links, one per line. Links with the username in them and tracking parameters both work. Duplicates are removed automatically.

## `includeAuthorFollowers` (type: `boolean`):

Look up each author's follower count once and add an engagement rate (likes + comments / followers) to every post. Needed for the cost-per-reach figures in the campaign report.

## `campaignBudget` (type: `integer`):

What you paid for these posts in total. When set, the report adds cost per post, cost per interaction and cost per 1,000 followers reached.

## `currency` (type: `string`):

Currency of the budget. Only used as a label.

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

Each post is fetched through its own proxy IP.

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

Residential proxies are used by default.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DeAYvsnn4la/",
    "https://www.instagram.com/reel/DeCPVhERA8e/"
  ],
  "includeAuthorFollowers": true,
  "currency": "USD",
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

Every post that loaded: likes, comments, author and follower count, engagement rate, posting date, caption, hashtags and mentions.

## `campaignReport` (type: `string`):

Totals, engagement rate, top posts, a per-creator breakdown, cost metrics when a budget is given, and links that failed.

# 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/DeAYvsnn4la/",
        "https://www.instagram.com/reel/DeCPVhERA8e/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforu/instagram-post-stats").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/DeAYvsnn4la/",
        "https://www.instagram.com/reel/DeCPVhERA8e/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("getdataforu/instagram-post-stats").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/DeAYvsnn4la/",
    "https://www.instagram.com/reel/DeCPVhERA8e/"
  ]
}' |
apify call getdataforu/instagram-post-stats --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,getdataforu/instagram-post-stats"
        }
    }
}
```

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/StWhk1VtBPwNPQg2n/builds/pCcWCDmhDeTWDDefp/openapi.json
