# Instagram Likes Scraper - Counts + Advanced Likers (`khadinakbar/instagram-likes-scraper`) Actor

Scrape Instagram post/reel like counts and engagement metadata with ScrapeCreators primary and SociaVault fallback, plus advanced cookie-based liker profiles when needed. MCP/API-ready.

- **URL**: https://apify.com/khadinakbar/instagram-likes-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Lead generation, MCP servers
- **Stats:** 11 total users, 5 monthly users, 84.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 post like metrics scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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 Likes Scraper - Counts + Advanced Likers

This Apify Actor helps social media, lead generation, and MCP workflows collect Instagram post and reel like metrics from one or more accepted URLs. It accepts `postUrls` or `startUrls`, and each input record represents one Instagram post, reel, or TV post. In default mode, each output record captures one source post's engagement metadata, including like count, comment count, view count, caption, owner details, media URLs, and provider telemetry. In advanced mode, it can return one record per liker profile when an Instagram session cookie is configured.

### Best fit and connected workflows

This Actor fits workflows that start from a known Instagram post or reel URL and need structured engagement data or liker profiles for follow-up analysis. It routes well into:

- post-level engagement review for campaigns, competitors, or content tracking
- CSV or dataset exports for downstream analysis
- lead review pipelines when advanced liker profiles are collected
- Apify MCP-based automation where a tool call returns dataset rows for a known post URL

For no-cookie engagement lookup, the Actor uses managed public-data providers with ScrapeCreators as the primary route and SociaVault as the fallback route. For liker-profile collection, it switches to the cookie-based workflow and can optionally enrich each profile with public Instagram details.

### Focused standalone workflow

This Actor is designed as a focused standalone workflow.

### Practical scenario

A social media analyst, Maya, starts with a reel URL from a brand account. She runs the Actor in `like_counts` mode and receives a record with `like_count`, `comment_count`, `view_count`, `caption`, `owner_username`, and `post_url`. Maya uses those fields to compare engagement across recent reels, then sends the normalized `post_url` and `owner_username` into her reporting sheet for weekly review.

### Input fields

| Field | Type | Purpose |
|---|---|---|
| `postUrls` | array of strings | Instagram post, reel, or TV URLs to scrape, one per line. |
| `startUrls` | array of request sources | Apify-style request list input for Instagram URLs. |
| `scrapeMode` | string | Selects provider-backed like counts or advanced liker-profile extraction. |
| `providerOrder` | string | Sets whether ScrapeCreators or SociaVault is tried first for like-count mode. |
| `maxResults` | integer | Maximum liker profiles per post in advanced mode. |
| `includeRawData` | boolean | Includes raw provider response in like-count mode. |
| `includePostMetadata` | boolean | Adds source post caption and reported like count to each liker record in advanced mode. |
| `enrichProfiles` | boolean | Adds public profile details to each advanced liker record. |
| `sessionCookie` | string | Instagram session cookie used for advanced liker-profile mode. |
| `proxyConfiguration` | object | Proxy settings, with residential proxy defaults provided in the schema. |

#### Focused JSON input example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DLDXI0fylTC/"
  ],
  "scrapeMode": "like_counts",
  "providerOrder": "scrapecreators-first",
  "includeRawData": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

### Output fields

| Field | Type | Meaning |
|---|---|---|
| `record_type` | string | `post_like_metrics` for provider-backed rows, or empty for advanced liker rows. |
| `provider` | string | Provider used for like-count and engagement rows. |
| `input_url` | string | Original Instagram URL supplied in the input. |
| `post_url` | string | Normalized post or reel URL. |
| `media_id` | string or null | Instagram media ID returned by the provider. |
| `shortcode` | string or null | Instagram shortcode returned by the provider. |
| `owner_username` | string or null | Username of the post owner. |
| `owner_full_name` | string or null | Display name of the post owner. |
| `like_count` | integer or null | Reported like count. |
| `comment_count` | integer or null | Reported comment count. |
| `view_count` | integer or null | Reported view count for video or reel media when available. |
| `username` | string | Instagram username of a liker profile in advanced mode. |
| `profile_url` | string | Direct link to a liker profile in advanced mode. |
| `liked_media_url` | string | Normalized URL of the source post or reel for liker records. |
| `post_owner_username` | string or null | Owner username attached to advanced liker records when available. |
| `scraped_at` | string | UTC timestamp when a liker record was collected. |

