# Instagram Reels Scraper - Reels, Plays, Likes & Comments (`socialscrapers/instagram-reels-scraper`) Actor

Instagram reels scraper: get the latest reels of any profile, or single reels by URL, with plays/views, likes, comments, caption, hashtags, date, sound/music, location and video URL, plus optional comments. No login, no cookies. API, JSON, CSV. $0.28 per 1,000 reels.

- **URL**: https://apify.com/socialscrapers/instagram-reels-scraper.md
- **Developed by:** [Social Scrapers](https://apify.com/socialscrapers) (community)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 18 total users, 9 monthly users, 99.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.22 / 1,000 reels

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** downloads the data of public Instagram reels, with no Instagram account, login or cookies. Give it profiles to get their latest reels, or paste reel links, and get each reel's plays (views), likes, comments count, caption, hashtags, posting date, length, sound, location, creator and video URL, plus its comments if you want them, as JSON, CSV or Excel. It costs **$0.28 per 1,000 reels**.

> 💡 **Need a feature that isn't here? Just ask.** Open an issue on the **Issues** tab and tell us what you need: a new field, filter, input type or output format. We build requested features fast, usually within 24 hours, at no extra cost.

> ⭐ **Found it useful?** A short review on the **Reviews** tab helps other people find this scraper, and tells us what to build next.

### What does Instagram Reels Scraper do?

Instagram Reels Scraper reads what Instagram shows a visitor who opens a profile's reels or a reel link without logging in. You can:

- 🎬 **Scrape a profile's reels**: enter usernames or profile URLs and get each profile's latest reels, newest first, as many as you want (no upper limit).
- 🔗 **Scrape reels by URL**: paste `/reel/` links or short codes for specific reels. Posts that are not reels are skipped and cost nothing.
- 📈 **Measure performance**: plays, likes and comments count of every reel, with its length and posting date.
- 🎵 **See what's behind each reel**: caption, hashtags, mentions, sound (licensed track or original audio), tagged location, tagged accounts and collaborators.
- 💬 **Add comments when you need them**: each reel's newest comments, or every comment Instagram shows.
- 🗓️ **Filter by date**: keep only reels posted after a date or within the last days, weeks or months.

Everything the Apify platform gives you comes with it: the Apify API, scheduled runs, webhooks, integrations with Make, Zapier, n8n and Google Sheets, and datasets you can download in any format.

### What data can you extract from Instagram reels?

| Field | What it is |
|---|---|
| `shortCode`, `url`, `id`, `productType` | The reel's code, link, media id and type (`clips`) |
| `videoPlayCount`, `likesCount`, `commentsCount` | Plays (views), likes and comments |
| `videoDuration`, `timestamp` | Length in seconds and when it was posted (UTC) |
| `caption`, `hashtags`, `mentions` | Caption text, its hashtags and @mentions |
| `musicInfo` | The sound: artist, song, original audio or not, sound id |
| `locationName`, `locationId` | The tagged location |
| `ownerUsername`, `ownerFullName`, `ownerId` | The creator |
| `taggedUsers`, `coauthorProducers` | Tagged accounts and collaborators |
| `isPaidPartnership`, `sponsors` | Always `null`: Instagram no longer shows visitors who are not logged in paid partnerships or brand partners |
| `displayUrl`, `videoUrl`, `dimensionsWidth`, `dimensionsHeight` | Cover image, video file and size |
| `latestComments` | The reel's comments (text, date, likes, reply count, commenter), when comments are on |
| `inputUrl`, `scrapedAt` | The profile or link it came from, and when it was read |

The **Reels** view of the dataset shows the main columns as a table; the **Comments** view shows one row per comment.

### How to scrape Instagram reels

1. Open Instagram Reels Scraper and click **Try for free**.
2. Add usernames or profile URLs to **Profiles**, or reel links to **Reel URLs** (or both).
3. Set **Max reels per profile**, or `0` for every reel a profile shows.
4. Optionally set **Only reels posted after**, and turn on **Include comments**.
5. Click **Start**. Reels appear in the dataset as they are read.
6. Download the results as JSON, CSV, Excel or HTML, or read them with the Apify API.

### How much does it cost to scrape Instagram reels?

You pay per reel saved: **$0.28 per 1,000 reels**, plus **$0.38 per 1,000 comments** when comments are on, platform usage and proxies included, from 26 November 2026. Until then comments cost $0.20 per 1,000 ($0.18 on Silver, $0.16 on Gold).

| Your Apify plan | Per 1,000 reels | Per 1,000 comments |
|---|---|---|
| Free and Starter (Bronze) | $0.28 | $0.38 |
| Scale (Silver) | $0.252 (−10%) | $0.342 |
| Business (Gold) | $0.224 (−20%) | $0.304 |

From 26 November 2026 each run also carries Apify's standard start charge of $0.00005 (one per GB of memory; Apify then covers the run's first 5 seconds of compute).

