# Instagram Post Scraper - Likes, Comments & Views (`sumitr_mardy/instagram-post-scraper`) Actor

Instagram post and reel scraper, $0.50 per 1,000 posts: likes, comments, views, caption, hashtags, posting date, media URLs, carousel items, reel audio and author followers for a list of post URLs. One row per input; missing posts are free. No login.

- **URL**: https://apify.com/sumitr_mardy/instagram-post-scraper.md
- **Developed by:** [Sumitr Mardy](https://apify.com/sumitr_mardy) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 posts

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 Post Scraper - Likes, Comments & Views

Paste Instagram post and reel links and get one row per post: likes, comments, views, caption, hashtags, mentions, posting date, image and video URLs, carousel items, reel audio and the author's follower count. Built for influencer campaign reports, engagement tracking and content research.

**$0.50 per 1,000 posts.** Deleted posts and invalid lines are returned free. No Instagram login, no cookies.

### What you get

| Field | Example |
|---|---|
| `type` | `reel`, `video`, `image` or `carousel` |
| `likes`, `comments`, `views` | 50800, 342, 440295 |
| `caption`, `hashtags`, `mentions` | "2026 mindset ...", \["growth"], \["someone"] |
| `postedAt` | 2025-12-30T13:25:27Z |
| `ownerUsername`, `ownerFullName`, `ownerVerified` | jayshetty, Jay Shetty, true |
| `ownerFollowers`, `ownerPosts` | 18917934, 4200 |
| `displayUrl`, `videoUrl`, `carouselItems` | media links (Instagram links expire after some days) |
| `videoDurationSeconds`, `width`, `height` | 29.6, 1080, 1920 |
| `musicSong`, `musicArtist`, `musicOriginalAudio` | reel audio |
| `altText` | Instagram's accessibility text |
| `detailLevel` | `full` or `basic` (see limits) |
| `status` | `ok`, `not_found`, `failed`, `invalid_input`, `cost_limit_reached` |
| `input`, `shortcode`, `id`, `url`, `scrapedAt` | the line you gave, ids, canonical link, lookup time |

One row per input line, fixed shape: numbers always numbers, lists always lists, text always text. `status` says why a row is empty.

### How to use it

Put one post per line. All of these work:

```
https://www.instagram.com/reel/DS46KJNjva9/
https://www.instagram.com/p/C2dRyXas5NP/
https://www.instagram.com/natgeo/p/DFjfeKYNiHg/
C2dRyXas5NP
```

Duplicates are looked up and billed once. Schedule the same list daily to track how a campaign's numbers grow; every row carries `scrapedAt`.

### Pricing

Pay per event, **$0.0005 per post found** ($0.50 per 1,000), cheaper on higher Apify plans. `not_found`, `failed` and `invalid_input` rows are free. Apify adds its standard tiny start event per run.

### Status, measured

| | |
|---|---|
| Reels | 25 of 25 found in a 28-line test (the other lines were a duplicate, a deleted post and an invalid line) |
| Images and carousels | 18 of 19 found; the 19th was deleted |
| Access | plain requests from Apify's servers, no proxy, no login |

### Honest limits

- **You bring the links.** This Actor reads posts you list; it does not crawl profiles or hashtags.
- **Single-image posts come back at `detailLevel: basic`:** likes, caption, hashtags, date, image and author handle, but no follower count, and `comments` only when Instagram shows the count (otherwise `0`). Reels, videos and carousels are `full`.
- No comment text and no story or highlight data.
- Public posts only. Use the data in line with Instagram's terms and the privacy laws that apply to you.

### Use it from AI agents (MCP)

Hosted, with OAuth sign-in (Claude, Cursor, VS Code and others):

```json
{
    "mcpServers": {
        "instagram-posts": {
            "url": "https://mcp.apify.com/?tools=sumitr_mardy/instagram-post-scraper"
        }
    }
}
```

With an API token instead of OAuth:

```json
{
    "mcpServers": {
        "instagram-posts": {
            "url": "https://mcp.apify.com/?tools=sumitr_mardy/instagram-post-scraper",
            "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
        }
    }
}
```

Local stdio:

```json
{
    "mcpServers": {
        "instagram-posts": {
            "command": "npx",
            "args": ["-y", "@apify/actors-mcp-server", "--actors", "sumitr_mardy/instagram-post-scraper"],
            "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
        }
    }
}
```

### Run it from code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("sumitr_mardy/instagram-post-scraper").call(run_input={
    "postUrls": ["https://www.instagram.com/reel/DS46KJNjva9/", "C2dRyXas5NP"],
})
for p in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(p["ownerUsername"], p["type"], p["likes"], p["comments"], p["views"])
```

cURL (waits for the run and returns the rows):

```bash
curl -X POST "https://api.apify.com/v2/acts/sumitr_mardy~instagram-post-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postUrls":["https://www.instagram.com/reel/DS46KJNjva9/"]}'
```

### FAQ

**Where does the posting date come from?** Instagram media ids encode their creation time to the millisecond; `postedAt` is read from the id.

**Do I need an Instagram account?** No.

**Why is a row `not_found`?** The post was deleted, archived or made private. Those rows are free.

# Actor input Schema

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

One per line: https://www.instagram.com/p/<code>/, https://www.instagram.com/reel/<code>/ or the bare shortcode.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/reel/DS46KJNjva9/",
    "https://www.instagram.com/reel/DULBkEngpxg/"
  ]
}
```

# Actor output Schema

## `dataset` (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 = {
    "postUrls": [
        "https://www.instagram.com/reel/DS46KJNjva9/",
        "https://www.instagram.com/reel/DULBkEngpxg/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sumitr_mardy/instagram-post-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/reel/DS46KJNjva9/",
        "https://www.instagram.com/reel/DULBkEngpxg/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("sumitr_mardy/instagram-post-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 '{
  "postUrls": [
    "https://www.instagram.com/reel/DS46KJNjva9/",
    "https://www.instagram.com/reel/DULBkEngpxg/"
  ]
}' |
apify call sumitr_mardy/instagram-post-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sumitr_mardy/instagram-post-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/fG6Tblij3HeHxbOLQ/builds/D359ODqto4gJnjejn/openapi.json