#### Illustrative output record

```json
{
  "record_type": "post_like_metrics",
  "provider": "scrapecreators",
  "input_url": "https://www.instagram.com/reel/DLDXI0fylTC/",
  "post_url": "https://www.instagram.com/p/DLDXI0fylTC/",
  "media_id": "3141592653589793238",
  "shortcode": "DLDXI0fylTC",
  "owner_username": "natgeo",
  "owner_full_name": "National Geographic",
  "like_count": 18420,
  "comment_count": 212,
  "view_count": 88100,
  "is_video": true,
  "liked_media_url": null,
  "scraped_at": "2026-06-08T12:00:00.000Z"
}
```

### How it works

The Actor accepts Instagram post, reel, or TV URLs and normalizes them into dataset records. In default mode, it uses managed public-data providers and writes one row per source post with like and engagement metadata. The live contract defines ScrapeCreators as the recommended primary provider and SociaVault as the secondary fallback. In advanced mode, it uses an Instagram session cookie to collect liker profiles, and the schema also supports optional profile enrichment fields such as biography, email, phone, external URL, follower count, following count, media count, category, and business flag. The output contract stores results in the default dataset and exposes a `RUN_SUMMARY` record in key-value storage.

### Evergreen pricing

This Actor uses Pay per event pricing plus standard Apify platform usage. Charging is event-based: the Actor start event is charged when a run begins, provider-backed post metrics are charged per scraped post or reel, advanced liker profiles are charged per collected profile, and profile enrichment adds a separate event when enabled.

For example, if a execution processes three posts in like-count mode, the billing includes one Actor start event and three post-metric events. To review the current event pricing and platform usage details, open the live Pricing tab in Apify Console.

### Use with AI agents (MCP)

This Actor is usable through Apify MCP as a tool that returns Instagram engagement data or advanced liker profiles for a supplied post URL. The precise Actor identity is `khadinakbar/instagram-likes-scraper`.

> Find the engagement data for this Instagram reel URL. Return the normalized post URL, owner username, like count, comment count, and any available video or caption metadata. Use the provider-backed mode unless I explicitly ask for liker profiles.

Output interpretation is straightforward: provider-backed rows represent post-level engagement, while advanced rows represent individual liker profiles. The dataset preserves provenance through fields such as `provider`, `input_url`, `post_url`, and `liked_media_url`, which makes it easier to trace each row back to the original target. In provider-backed mode, `source_has_liker_identities` is `false`, which reflects the contract for public provider APIs. When pagination or larger target sets are involved, use the Actor with one or more post URLs and read the resulting dataset items from the default dataset endpoint. Cost scales with the number of charged events, so higher `maxResults` values and profile enrichment increase usage in advanced mode.

### Apify API example

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

const client = new ApifyClient({
  token: process.env.APIFY_TOKEN,
});

const input = {
  postUrls: ["https://www.instagram.com/p/DLDXI0fylTC/"],
  scrapeMode: "like_counts",
  providerOrder: "scrapecreators-first",
};

const run = await client.actor("khadinakbar/instagram-likes-scraper").call(input);

