# Instagram Reels Scraper (`pratikdani/instagram-reels-scraper`) Actor

The Instagram Reels Scraper is a tool designed to extract detailed information from valid Instagram Reels. This actor automates the process of gathering data, making it easier for developers and data analysts to access and utilize Instagram Reels content for various applications.

- **URL**: https://apify.com/pratikdani/instagram-reels-scraper.md
- **Developed by:** [Pratik Dani](https://apify.com/pratikdani) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 815 total users, 22 monthly users, 100.0% runs succeeded, 39 bookmarks
- **User rating**: 2.14 out of 5 stars

## Pricing

from $2.00 / 1,000 results

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?

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 Reels Scraper

### Overview

The Instagram Reels Scraper Actor is a powerful tool designed to extract comprehensive data from Instagram reels. It provides detailed information about reels content, engagement metrics, user interactions, and media details. This actor is particularly useful for social media analysts, content creators, and researchers who need to gather insights from Instagram reels.
Interested in using this scraper? Get it here: [Instagram Reels Scraper](https://apify.com/pratikdani/instagram-reels-scraper).

### Features

- Extracts complete reel metadata including URLs, descriptions, and posting details
- Captures engagement metrics (likes, views, comments)
- Collects hashtag information
- Retrieves top comments with user details
- Gathers media information including thumbnails and video URLs
- Provides user statistics and co-author details
- Captures audio and video specifications

### Output Fields

| Field Name | Type | Description |
|------------|------|-------------|
| url | String | The direct URL to the Instagram reel |
| user_posted | String | Username of the account that posted the reel |
| description | String | Full caption/description of the reel |
| hashtags | Array | List of hashtags used in the reel description |
| num_comments | Number | Total number of comments on the reel |
| date_posted | String | ISO timestamp of when the reel was posted |
| likes | Number | Total number of likes received |
| views | Number | Total number of views recorded |
| video_play_count | Number | Number of times the video has been played |
| top_comments | Array | Collection of top comments including user details and engagement metrics |
| post_id | String | Unique identifier for the reel |
| thumbnail | String | URL of the reel's thumbnail image |
| shortcode | String | Instagram's shortcode for the reel |
| content_id | String | Unique content identifier |
| product_type | String | Type of content (e.g., "clips") |
| coauthor_producers | Array | List of co-authors of the reel |
| tagged_users | Array | Details of users tagged in the reel |
| length | String | Duration of the reel in seconds |
| video_url | String | Direct URL to the video content |
| audio_url | String | URL of the audio used in the reel |
| posts_count | Number | Total number of posts by the user |
| followers | Number | Number of followers of the posting account |
| following | Number | Number of accounts the poster is following |

### Possible Usage of the Actor

- Social Media Analytics: Track engagement metrics and performance of reels
- Content Research: Analyze successful content strategies and trends
- Competitor Analysis: Monitor competitor content and engagement
- Influencer Research: Evaluate influencer performance and reach
- Hashtag Analysis: Study hashtag usage and effectiveness
- User Behavior Analysis: Understand audience interaction patterns
- Content Aggregation: Collect and archive reel content for various purposes
- Marketing Research: Gather insights for marketing strategies
- Engagement Monitoring: Track comment sentiment and user interactions

### Example Output

```json
{
    "url": "https://www.instagram.com/p/DDb5uxNyWa9/",
    "user_posted": "gaung_merah",
    "description": "Haru biru di balik perayaan 1  juta penonton Gaung Merah SeGALAnya! Merekalah yang selalu menyalakan semangat everlasting untuk menciptakan memori yang tak lekang oleh waktu! \n\n#GaungMerah #KualitasMenyalaDariWaktukeWaktu #gaungmerahsegalanya",
    "hashtags": [
      "#GaungMerah",
      "#KualitasMenyalaDariWaktukeWaktu",
      "#gaungmerahsegalanya"
    ],
    "num_comments": 50,
    "date_posted": "2024-12-11T11:15:29.000Z",
    "likes": 3120,
    "views": 42785,
    "video_play_count": 118467,
    "top_comments": [
      {
        "comment": "Alhamdulillah luar biasa ❤️❤️❤️❤️🔥🔥🔥🔥",
        "date_of_comment": "2024-12-26T02:08:07.000Z",
        "likes": "3",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "ethica_shopputri"
      },
      {
        "comment": "Lamongan",
        "date_of_comment": "2024-12-21T03:50:35.000Z",
        "likes": "4",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "x_mennt"
      },
      {
        "comment": "Kota palu kpn om. ??🔥",
        "date_of_comment": "2024-12-15T08:46:16.000Z",
        "likes": "6",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "uchil_djaelangkara"
      },
      {
        "comment": "MADURA YUK ..KAPAAN..😢",
        "date_of_comment": "2024-12-13T09:01:52.000Z",
        "likes": "6",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "lestarilestari8879"
      },
      {
        "comment": "🔥🔥🔥 sayang g ada ke Berau 😂",
        "date_of_comment": "2024-12-13T05:06:26.000Z",
        "likes": "6",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "ani.kusmanadi"
      },
      {
        "comment": "Sehat semua nya buat kluarga bang iwan fals  dan kru nya",
        "date_of_comment": "2024-12-13T04:38:40.000Z",
        "likes": "6",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "ridwan_fals_dksh"
      },
      {
        "comment": "Muantaaaapppp🔥🔥🔥",
        "date_of_comment": "2024-12-12T15:47:27.000Z",
        "likes": "6",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "yoggie_2000"
      },
      {
        "comment": "Keren👏👏",
        "date_of_comment": "2024-12-12T15:37:03.000Z",
        "likes": "7",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "amhasagaf"
      },
      {
        "comment": "🔥🔥🔥🔥🔥🔥🔥",
        "date_of_comment": "2024-12-12T11:06:52.000Z",
        "likes": "6",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "trisuangsih5"
      },
      {
        "comment": "Sehat terus crew gudang garam dan band Iwan fals semuanya pada sehat terus semoga kembali hadir lg di kota JEMBER , salam dari Oi JEMBER✌🏼🇲🇨",
        "date_of_comment": "2024-12-12T10:24:55.000Z",
        "likes": "6",
        "num_replies": 0,
        "replies": [],
        "user_commenting": "sambo_konglomrat"
      }
    ],
    "post_id": "3520661436311889597",
    "thumbnail": "https://scontent-ber1-1.cdninstagram.com/v/t51.2885-15/470032408_17976995003792378_5649157389110621603_n.jpg?stp=c0.420.1080.1080a_dst-jpg_e35_s640x640_sh0.08_tt6&_nc_ht=scontent-ber1-1.cdninstagram.com&_nc_cat=102&_nc_ohc=X1GeQCKnvWAQ7kNvgG0Y_fP&_nc_gid=9bb6f25f41dd4f1bbf36c945bd090264&edm=AABBvjUBAAAA&ccb=7-5&oh=00_AYCS_E-pM1k3cD0udjSJ-zkeOkLLiZMCakZVEPw5MW1xAg&oe=678FB692&_nc_sid=4f4799",
    "shortcode": "DDb5uxNyWa9",
    "content_id": "3520661436311889597_53789136377",
    "product_type": "clips",
    "coauthor_producers": [
      "iwanfals"
    ],
    "tagged_users": [
      {
        "full_name": "Virgiawan Listanto",
        "id": "7559709",
        "is_verified": true,
        "profile_pic_url": "https://scontent-ber1-1.cdninstagram.com/v/t51.2885-19/375929230_549369380649571_2050279282174607290_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=scontent-ber1-1.cdninstagram.com&_nc_cat=107&_nc_ohc=OtpABjI5NIkQ7kNvgHNoj3j&_nc_gid=9bb6f25f41dd4f1bbf36c945bd090264&edm=AABBvjUBAAAA&ccb=7-5&oh=00_AYAL3B7Ws0qJ0lyll933-gNEr6I3G5pc7ItEGvUdCigSGQ&oe=678FD37D&_nc_sid=4f4799",
        "username": "iwanfals"
      }
    ],
    "length": "143.172",
    "video_url": "https://scontent-ber1-1.cdninstagram.com/o1/v/t16/f2/m86/AQOabMlpRPCiDUvG0mwyWO_MM6LRi9gpYLmm62CimiH-HnNXIpL1wfRom8nlrPLBRYK5qoMh7KBOFfLDiMvvS_EHTmUDKV0W8epicKk.mp4?stp=dst-mp4&efg=eyJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSIsInZlbmNvZGVfdGFnIjoidnRzX3ZvZF91cmxnZW4uY2xpcHMuYzIuNzIwLmJhc2VsaW5lIn0&_nc_cat=104&vs=778168494475226_1774937878&_nc_vs=HBksFQIYUmlnX3hwdl9yZWVsc19wZXJtYW5lbnRfc3JfcHJvZC9BRTRFQTVFOTM5QTQ4NzMzQjlEMDk1N0U5M0RCRjFBRF92aWRlb19kYXNoaW5pdC5tcDQVAALIAQAVAhg6cGFzc3Rocm91Z2hfZXZlcnN0b3JlL0dNWklBaHgwVkZqbVl2Y0RBSXRqMmlUWGxuVTlicV9FQUFBRhUCAsgBACgAGAAbABUAACbEoa%2F9xZqOQBUCKAJDMywXQGHlT987ZFoYEmRhc2hfYmFzZWxpbmVfMV92MREAdf4HAA%3D%3D&ccb=9-4&oh=00_AYDrdNVkUhQ-x6BWjvVvawnuxmlCKkoYfcEhepy3oR3IYQ&oe=678BDA69&_nc_sid=4f4799",
    "audio_url": "https://www.instagram.com/reels/audio/1322319278943516",
    "posts_count": 756,
    "followers": 64251,
    "following": 0
  }
```

# Actor input Schema

## `url` (type: `string`):

URL of the Instagram Reel

## `use_cache` (type: `boolean`):

Alters the caching behaviour.

## Actor input object example

```json
{
  "url": "https://www.instagram.com/reel/C5Rdyj_q7YN/"
}
```

# 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 = {
    "url": "https://www.instagram.com/reel/C5Rdyj_q7YN/",
    "use_cache": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("pratikdani/instagram-reels-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 = {
    "url": "https://www.instagram.com/reel/C5Rdyj_q7YN/",
    "use_cache": False,
}

# Run the Actor and wait for it to finish
run = client.actor("pratikdani/instagram-reels-scraper").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 '{
  "url": "https://www.instagram.com/reel/C5Rdyj_q7YN/",
  "use_cache": false
}' |
apify call pratikdani/instagram-reels-scraper --silent --output-dataset

```

## MCP server setup

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

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/8yz4aO3qlqckRu3nu/builds/8kVfhYzmPEcTNcVW7/openapi.json