- 50 profiles × their 20 latest reels = 1,000 reels → **$0.28**
- 1,000 reels with 20 comments each → $0.28 + $7.60 = **$7.88** (until 26 November 2026: $4.28)

Private profiles, usernames that don't exist, deleted reels and posts that are not reels cost nothing. To cap the cost of a run, set **Maximum cost per run** in the run options: the scraper saves reels until the next one would go over it, then stops cleanly. Apify's free plan includes monthly platform credit, enough to try the scraper on thousands of reels.

### Input example

```json
{
  "usernames": ["natgeo", "https://www.instagram.com/nasa/"],
  "postUrls": ["https://www.instagram.com/reel/Dfc1mYxFevS/"],
  "maxReelsPerProfile": 20,
  "onlyPostsNewerThan": "3 months",
  "includeComments": false
}
```

| Field | Type | Description |
|---|---|---|
| `usernames` | array of strings | Profiles whose latest reels to scrape: `natgeo`, `@natgeo` or `https://www.instagram.com/natgeo/`; the handle is also picked out of messy entries such as `Nat Geo — @natgeo`. |
| `postUrls` | array of strings | Single reels: `https://www.instagram.com/reel/...` links or short codes. |
| `maxReelsPerProfile` | integer | Reels per profile, newest first. `0` for every reel the profile shows. Default: 12. |
| `onlyPostsNewerThan` | string | Only a profile's reels posted after a date (`2026-01-31`, `31/01/2026`, `Jan 31 2026`) or within an age (`7 days`, `2w`, `3 months`, `yesterday`). |
| `includeComments`, `maxComments` | boolean, integer | Add each reel's newest comments (`maxComments`, `0` for all). Default: off. |
| `proxyConfiguration` | object | The scraper picks Apify Proxy's tier itself: datacenter first, residential only when Instagram refuses a request. Your own proxy URLs are used as given. |

### Output example

One item per reel (shortened; media URLs abbreviated):

```json
{
  "inputUrl": "natgeo",
  "id": "4017311023166285121",
  "type": "Video",
  "productType": "clips",
  "shortCode": "DfAWxdIFmVB",
  "url": "https://www.instagram.com/p/DfAWxdIFmVB/",
  "caption": "Even a moment’s rest on Everest can come with a reminder of just how unpredictable the mountain can be...",
  "mentions": ["chaivasarhelyi", "jimmychin"],
  "likesCount": 45350,
  "commentsCount": 257,
  "videoPlayCount": 1698677,
  "videoDuration": 68.331,
  "timestamp": "2026-10-27T18:00:03.000Z",
  "displayUrl": "https://scontent-lax3-1.cdninstagram.com/v/t51.82787-15/...",
  "videoUrl": "https://scontent-lax3-2.cdninstagram.com/o1/v/t2/f2/m86/...",
  "dimensionsHeight": 1920,
  "dimensionsWidth": 1080,
  "ownerId": "787132",
  "ownerUsername": "natgeo",
  "ownerFullName": "National Geographic",
  "coauthorProducers": [{ "id": "4721025", "username": "jimmychin", "fullName": "Jimmy Chin", "isVerified": true }],
  "isPaidPartnership": null,
  "locationName": null,
  "musicInfo": { "artistName": "natgeo", "songName": "Original audio", "usesOriginalAudio": true, "audioId": "28902130652781918" },
  "latestComments": [],
  "scrapedAt": "2026-11-08T11:39:36.888Z"
}
```

Every item has the same fields in the same order (null when Instagram does not show a value), so CSV and Excel exports line up.

### Use cases

- **Creator and influencer research**: compare plays, likes and posting rhythm of reels across creators before a campaign.
- **Competitor tracking**: follow what reels competing brands publish and how they perform, with a scheduled run.
- **Trend and sound research**: see which sounds, lengths and caption styles the best performing reels use.
- **Campaign reporting**: collect plays, likes and comments of sponsored reels and collaborations.
- **Video archiving**: save reel video and cover URLs with their captions.

### Use it via API, Python, JavaScript and integrations

