# Instagram Account Analytics Scraper (`automation-lab/instagram-account-post-analytics`) Actor

Collect public Instagram profile and recent-post metrics as timestamped analytics snapshots with engagement and posting KPIs.

- **URL**: https://apify.com/automation-lab/instagram-account-post-analytics.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.01 / 1,000 item extracteds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Account Analytics Scraper

Collect **Instagram account analytics** for public profiles and turn recent post activity into timestamped KPI snapshots. Each dataset row combines profile totals, recent-post engagement, observed posting frequency, and optional post-level metrics so creator, competitor, and campaign teams can compare the same accounts over time.

No Instagram login or cookies are required. The Actor uses public account data only and does not access private profiles.

### What does this Instagram analytics scraper do?

For every supplied username or public profile URL, the Actor creates one snapshot with:

- follower, following, and published-post totals;
- verification and public/private status;
- average likes, comments, and interactions across recent posts;
- median interactions to reduce the effect of one viral post;
- engagement rate normalized by current follower count;
- observed posts per week and observation-window length;
- latest observed post timestamp;
- optional recent-post URLs, captions, dates, likes, comments, and per-post engagement.

Snapshots include `snapshotAt`, making scheduled dataset exports suitable for longitudinal benchmarks.

### Who is it for?

- **Creator managers** comparing activity and visible engagement across a roster.
- **Brand and campaign teams** benchmarking public partner or competitor accounts.
- **Agencies** preparing repeatable creator qualification reports.
- **Analysts** loading consistent Instagram metrics into spreadsheets, warehouses, or dashboards.
- **Developers** adding public account benchmarks to an existing pipeline through the Apify API.

