# Instagram Engagement Tool (`datascrapers/instagram-engagement-tool`) Actor

Analyze public Instagram profiles: followers, recent posts, and image/video engagement rates. Provide profile URLs and receive structured JSON profile records.

- **URL**: https://apify.com/datascrapers/instagram-engagement-tool.md
- **Developed by:** [Data Scrapers](https://apify.com/datascrapers) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 dataset items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Engagement Tool** creates a structured dataset of public Instagram profile engagement. Each dataset item can include the username, follower count, and image and video engagement rates from the recent posts it reads. Query the source with usernames or profile URLs, control how many profiles and posts are read, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![Instagram Engagement Tool — input to structured data](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/instagram-engagement-tool/instagram-engagement-tool-value-demo.gif)](https://apify.com/datascrapers/instagram-engagement-tool)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | instagram.com |
| Record unit | One public profile |
| Input methods | usernames, urls |
| Main identifiers | username, url |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML |
| Update model | Fresh records per Actor run |
| Pricing | $1.00 per 1,000 charged posts |

### Coverage and available records

Pass public usernames or profile URLs. One row is one profile. postsPerUser sets how many recent posts are used for the rates. The stored NASA profile has 104,404,626 followers, an image engagement rate of about 3.07, and a video engagement rate of about 0.31, from 5 analyzed posts.

The Actor charges dataset-item once per analyzed post. If a profile has no posts, it charges one event. maxItems limits profiles. The Actor does not follow, message, or log into a private account.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| username | string | no | Profile handle. Use this field to deduplicate. | nasa |
| url | string | yes | Profile URL. | https://www.instagram.com/nasa/ |
| full_name | string | yes | Name shown on the profile. | NASA |
| followers | number | yes | Follower count. | 104404626 |
| follows | number | yes | Following count. | 92 |
| is_verified | boolean | yes | Verified flag. | true |
| is_business_account | boolean | yes | Business-account flag. | true |
| images_engagement | number | yes | Image engagement rate from the posts read. | 3.0716407144641273 |
| videos_engagement | number | yes | Video engagement rate from the posts read. | 0.31035981106814176 |
| posts_analyzed | number | yes | Posts used for the rates. | 5 |
| images_uploaded | number | yes | Image count shown on the profile. | 4882 |
| videos_uploaded | number | yes | Video count shown on the profile. | 171 |

### Example dataset record

```json
{
  "username": "nasa",
  "url": "https://www.instagram.com/nasa/",
  "full_name": "NASA",
  "followers": 104404626,
  "follows": 92,
  "is_verified": true,
  "images_engagement": 3.0716407144641273,
  "videos_engagement": 0.31035981106814176,
  "posts_analyzed": 5
}
```

This is the stored public NASA profile. Business email and phone were empty on that row.

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---:|---|---|---|
| usernames | array | no | empty | handles | Instagram usernames. |
| urls | array | no | empty | profile URLs | Profile URLs. |
| postsPerUser | integer | no | 30 | positive integer | Recent posts used for rates. |
| maxItems | integer | no | 0 | integer | Profile cap. |
| max_concurrency | integer | no | 10 | positive integer | Parallel profile reads. |
| proxyConfiguration | object | no | Apify residential | Apify proxy input | Optional proxy. |

Minimal request:

```json
{"usernames": ["nasa"], "postsPerUser": 5, "maxItems": 1}
```

### Retrieve the data through the API

Start the Actor with JSON input, wait for the run, then read the default dataset.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/instagram-engagement-tool").call(run_input={
    "usernames": ["nasa"],
    "postsPerUser": 5,
    "maxItems": 1,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["username"], item.get("images_engagement"))
```

### Data quality and record handling

Deduplicate on username. Rates are calculated from the posts read in that run, not from the full history. followers is the count at request time. A private profile does not produce a public engagement row.

### Pricing and cost examples

Pay per event. dataset-item is $1.00 per 1,000 charged posts on every plan. One profile with 5 analyzed posts is 5 events. Apify platform usage is billed separately. Analyzing 1,000 posts costs $1.00 in event fees, plus platform usage.

### Limitations and responsible data use

The Actor reads public profiles. It does not follow or message anyone. Instagram can withhold a profile. Use the data in line with Instagram terms.

### Dataset questions

#### What is one record?

One public profile, keyed by username.

#### Which field should I use to deduplicate?

username.

#### What does one charge cover?

One analyzed post. A profile with no posts is one charge.

### Related datasets from Data Scrapers

- [Instagram Hashtag Scraper](https://apify.com/datascrapers/instagram-hashtag-scraper)
- [Instagram Email Scraper](https://apify.com/datascrapers/instagram-email-scraper)
- [YouTube Channel Scraper](https://apify.com/datascrapers/youtube-channel-scraper)
- [Reddit Scraper](https://apify.com/datascrapers/reddit-scraper)

### Data Scrapers support

Questions about this dataset: stardustspotlight@gmail.com.

# Actor input Schema

## `urls` (type: `array`):

Instagram profile URLs to analyze, e.g. https://www.instagram.com/nasa/. Optional when usernames is set.

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

Instagram usernames to analyze, e.g. nasa or cristiano. Do not include the @ prefix.

## `postsPerUser` (type: `integer`):

How many recent posts to use when calculating engagement rates (0 = all available). Typical values: 12, 30, or 100. You are charged one dataset-item event per post analyzed across all profiles, not per profile row.

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

Maximum number of profiles to analyze (0 = unlimited).

## `max_concurrency` (type: `integer`):

Maximum number of profiles to process at the same time.

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

Proxy settings. Apify Residential proxies are required for reliable Instagram access.

## Actor input object example

```json
{
  "urls": [
    "https://www.instagram.com/nasa/"
  ],
  "usernames": [
    "nasa"
  ],
  "postsPerUser": 30,
  "maxItems": 0,
  "max_concurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

JSON array of analyzed Instagram profiles

## `runStats` (type: `string`):

Record count and timestamps for this run

# 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 = {
    "urls": [
        "https://www.instagram.com/nasa/"
    ],
    "usernames": [
        "nasa"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/instagram-engagement-tool").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 = {
    "urls": ["https://www.instagram.com/nasa/"],
    "usernames": ["nasa"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/instagram-engagement-tool").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 '{
  "urls": [
    "https://www.instagram.com/nasa/"
  ],
  "usernames": [
    "nasa"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call datascrapers/instagram-engagement-tool --silent --output-dataset

```

## MCP server setup

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

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/2PXYnPw0ArKcOvoO6/builds/Duyrv5KKOrQSD7Wri/openapi.json