Run Instagram Reels Scraper from your own code with the Apify API or the Apify clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("socialscrapers/instagram-reels-scraper").call(
    run_input={"usernames": ["natgeo", "nasa"], "maxReelsPerProfile": 20}
)
for reel in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(reel["ownerUsername"], reel["url"], reel["videoPlayCount"])
```

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('socialscrapers/instagram-reels-scraper').call({ usernames: ['natgeo'], maxReelsPerProfile: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

You can also schedule runs, get a webhook when a run finishes, send results to Google Sheets, Slack or a database with [Apify integrations](https://docs.apify.com/integrations), connect it to Make, Zapier or n8n, or let AI agents run it through the [Apify MCP server](https://docs.apify.com/mcp).

### Limits

- **Public reels only.** Instagram Reels Scraper never logs in, so it sees what a logged-out visitor sees. Private profiles are skipped and cost nothing.
- **Plays** come from the profile's own reel list. For a reel given by link that is older than about the owner's 60 latest posts, `videoPlayCount` may be `null`.
- **Comments:** top-level comments, newest first; replies are counted in `repliesCount` but not listed.
- **Not included, because Instagram shows them only to logged-in users:** stories, the list of accounts that liked a reel, and comment replies.
- **Share links** from the app (`https://www.instagram.com/share/…`) are followed to the reel or profile they open; following a link is never charged.
- **A run with 0 results still succeeds, and no results are charged.** When every profile is private or missing, or no reel is left after your filters, the run ends as Succeeded with a status message naming each entry and why. When no entry is usable at all, the run ends as Succeeded at once, with a status message that starts "Nothing to scrape:", says how to fix the input and ends "No results were charged." A run fails only when Instagram refuses the scraper itself (every one of 3 or more inputs, and a profile that is always public too), or on an internal error.

### FAQ

**Is it legal to scrape Instagram reels?**
Instagram Reels Scraper collects only public data that anyone can see without logging in. You are responsible for how you use it: personal data is protected by laws such as the GDPR, so have a legitimate reason to collect it and follow Instagram's terms and the laws that apply to you.

**Do I need an Instagram account or cookies?**
No. You only need usernames or reel links. The scraper never logs in, so no account of yours is ever at risk.

**How many reels can I get per profile?**
As many as the profile shows: set **Max reels per profile** to `0`.

**Why did I get fewer reels than I asked for?**
The profile has fewer reels, the date filter left the rest out, or the run reached its maximum cost. The run log says which, for each profile.

**Can I download the reel videos?**
Each reel comes with `videoUrl`, a direct link to the video file, and `displayUrl` for its cover image. The links expire after some time, so download the files soon after the run.

**Can I get only new reels?**
Yes. Set **Only reels posted after** to an age such as `7 days`, and schedule the run to repeat.

### Other scrapers by Social Scrapers

