# EngagementAnalyzer IG (`edgeofcali/ig-engagement-analyzer`) Actor

EngagementAnalyzer IG — high-performance Apify actor.

- **URL**: https://apify.com/edgeofcali/ig-engagement-analyzer.md
- **Developed by:** [Edward Martinez](https://apify.com/edgeofcali) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## 📊 EngagementAnalyzer IG

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-brightgreen)](https://apify.com)
[![Platform](https://img.shields.io/badge/Platform-Instagram-E1306C)](https://instagram.com)
[![Category](https://img.shields.io/badge/Category-Analytics-blue)](https://apify.com/store)
[![Node](https://img.shields.io/badge/Node-20%2B-green)](https://nodejs.org)
[![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)

> **Go beyond vanity metrics.** EngagementAnalyzer IG calculates deep engagement quality for any Instagram profile — including comment authenticity, like velocity, saves estimation, fake engagement detection, and niche benchmarking.

***

### 🚀 What It Does

Most Instagram analytics tools only report a single engagement rate number. **EngagementAnalyzer IG** digs deeper:

- **Real Engagement Rate** — strips out fake/bot interactions for a true picture
- **Comment Quality Score** — measures depth and authenticity of comments (not just count)
- **Like Velocity** — how fast likes arrive (high velocity = viral / authentic audience)
- **Saves Estimate** — infers saves from engagement patterns (saves indicate genuine interest)
- **Fake Engagement Detection** — algorithmic detection of bot likes, generic comments, and suspicious patterns
- **Niche Percentile** — benchmarks the account against its tier (nano / micro / mid / macro / mega)
- **Best Post Type & Time** — identifies what content format and posting schedule drives most engagement
- **AI Engagement Score** — composite 0–10 quality score
- **AI Insight** — one-sentence computed insight per post

***

### 🎯 Use Cases

| Use Case | Who It's For |
|---|---|
| Influencer vetting for brand deals | Marketing teams, agencies |
| Competitor engagement benchmarking | Social media managers |
| Detecting influencer fraud | Brands before paying sponsorships |
| Content strategy optimization | Creators, managers |
| Audience quality assessment | Investor due diligence |
| Platform trend analysis | Researchers, analysts |

***

### 📥 Input Fields

| Field | Type | Default | Description |
|---|---|---|---|
| `username` | string | *(required)* | Instagram username to analyze (with or without @) |
| `maxPosts` | number | `12` | Maximum number of posts to analyze (1–50) |
| `includeSaves` | boolean | `true` | Estimate saves from engagement patterns |
| `detectFakeEngagement` | boolean | `true` | Run fake engagement detection algorithm |
| `benchmarkAgainstNiche` | boolean | `true` | Compare against niche tier benchmarks |

***

### 📤 Output Fields

| Field | Type | Description |
|---|---|---|
| `url` | string | Post or profile URL analyzed |
| `scrapedAt` | string | ISO 8601 timestamp of scrape |
| `actorVersion` | string | Actor version (e.g. 0.1.0) |
| `avgEngagementRate` | number | Raw engagement rate % (likes+comments / followers) |
| `realEngagementRate` | number | Engagement rate adjusted for fake activity |
| `commentQualityScore` | number | Comment depth & authenticity score (0–10) |
| `likeVelocity` | number | Average likes per hour since posting |
| `savesEstimate` | number | Estimated number of saves |
| `fakeEngagementPercent` | number | Estimated % of engagement that is fake/bot |
| `nichePercentile` | number | Percentile ranking within account's tier |
| `bestPostType` | string | Best performing content type (feed/carousel/reel) |
| `bestPostTime` | string | Best day and time for posting |
| `aiEngagementScore` | number | Composite AI quality score 0–10 |
| `aiInsight` | string | One-sentence computed insight about this record |
| `aiScore` | number | Overall relevance/quality score 0–10 |

***

### 📦 Example Output

```json
{
  "url": "https://www.instagram.com/p/ABC123xyz/",
  "scrapedAt": "2024-07-15T10:32:41.000Z",
  "actorVersion": "0.1.0",
  "avgEngagementRate": 4.72,
  "realEngagementRate": 3.89,
  "commentQualityScore": 7.2,
  "likeVelocity": 342,
  "savesEstimate": 1240,
  "fakeEngagementPercent": 17.5,
  "nichePercentile": 82,
  "bestPostType": "carousel",
  "bestPostTime": "Tuesday 6:00 PM",
  "aiEngagementScore": 7.8,
  "aiInsight": "Top-tier performer in their niche (82nd percentile) with 4.72% engagement rate — carousel posts at Tuesday 6:00 PM drive the best results.",
  "aiScore": 7.8
}
```

***

### 🔍 How Fake Engagement Is Detected

The actor uses a multi-signal algorithm:

1. **Engagement Rate Anomaly** — suspiciously high ER for large accounts flags potential bought likes
2. **Comment-to-Like Ratio** — very low ratio suggests purchased likes without organic interaction
3. **Comment Generic Score** — high proportion of single-word/emoji comments ("nice!", "❤️", "🔥") indicates bot activity
4. **Velocity Pattern** — unnaturally uniform like velocity can indicate drip-purchased engagement

***

### 🧮 Engagement Tier Benchmarks

| Tier | Follower Range | Avg Engagement Rate |
|---|---|---|
| Nano | < 1K | 5.5% |
| Micro | 1K – 10K | 3.8% |
| Mid | 10K – 100K | 2.4% |
| Macro | 100K – 1M | 1.8% |
| Mega | 1M+ | 1.2% |

***

### ⚙️ Technical Details

- Built with **Crawlee PlaywrightCrawler** for robust JavaScript-rendered page scraping
- Uses **residential proxies** to avoid Instagram rate limiting
- Implements **random delays** (800–2000ms) between requests
- **Stealth mode** to bypass bot detection
- Automatic **scroll-based pagination** to load all posts
- **Zod schema validation** on every output record
- Pushes both per-post records AND an aggregated summary record

***

### 💡 Tips

- Start with `maxPosts: 12` for a fast initial analysis (1–2 min)
- Use `maxPosts: 30+` for a comprehensive historical audit
- The final record in the dataset with `#summary` in the URL contains aggregated metrics across all posts
- Compare multiple accounts by running the actor in sequence and using the `nichePercentile` field

***

### ⚠️ Disclaimer

This actor is for analytical and research purposes only. Always comply with Instagram's Terms of Service. Fake engagement percentages are estimates based on heuristic signals, not absolute measurements.

# Actor input Schema

## `startUrls` (type: `array`):

List of URLs to start scraping from.

## `maxItems` (type: `integer`):

Maximum number of results to return.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxItems": 50
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("edgeofcali/ig-engagement-analyzer").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 = { "startUrls": [{ "url": "https://apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("edgeofcali/ig-engagement-analyzer").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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ]
}' |
apify call edgeofcali/ig-engagement-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,edgeofcali/ig-engagement-analyzer"
        }
    }
}
```

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/RaNUhVE9fzX5KYWx1/builds/tNTS3zViOlYUUDgcZ/openapi.json