Choose [Instagram Profile Posts Scraper](https://apify.com/automation-lab/instagram-profile-posts-scraper) when you need each post as a separate dataset row or more than the latest 12 posts. Choose [Instagram Profile Stats Scraper](https://apify.com/automation-lab/instagram-profile-stats-scraper) for profile qualification filters without this Actor's timestamped posting-frequency snapshot.

### Why use account snapshots?

Raw post records require downstream grouping before they answer account-level questions. This Actor calculates a compact, comparable row per account. Running the same Task on a schedule creates observations that can be joined by `username` and ordered by `snapshotAt` to measure visible changes.

The calculations use up to 12 recent public posts returned by Instagram. They are an observed recent-post sample, not lifetime analytics or private Instagram Insights.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `usernames` | string array | `['nasa']` | Instagram usernames, with or without `@`. |
| `profileUrls` | URL array | empty | Public `instagram.com/<username>/` profile URLs. |
| `maxProfiles` | integer | `25` | Maximum unique profiles to process, from 1 to 100. |
| `maxPostsPerProfile` | integer | `12` | Recent posts used for calculations, from 1 to 12. |
| `includePostDetails` | boolean | `true` | Include the sampled posts inside each account row. |
| `proxyConfiguration` | object | Apify Proxy | Proxy configuration. Disable explicitly to request directly. |

You can combine `usernames` and `profileUrls`; duplicates are removed. Only the first `maxProfiles` unique accounts are processed.

### Getting started

1. Open the Actor input page.
2. Enter one or more real public usernames or profile URLs.
3. Keep 12 recent posts for the broadest available observation window.
4. Turn off post details if you only need compact account KPI rows.
5. Run the Actor and open **Account analytics snapshots** in the default dataset.
6. Export JSON, CSV, Excel, XML, or connect the dataset API to your pipeline.

Example input:

```json
{
  "usernames": ["nasa", "instagram"],
  "maxProfiles": 2,
  "maxPostsPerProfile": 12,
  "includePostDetails": true
}
```

### Output fields

| Field | Meaning |
| --- | --- |
| `snapshotAt` | UTC timestamp when this account snapshot was created. |
| `username`, `profileId`, `profileUrl` | Stable account identity and public URL. |
| `followersCount`, `followingCount`, `postsCount` | Public profile counters observed at run time. |
| `recentPostsAnalyzed` | Number of recent posts included in calculations. |
| `averageLikes`, `averageComments`, `averageInteractions` | Arithmetic means over sampled posts. |
| `medianInteractions` | Median of likes plus comments across sampled posts. |
| `engagementRate` | Average interactions divided by current followers, as a percentage. |
| `postsPerWeek` | Posting frequency observed between oldest and newest sampled posts. |
| `observationWindowDays` | Days covered by the sampled posts. |
| `latestPostAt` | Timestamp of the newest sampled post. |
| `recentPosts` | Optional post-level observations nested within the account snapshot row. |

Nullable KPIs mean there was not enough visible data for that calculation, for example a profile with one recent post.

### Example output

```json
{
  "recordType": "accountAnalyticsSnapshot",
  "snapshotAt": "2026-08-25T20:53:56.806Z",
  "profileId": "528817151",
  "username": "nasa",
  "fullName": "NASA",
  "profileUrl": "https://www.instagram.com/nasa/",
  "followersCount": 104428106,
  "followingCount": 92,
  "postsCount": 4891,
  "isVerified": true,
  "isPrivate": false,
  "recentPostsAnalyzed": 3,
  "averageLikes": 966248.33,
  "averageComments": 2710,
  "averageInteractions": 968958.33,
  "medianInteractions": 418678,
  "engagementRate": 0.9279,
  "postsPerWeek": 2.091,
  "observationWindowDays": 6.7,
  "latestPostAt": "2026-08-19T14:11:47.000Z"
}
```

Counts change over time. The example demonstrates the output shape rather than promising current values.

### How much does it cost to analyze Instagram accounts?

Pricing has two events: a **$0.002 start fee per run** and one account-snapshot event per useful account row. The current BRONZE account price is **$0.00168 per snapshot**, with lower rates on higher platform tiers. Failed, private, missing, or duplicate accounts do not produce an account charge.

At BRONZE rates:

| Useful snapshots | BRONZE event-price calculation |
| ---: | ---: |
| 1 | 0.002 + (1 × 0.00168) = 0.00368 USD |
| 10 | 0.002 + (10 × 0.00168) = 0.0188 USD |
| 100 | 0.002 + (100 × 0.00168) = 0.170 USD |

Apify platform usage and proxy costs may also apply according to your plan. Batch accounts into one run when practical because the start event is charged once per run.

### Schedule recurring creator benchmarks

Save the input as an Apify Task and add a daily, weekly, or monthly schedule. Export each run's dataset to a warehouse or append it to a table keyed by `username` and `snapshotAt`. This supports trend charts for follower totals, posting frequency, and visible engagement without claiming private historical data.

Use a consistent `maxPostsPerProfile` across runs to keep the sample definition comparable. A change in the posts visible from Instagram can still affect the observation window.

### Integrations

Common workflows include:

- send every completed dataset to Google Sheets through Make or Zapier;
- load JSON or CSV into BigQuery, Snowflake, or a data lake;
- trigger a webhook when a scheduled benchmark finishes;
- compare snapshots in Python or a BI dashboard;
- enrich an approved creator roster with current public signals.

Apify datasets provide pagination and multiple export formats without changing Actor output.

### API usage with cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~instagram-account-post-analytics/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"usernames":["nasa"],"maxPostsPerProfile":12}'
```

Use the returned run ID to inspect status and follow `defaultDatasetId` when the run succeeds.

### API usage with JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/instagram-account-post-analytics').call({
  usernames: ['nasa', 'instagram'],
  maxPostsPerProfile: 12,
  includePostDetails: false,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### API usage with Python

```python
from apify_client import ApifyClient

client = ApifyClient(token='YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/instagram-account-post-analytics').call(run_input={
    'profileUrls': [{'url': 'https://www.instagram.com/nasa/'}],
    'maxPostsPerProfile': 12,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

Store tokens in environment variables or a secret manager rather than source code.

### Use with Apify MCP

**Claude Code setup:**

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/instagram-account-post-analytics"
```

**Claude Desktop, Cursor, and VS Code setup:**

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/instagram-account-post-analytics"
    }
  }
}
```

Example prompts:

- “Run Instagram account analytics for nasa and instagram and summarize engagement differences.”
- “Create a compact snapshot for this list of public profile URLs without post details.”
- “Export the completed account benchmark dataset as CSV.”

### Accuracy and limitations

- Only anonymous public profile data is supported; private, restricted, removed, or login-only accounts are skipped.
- Instagram may rate-limit or change its public response shape. The Actor retries bounded transient failures and reports failed accounts in logs.
- Up to 12 recent posts per profile are available from the selected public surface.
- Likes and comments are visible source counters, not private reach, saves, impressions, or audience demographics.
- `postsPerWeek` describes the sampled observation window. It is not a lifetime posting average.
- Follower-normalized engagement uses the follower count at snapshot time, not the historical count at each post date.
- Successful account rows are preserved when another account in the batch fails; the run fails only if no usable public profile is returned.

### Legality and responsible use

Collect only public data that you are authorized to process. Follow Instagram's terms, Apify's policies, applicable privacy and data-protection law, and your organization's retention rules. Do not use the Actor for harassment, sensitive profiling, access control, or attempts to bypass private-account protections. Avoid making consequential decisions from one public engagement metric without suitable review and context.

### Troubleshooting

**The Actor returned “no usable public profiles.”** Check spelling and confirm the profile is currently public in an anonymous browser. Run a small real account input and leave Apify Proxy enabled.

**Some accounts are missing from the dataset.** Review logs for private, removed, restricted, or temporarily rate-limited profiles. Failed accounts are not charged as account snapshots.

**Posting frequency is null.** At least two valid recent posts are needed to calculate an observed time span.

**The engagement rate differs from another tool.** Confirm the formula and sample. This Actor uses average visible likes plus comments across the selected recent posts divided by current followers.

### FAQ

#### Does this require an Instagram login?

No. It uses anonymous public profile data and does not accept Instagram credentials.

#### Can it scrape private profiles?

No. Private-account protections are intentionally respected.

#### Does it provide historical analytics?

It does not reconstruct private history. Each run is a timestamped current snapshot. Schedule recurring runs to build your own permitted observation series.

#### Are post details billed separately?

No. Optional sampled post details are included within the account snapshot price.

#### Can I process profile URLs and usernames together?

Yes. Both inputs are normalized and deduplicated before the `maxProfiles` limit is applied.

### Related Automation Lab Actors

- [Instagram Profile Posts Scraper](https://apify.com/automation-lab/instagram-profile-posts-scraper) — separate post rows and deeper post export.
- [Instagram Profile Stats Scraper](https://apify.com/automation-lab/instagram-profile-stats-scraper) — profile qualification and summary filters.
- [Instagram Post & Reel Details Scraper](https://apify.com/automation-lab/instagram-post-reel-details-scraper) — enrich supplied post and Reel URLs.
- [Instagram Hashtag Analytics Scraper](https://apify.com/automation-lab/instagram-hashtag-analytics) — hashtag-level samples and aggregate campaign metrics.

# Actor input Schema

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

Public account usernames, with or without @.

## `profileUrls` (type: `array`):

Optional public instagram.com profile URLs. URLs and usernames can be combined.

## `maxProfiles` (type: `integer`):

Maximum number of unique account snapshots to produce.

## `maxPostsPerProfile` (type: `integer`):

Number of recent public posts used to calculate account KPIs.

## `includePostDetails` (type: `boolean`):

Include recent post URLs, timestamps, likes, comments, interactions, and engagement rates in each snapshot.

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

Apify Proxy is enabled by default for reliable public profile requests.

## Actor input object example

```json
{
  "usernames": [
    "nasa",
    "instagram"
  ],
  "profileUrls": [
    {
      "url": "https://www.instagram.com/nasa/"
    }
  ],
  "maxProfiles": 25,
  "maxPostsPerProfile": 12,
  "includePostDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Open the default dataset table containing one timestamped analytics snapshot per successfully processed public account

# 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",
        "instagram"
    ],
    "profileUrls": [
        {
            "url": "https://www.instagram.com/nasa/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/instagram-account-post-analytics").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",
        "instagram",
    ],
    "profileUrls": [{ "url": "https://www.instagram.com/nasa/" }],
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/instagram-account-post-analytics").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": [
    "nasa",
    "instagram"
  ],
  "profileUrls": [
    {
      "url": "https://www.instagram.com/nasa/"
    }
  ]
}' |
apify call automation-lab/instagram-account-post-analytics --silent --output-dataset

```

## MCP server setup

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

```

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/rVi83rZxvgcFH92N5/builds/W8J8JSCBVz8QeAg2B/openapi.json