| Scraper | What it gets |
| --- | --- |
| [TikTok API](https://apify.com/socialscrapers/tiktok-api) | Profiles, Videos and Comments |
| [TikTok Comments Scraper](https://apify.com/socialscrapers/tiktok-comments-scraper) | Comments, Replies and Likes |
| [TikTok Hashtag Scraper](https://apify.com/socialscrapers/tiktok-hashtag-scraper) | Top Videos, Views and Likes |
| [TikTok Profile Scraper](https://apify.com/socialscrapers/tiktok-profile-scraper) | Followers, Bio, Stats and Videos |
| [TikTok Scraper](https://apify.com/socialscrapers/tiktok-scraper) | Videos, Profiles, Hashtags and Comments |
| [TikTok Sound Scraper](https://apify.com/socialscrapers/tiktok-sound-scraper) | Videos Using a Sound and Music Info |
| [TikTok Video Scraper](https://apify.com/socialscrapers/tiktok-video-scraper) | Views, Likes, Captions and Comments |
| [Instagram API](https://apify.com/socialscrapers/instagram-api) | Profiles, Posts, Reels, Comments and Hashtags |
| [Instagram Comments Scraper](https://apify.com/socialscrapers/instagram-comments-scraper) | Comments, Likes and Reply Counts |
| [Instagram Hashtag Scraper](https://apify.com/socialscrapers/instagram-hashtag-scraper) | Reels and Keyword Search |
| [Instagram Post Details Scraper](https://apify.com/socialscrapers/instagram-post-details-scraper) | Likes, Comments, Views and Media |
| [Instagram Post Scraper](https://apify.com/socialscrapers/instagram-post-scraper) | Posts, Reels and Comments |
| [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper) | Followers, Bio, Posts and Reels |
| [Instagram Reels Transcript Scraper](https://apify.com/socialscrapers/instagram-reels-transcript-scraper) | Speech to Text and Captions |
| [Instagram Scraper](https://apify.com/socialscrapers/instagram-scraper) | Posts, Profiles, Reels, Comments and Hashtags |
| [YouTube API](https://apify.com/socialscrapers/youtube-api) | Videos, Transcripts, Search, Channels and Comments |
| [YouTube Channel Scraper](https://apify.com/socialscrapers/youtube-channel-scraper) | Videos, Shorts, Subscribers and About |
| [YouTube Comments Scraper](https://apify.com/socialscrapers/youtube-comments-scraper) | Comments, Replies and Likes |
| [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) | Videos, Shorts, Channels and Comments |
| [YouTube Search Scraper](https://apify.com/socialscrapers/youtube-search-scraper) | Videos, Channels, Views and Filters |
| [YouTube Shorts Scraper](https://apify.com/socialscrapers/youtube-shorts-scraper) | Shorts, Views, Likes and Search |
| [YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) | Subtitles, Captions and SRT |
| [YouTube Video Details Scraper](https://apify.com/socialscrapers/youtube-video-details-scraper) | Stats, Subtitles and Comments |
| [Facebook Ads Library Scraper](https://apify.com/socialscrapers/facebook-ads-library-scraper) | Meta Ad Library and Spend |
| [Facebook Comments Scraper](https://apify.com/socialscrapers/facebook-comments-scraper) | Posts, Reels, Videos and Replies |
| [Facebook Groups Scraper](https://apify.com/socialscrapers/facebook-groups-scraper) | Public Group Posts and Reactions |
| [Facebook Marketplace Scraper](https://apify.com/socialscrapers/facebook-marketplace-scraper) | Prices, Locations and Sellers |
| [Facebook Page Contact Info Scraper](https://apify.com/socialscrapers/facebook-page-contact-scraper) | Email, Phone and WhatsApp |
| [Facebook Posts Scraper](https://apify.com/socialscrapers/facebook-profile-posts-scraper) | Pages, Profiles and Timelines |
| [Facebook Pages Scraper](https://apify.com/socialscrapers/facebook-profile-scraper) | Profiles, Contact Info and Reviews |
| [Facebook Reels Scraper](https://apify.com/socialscrapers/facebook-reels-scraper) | Reels, Videos, Plays and Captions |
| [X (Twitter) Profile Scraper](https://apify.com/socialscrapers/x-profile-scraper) | Followers, Bio and Tweets |
| [X (Twitter) Tweet Scraper](https://apify.com/socialscrapers/x-tweet-scraper) | Latest Posts by Profile |
| [Threads Profile Scraper](https://apify.com/socialscrapers/threads-profile-scraper) | Followers, Bio, Links and Posts |
| [Threads Replies Scraper](https://apify.com/socialscrapers/threads-replies-scraper) | Comments, Authors, Likes and Media |
| [Threads Scraper](https://apify.com/socialscrapers/threads-scraper) | Posts, Profiles, Replies and Search |
| [Threads Search Scraper](https://apify.com/socialscrapers/threads-search-scraper) | Keywords, Hashtags, Top and Recent Posts |
| [Reddit Comments Scraper](https://apify.com/socialscrapers/reddit-comments-scraper) | Threads, Replies, Votes and Authors |
| [Reddit Scraper](https://apify.com/socialscrapers/reddit-scraper) | Posts, Comments, Subreddits, Users and Search |
| [Reddit Search Scraper](https://apify.com/socialscrapers/reddit-search-scraper) | Posts by Keyword, Subreddit and Date |
| [Reddit User Scraper](https://apify.com/socialscrapers/reddit-user-scraper) | Profiles, Karma, Posts and Comments |
| [Subreddit Scraper](https://apify.com/socialscrapers/subreddit-scraper) | Hot, New and Top Posts with Comments |
| [Quora Scraper](https://apify.com/socialscrapers/quora-scraper) | Answers, Questions, Profiles and Topic Search |
| [LinkedIn Ad Library Scraper](https://apify.com/socialscrapers/linkedin-ad-library-scraper) | Ads, Advertisers and Impressions |
| [LinkedIn Job Search Scraper](https://apify.com/socialscrapers/linkedin-job-search-scraper) | Filters, Salaries and New Jobs |
| [LinkedIn Jobs Scraper](https://apify.com/socialscrapers/linkedin-jobs-scraper) | Job Listings, Salaries and Companies |
| [Google Maps Email Extractor](https://apify.com/socialscrapers/google-maps-email-extractor) | Emails, Phones and Social Links |
| [Google Maps Scraper](https://apify.com/socialscrapers/google-maps-scraper) | Places, Phones, Websites, Ratings and Hours |
| [Google News Scraper](https://apify.com/socialscrapers/google-news-scraper) | Headlines, Articles and Search |
| [Google Ads Transparency Scraper](https://apify.com/socialscrapers/google-ads-transparency-scraper) | Ad Creatives and Advertisers |
| [Amazon Product Scraper](https://apify.com/socialscrapers/amazon-product-scraper) | Search Results, Prices, Ratings, ASINs |
| [Indeed Jobs Scraper](https://apify.com/socialscrapers/indeed-jobs-scraper) | Salaries, Full Descriptions, Company Data |
| [Contact Details Scraper](https://apify.com/socialscrapers/contact-details-scraper) | Emails, Phones and Social Links |
| [Telegram Channel Scraper](https://apify.com/socialscrapers/telegram-channel-scraper) | Posts, Views and Media |
| [Doximity Scraper](https://apify.com/socialscrapers/doximity-physician-scraper) | Physician Profiles and Doctor Directory |
| [KevinMD Scraper](https://apify.com/socialscrapers/kevinmd-articles-scraper) | Physician Articles and Author Specialties |
| [Op-Med Scraper](https://apify.com/socialscrapers/opmed-articles-scraper) | Physician Essays and Doctor Profiles |
| [Career Site Jobs Scraper](https://apify.com/socialscrapers/career-site-jobs-scraper) | Greenhouse, Lever, Ashby and Workday |
| [Google Trends Scraper](https://apify.com/socialscrapers/google-trends-scraper) | Interest Over Time, Regions and Queries |

# Actor input Schema

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

Usernames (<code>natgeo</code> or <code>@natgeo</code>) or profile URLs (<code>https://www.instagram.com/natgeo/</code>) whose latest reels to scrape, newest first, one per line. Messy entries are fine: the handle is picked out of text such as <code>NASA — @nasa</code>, <code>@ nasa</code> or <code>nasa (NASA)</code>, and out of links with extra parameters such as <code>?igsh=…</code>; an entry with no username in it is skipped with a warning. Private profiles and usernames that don't exist are skipped and never charged.

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

Single reels to scrape: URLs such as <code>https://www.instagram.com/reel/Dfc1mYxFevS/</code>, or just their short codes. Messy entries are fine: a link inside other text, or a link with extra parameters such as <code>?igsh=…</code>, is read as that link. Share links from the app (<code>instagram.com/share/…</code>) are followed to the reel they open, and a profile link reads that profile's latest reels. An entry with no post in it is skipped with a warning. Posts that are not reels are skipped and never charged.

## `maxReelsPerProfile` (type: `integer`):

How many of each profile's latest reels to scrape. <code>0</code> scrapes every reel the profile shows. No upper limit.

## `onlyPostsNewerThan` (type: `string`):

Skip a profile's reels posted before this. Pick a date or an age, or type one: a date (<code>2026-01-31</code>, <code>31/01/2026</code>, <code>Jan 31 2026</code>; a UTC day), an ISO date-time through the API (<code>2026-01-31T18:00:00Z</code>), or an age such as <code>7 days</code>, <code>2w</code>, <code>3 months</code> or <code>yesterday</code>. Leave empty for no date limit.

## `includeComments` (type: `boolean`):

Add each reel's newest comments to its <code>latestComments</code> list (charged per comment).

## `maxComments` (type: `integer`):

How many of each reel's newest comments to include when comments are on. <code>0</code> includes every comment Instagram shows.

## `reelsOnly` (type: `boolean`):

Always on in this scraper: posts that are not reels are skipped.

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

The scraper picks Apify Proxy's tier itself: datacenter first, residential only when Instagram refuses a request (a country you choose applies to the residential retries). Your own proxy URLs are used exactly as given.

## Actor input object example

```json
{
  "usernames": [
    "natgeo"
  ],
  "maxReelsPerProfile": 5,
  "includeComments": false,
  "maxComments": 20,
  "reelsOnly": true,
  "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 = {
    "usernames": [
        "natgeo"
    ],
    "maxReelsPerProfile": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/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 = {
    "usernames": ["natgeo"],
    "maxReelsPerProfile": 5,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/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 '{
  "usernames": [
    "natgeo"
  ],
  "maxReelsPerProfile": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call socialscrapers/instagram-reels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialscrapers/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/3Q7QkV9DuzQPhx5t6/builds/HVuoBUGDwV0drBUAn/openapi.json