const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(items);
```

### Best results and outcome guidance

Use `postUrls` when you already have a set of Instagram post, reel, or TV links. Use `startUrls` when your workflow already works with Apify request-list style inputs. Keep `scrapeMode` at `like_counts` for provider-backed engagement rows, and switch to `liker_profiles` when you specifically need individual liker accounts and have configured a valid session cookie. In like-count mode, `includeRawData` helps with debugging and downstream parsing. In liker-profile mode, `includePostMetadata` and `enrichProfiles` shape how much post and profile context each record carries.

### Design note

I found that the dataset contract clearly separates provider-backed rows from advanced liker-profile rows through `record_type`, `provider`, and `source_has_liker_identities`, which is a useful signal for downstream parsing and reporting.

### FAQ

#### When should I use `postUrls` instead of `startUrls`?

Use `postUrls` when you already have a simple list of Instagram URLs. Use `startUrls` when you prefer Apify-style request list input.

#### Which mode should I choose for basic engagement metrics?

Use `like_counts` for post-level like count, comment count, view count, caption, and owner metadata.

#### When does the Actor use the Instagram session cookie?

The session cookie is used in `liker_profiles` mode, which is the advanced workflow for collecting liker identities.

#### What does the provider order setting change?

It controls which managed public-data API is tried first for provider-backed like counts and engagement metadata. The live contract defines ScrapeCreators as the primary route by default and SociaVault as the fallback route.

#### Which fields are useful for downstream analysis?

For post-level analysis, `post_url`, `owner_username`, `like_count`, `comment_count`, `view_count`, and `taken_at` are commonly useful. For advanced liker workflows, `username`, `profile_url`, `liked_media_url`, `post_owner_username`, and the enrichment fields can support follow-up review.

#### Can I use this Actor through Apify MCP?

Yes. The Actor is MCP-ready and can be used through Apify MCP as a tool that returns dataset rows for the supplied Instagram target.

### Responsible use

Use this Actor with Instagram content and account access that matches your configured permissions and the applicable platform rules. Advanced profile collection uses an Instagram session cookie and should be handled carefully, including the protection of secrets and the use of appropriate proxy settings. Review your obligations under Instagram's Terms of Service, GDPR, CCPA, and any other applicable laws before running larger or repeated workflows.

# Actor input Schema

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

Instagram posts, reels, or TV posts to scrape. Accepts full URLs such as https://www.instagram.com/p/CODE/ or https://www.instagram.com/reel/CODE/. One per line.

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

Alternative Apify-style URL input. Add Instagram /p/, /reel/, or /tv/ URLs here if you prefer request-list input.

## `scrapeMode` (type: `string`):

Choose provider-backed like counts and post engagement (no Instagram cookies), or advanced liker profile extraction. Provider APIs do not expose liker identities, so liker profiles require an Instagram session cookie.

## `providerOrder` (type: `string`):

Choose which managed public-data API is tried first for like counts and post engagement. ScrapeCreators is the recommended primary; SociaVault is the secondary fallback.

## `maxResults` (type: `integer`):

Only used in Liker Profiles mode. Maximum number of liker profiles to collect per post or reel. Use a small number for testing. Defaults to 200. Range 1-50000.

## `includeRawData` (type: `boolean`):

Only used in Like Counts mode. Include the raw provider response for debugging and custom downstream parsing.

## `includePostMetadata` (type: `boolean`):

Only used in Liker Profiles mode. Add source post caption and reported like count to each liker record when Instagram exposes them. Defaults to on.

## `enrichProfiles` (type: `boolean`):

When enabled, visits each liker profile to add biography, public email, phone, external website, follower/following/media counts, category, and business flag. Adds an extra charge per enriched profile and increases run time.

## `sessionCookie` (type: `string`):

Only required for Liker Profiles mode. Like Counts mode uses ScrapeCreators/SociaVault and does not need Instagram cookies. Power users can paste their own Instagram cookie string containing sessionid. Use a secondary account because aggressive scraping can trigger rate limits. This is not your password.

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

Proxy settings. Residential proxies are strongly recommended for Instagram because datacenter IPs are blocked quickly.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DLDXI0fylTC/"
  ],
  "startUrls": [
    {
      "url": "https://www.instagram.com/p/DLDXI0fylTC/"
    }
  ],
  "scrapeMode": "like_counts",
  "providerOrder": "scrapecreators-first",
  "maxResults": 200,
  "includeRawData": false,
  "includePostMetadata": true,
  "enrichProfiles": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Provider-backed post like metrics by default, or liker profile rows in advanced cookie mode.

## `runSummary` (type: `string`):

Per-target status summary.

# 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/DLDXI0fylTC/"
    ],
    "startUrls": [
        {
            "url": "https://www.instagram.com/p/DLDXI0fylTC/"
        }
    ],
    "scrapeMode": "like_counts",
    "maxResults": 200,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/instagram-likes-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 = {
    "postUrls": ["https://www.instagram.com/p/DLDXI0fylTC/"],
    "startUrls": [{ "url": "https://www.instagram.com/p/DLDXI0fylTC/" }],
    "scrapeMode": "like_counts",
    "maxResults": 200,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/instagram-likes-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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/DLDXI0fylTC/"
  ],
  "startUrls": [
    {
      "url": "https://www.instagram.com/p/DLDXI0fylTC/"
    }
  ],
  "scrapeMode": "like_counts",
  "maxResults": 200,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call khadinakbar/instagram-likes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=khadinakbar/instagram-likes-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qjxBsCKzgMmWPEivH/builds/DlCRVOe0v2ixZK3rE/openapi.json
