# Op Actor (`dashing_rollout/instagram-reel-scaper-new`) Actor

Scrape Instagram Reel metrics including likes, comments, views, caption, author details, hashtags, upload date, thumbnail, and more from public Instagram Reels.

- **URL**: https://apify.com/dashing\_rollout/instagram-reel-scaper-new.md
- **Developed by:** [Michael john](https://apify.com/dashing_rollout) (community)
- **Categories:** Social media, Automation, Developer tools
- **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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Reel Metrics Scraper

**Instagram Reel Metrics Scraper** extracts rich metrics and metadata from **public Instagram Reels** — likes, comments, views, captions, hashtags, audio, the creator's profile stats, and direct media URLs. It works by **intercepting the JSON/GraphQL responses that Instagram already sends to your browser**, so it keeps working even when Instagram changes its HTML.

Give it a list of Reel URLs and get back clean, structured JSON you can download as JSON, CSV, Excel, or HTML — or pull straight from the [Apify API](https://docs.apify.com/api/v2). Running on the [Apify platform](https://apify.com/actors) adds scheduling, proxy rotation, monitoring, and integrations on top.

### Why use Instagram Reel Metrics Scraper?

- **Resilient to HTML changes** — reads structured JSON/GraphQL payloads instead of fragile DOM selectors.
- **Complete metrics** — likes, comments, views/plays, follower/following counts, verification status, and more.
- **Bulk friendly** — crawls hundreds of Reels using a Crawlee `RequestQueue` with configurable concurrency.
- **Resilient to failures** — automatic retries per Reel; a single failing Reel never crashes the run.
- **Clean, typed codebase** — modular TypeScript (ES modules) split into `main`, `routes`, and `utils`.

### How to use Instagram Reel Metrics Scraper

1. Open the Actor and go to the **Input** tab.
2. Paste one or more **public** Instagram Reel URLs into **Reel URLs** (e.g. `https://www.instagram.com/reel/xxxxx/`).
3. (Recommended) Keep **Apify Proxy** enabled to avoid rate limiting.
4. Optionally adjust **Max Concurrency** (default `3`) and **Max Retries**.
5. Click **Start** and watch the results appear in the **Output** tab.

### Input

The Actor accepts the following input (see the **Input** tab for the form):

```json
{
    "startUrls": [{ "url": "https://www.instagram.com/reel/xxxxx/" }],
    "maxConcurrency": 3,
    "maxRequestRetries": 3,
    "maxRequestsPerCrawl": 0,
    "proxyConfiguration": { "useApifyProxy": true }
}
````

| Field | Type | Description |
| --- | --- | --- |
| `startUrls` | array (required) | Public Instagram Reel URLs to scrape. |
| `maxConcurrency` | integer | Number of Reels processed in parallel (default `3`). |
| `maxRequestRetries` | integer | Retries per Reel before it is skipped (default `3`). |
| `maxRequestsPerCrawl` | integer | Max Reels per run, `0` = unlimited. |
| `proxyConfiguration` | object | Proxy settings; Apify Proxy strongly recommended. |

### Output

Each Reel produces one dataset item. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
    "reelUrl": "https://www.instagram.com/reel/xxxxx/",
    "reelId": "xxxxx",
    "username": "creator",
    "fullName": "The Creator",
    "caption": "Great trip! #travel with @friend",
    "hashtags": ["travel"],
    "mentions": ["friend"],
    "likes": 15000,
    "comments": 320,
    "views": 985000,
    "uploadDate": "2024-05-01T12:00:00.000Z",
    "audio": "Original audio",
    "thumbnail": "https://.../thumb.jpg",
    "video": "https://.../video.mp4",
    "verified": true,
    "followers": 1000000,
    "following": 250
}
```

#### Data table

| Field | Description |
| --- | --- |
| `reelUrl` | Canonical Reel URL. |
| `reelId` | Reel shortcode. |
| `username` | Creator's handle. |
| `fullName` | Creator's display name (if available). |
| `caption` | Reel caption text. |
| `hashtags` | Hashtags parsed from the caption. |
| `mentions` | @mentions parsed from the caption. |
| `likes` | Like count. |
| `comments` | Comment count. |
| `views` | View / play count. |
| `uploadDate` | Upload date (ISO-8601). |
| `audio` | Audio / music track name. |
| `thumbnail` | Thumbnail image URL. |
| `video` | Direct video URL (when publicly accessible). |
| `verified` | Whether the creator is verified. |
| `followers` | Creator's follower count (when available, else `null`). |
| `following` | Creator's following count (when available, else `null`). |

### How does it work?

The Actor is **cookie-free** — it never logs in and never stores cookies. For each Reel it makes a plain HTTP request to Instagram's **public embed endpoint** (`/reel/<id>/embed/captioned/`), which returns the Reel's data without any session:

1. **Structured JSON** — `gql_data.shortcode_media` embedded in the page (primary, most reliable source for username, caption, likes, comments, views, video/thumbnail URLs, verification).
2. **Open Graph meta** — `og:description` / `og:image` are used as a fallback to fill in like/comment/view counts the JSON may omit.

A recursive parser locates the media object inside the payload and normalizes Instagram's many possible shapes into one stable output. Because it relies on the public embed JSON rather than the logged-in DOM, it keeps working when Instagram changes its HTML and avoids the login wall entirely.

> Note: follower/following counts and audio name are only exposed to logged-in clients, so in cookie-free mode they may be `null`/empty for some Reels.

### Pricing / cost estimation

The Actor runs on the Apify platform and consumes compute units based on run time. Because it relies on a real browser, each Reel takes a few seconds. Using Apify Proxy is recommended and may incur additional usage depending on your plan. Start with a small batch to estimate cost before scaling to hundreds of Reels.

### Tips

- Keep concurrency moderate (`3`) to reduce the chance of Instagram rate limiting.
- Provide canonical Reel URLs; the Actor normalizes and deduplicates them automatically.
- Some fields (`followers`, `following`, `fullName`, `video`) are only present in certain payloads and may be `null`/empty for some Reels.

### FAQ, disclaimers, and support

- **Does it work for private Reels?** No. Only **public** Reels are supported.
- **Is scraping legal?** This Actor only collects publicly available data. You are responsible for complying with Instagram's Terms of Service and applicable laws, and for not collecting personal/sensitive data without a lawful basis.
- **A Reel returned no data — why?** It may be private, removed, region-locked, or require login. The Actor logs the reason, retries, then continues.
- **Found a bug or need a custom solution?** Open an issue on the Actor's **Issues** tab.

### Development

```bash
npm install        # install dependencies
npm run build      # compile TypeScript
npm test           # run unit tests
apify run          # run locally (requires the Apify CLI)
apify push         # deploy to the Apify platform
```

Project structure:

```
src/
  main.ts            # entry point: input, proxy, BasicCrawler (cookie-free HTTP)
  routes.ts          # reel handler: fetches the public embed page, no cookies
  utils/parser.ts    # embed/JSON -> ReelData normalization
  utils/helpers.ts   # pure helper functions
```

# Actor input Schema

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

List of public Instagram Reel URLs to scrape (e.g. https://www.instagram.com/reel/xxxxx/).

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

Number of Reels to process in parallel.

## `maxRequestRetries` (type: `integer`):

How many times to automatically retry a Reel that fails to load before skipping it.

## `maxRequestsPerCrawl` (type: `integer`):

Maximum number of Reels to process in a single run (0 = unlimited).

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

Proxy settings. Using Apify Proxy is strongly recommended for Instagram to avoid rate limiting.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.instagram.com/reel/C5kkkkkkkkk/"
    }
  ],
  "maxConcurrency": 3,
  "maxRequestRetries": 3,
  "maxRequestsPerCrawl": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("dashing_rollout/instagram-reel-scaper-new").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://www.instagram.com/reel/C5kkkkkkkkk/" }] }

# Run the Actor and wait for it to finish
run = client.actor("dashing_rollout/instagram-reel-scaper-new").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 '{
  "startUrls": [
    {
      "url": "https://www.instagram.com/reel/C5kkkkkkkkk/"
    }
  ]
}' |
apify call dashing_rollout/instagram-reel-scaper-new --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Op Actor",
        "description": "Scrape Instagram Reel metrics including likes, comments, views, caption, author details, hashtags, upload date, thumbnail, and more from public Instagram Reels.",
        "version": "0.0",
        "x-build-id": "SWLU1pjhF74cITgiu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dashing_rollout~instagram-reel-scaper-new/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dashing_rollout-instagram-reel-scaper-new",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dashing_rollout~instagram-reel-scaper-new/runs": {
            "post": {
                "operationId": "runs-sync-dashing_rollout-instagram-reel-scaper-new",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dashing_rollout~instagram-reel-scaper-new/run-sync": {
            "post": {
                "operationId": "run-sync-dashing_rollout-instagram-reel-scaper-new",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Reel URLs",
                        "type": "array",
                        "description": "List of public Instagram Reel URLs to scrape (e.g. https://www.instagram.com/reel/xxxxx/).",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Number of Reels to process in parallel.",
                        "default": 3
                    },
                    "maxRequestRetries": {
                        "title": "Max Retries per Reel",
                        "minimum": 0,
                        "type": "integer",
                        "description": "How many times to automatically retry a Reel that fails to load before skipping it.",
                        "default": 3
                    },
                    "maxRequestsPerCrawl": {
                        "title": "Max Reels per Run",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of Reels to process in a single run (0 = unlimited).",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Using Apify Proxy is strongly recommended for Instagram to avoid rate limiting.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
