# Instagram Post Scraper - Captions, Likes and Comments by URL (`s-r/instagram-post-scraper`) Actor

Paste Instagram post or reel URLs and get caption, likes, comment count, views, hashtags, mentions, music track, video URL and owner stats. Optionally pull the comments. No login required.

- **URL**: https://apify.com/s-r/instagram-post-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 post returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Post Scraper - Captions, Likes and Comments by URL

Paste Instagram post or reel URLs and get caption, likes, comments, views, hashtags, music and owner stats. No login, no cookies and no API key: the actor reads Instagram's public surface directly.

This is a single-purpose instagram post scraper. It does one thing, takes a handful of inputs and returns one clean row per post.

### What you get

- `caption`, `hashtags` and `mentions` - full caption text with tags and handles already parsed out
- `likes`, `comments_count` and `views` - engagement, as numbers rather than display strings
- `owner_username`, `owner_followers` and `owner_is_verified` - who posted it and how big they are
- `music_title` and `music_artist` - the audio track for reels
- `video_url`, `image_url`, `thumbnail_url` and `duration_seconds` - media URLs and length
- `comments` - the visible comments, when you switch them on

### Why scrape this from Instagram

A post URL is the unit people actually work in. Someone sends you a link and the question is how it performed, who posted it and what audio it used. Getting that from the Graph API requires owning the account; getting it from the page requires parsing a render that changes shape regularly.

This actor takes the URL exactly as copied from the app or browser and returns the post as a row. Post, reel and TV URLs all work, including the canonical form with the username in the path. Hashtags and mentions come out as arrays rather than leaving you to regex the caption.

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `search` | array | yes | `['https://www.instagram.com/p/C1sQZ1sLQ8w/']` | Instagram post, reel or TV URLs, one per line. |
| `includeComments` | boolean | no | `False` | Also return the visible comments on each post. |
| `maxComments` | integer | no | `20` | Only used when comments are included. |

### Output

One row per post.

| Field | Description |
|---|---|
| `shortcode` | Post shortcode from the URL |
| `url` | Public Instagram URL for this record |
| `caption` | Post caption text |
| `likes` | Like count |
| `comments_count` | Comment count |
| `views` | View count for video posts |
| `posted_at` | Publication timestamp |
| `is_video` | Whether the post is a video |
| `video_url` | Direct video URL when available |
| `image_url` | Full size image URL |
| `thumbnail_url` | Thumbnail URL |
| `hashtags` | Hashtags found in the caption |
| `mentions` | Accounts mentioned in the caption |
| `owner_username` | Handle that published the post |
| `owner_followers` | Follower count of the publishing account |
| `owner_is_verified` | Whether the publisher is verified |
| `music_title` | Audio track title |
| `music_artist` | Audio track artist |
| `duration_seconds` | Video length in seconds |
| `comments` | Comment records when comments are requested |
| `record_type` | Which kind of row this is |

### Use cases

**Campaign reporting on creator posts.** When creators deliver links rather than analytics screenshots, this turns a list of URLs into a performance table. `owner_followers` alongside `likes` gives an engagement rate per post, which is the number that survives scrutiny in a wrap report.

**Competitive content teardowns.** Collect a competitor's best-performing posts and pull them in one run. Caption structure, hashtag sets and audio choices become comparable across dozens of posts at once, which is where content patterns actually become visible.

**Audio and trend tracking for reels.** `music_title` and `music_artist` on every reel let you see which tracks are attached to the posts that performed. Audio choice is one of the strongest reach levers on reels and one of the least documented.

**Compliance and disclosure auditing.** For regulated categories, the caption and its parsed hashtags are the evidence trail for whether required disclosure was present. Running a creator's delivered links through this produces a dated, structured record.

### How it compares

The closest competitor is `apify/instagram-post-scraper`, the platform-official actor, at $0.0017 per post. This actor is $0.0010, a 41% undercut. Theirs also offers a separate post-details event at $0.001. The honest comparison: theirs is the more configurable actor from the platform owner, this one takes URLs and returns rows at a lower rate with comments as a single switch.

### Pricing

$0.0010 per post returned, which is $1.00 per 1,000 rows. All pricing is pay-per-event - you only pay for results you receive. No actor-start fee, no per-compute-unit charges.

### Limits and gotchas

- Public posts only. Private accounts do not resolve.
- Comments are the visible set, not the complete thread. Very large comment counts are truncated by Instagram before this actor sees them.
- View counts exist for video posts only. Image posts return no view figure, which is Instagram's behaviour rather than a gap here.
- Media URLs are time-limited by Instagram's CDN. Fetch them promptly or re-run.
- Free Apify plans are capped at 10 rows per run. Paid plans have no cap.
- Deleted or region-blocked posts return an error row rather than a blank record.

### FAQ

**Can I scrape an Instagram post without logging in?**

Yes. This actor reads the public post surface logged out, so there is no account involved and nothing to get rate limited.

**Does it work on reels as well as posts?**

Yes. Post, reel and TV URLs are all accepted, including the canonical form with the username in the path. The type is detected from the URL.

**Can I get the comments?**

Yes, switch on include comments and set how many per post. It is off by default because most reporting use cases only need the count.

**Does it return video files?**

It returns the video URL Instagram serves, plus the thumbnail and image URLs. It does not re-host or download the media.

**What if the post is from a private account?**

It will not resolve. Private posts have no public surface, and this actor does not authenticate.

### Related Actors

- [Instagram Profile Scraper](https://apify.com/s-r/instagram-profile-scraper)
- [Instagram Keyword Scraper](https://apify.com/s-r/instagram-keyword-scraper)
- [Instagram Trending Scraper](https://apify.com/s-r/instagram-trending-scraper)

# Actor input Schema

## `search` (type: `array`):

Instagram post, reel or TV URLs, one per line.

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

Also return the visible comments on each post.

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

Only used when comments are included.

## Actor input object example

```json
{
  "search": [
    "https://www.instagram.com/reel/C2abcdEfGhI/"
  ],
  "includeComments": false,
  "maxComments": 20
}
```

# 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 = {
    "search": [
        "https://www.instagram.com/p/C1sQZ1sLQ8w/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/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 = { "search": ["https://www.instagram.com/p/C1sQZ1sLQ8w/"] }

# Run the Actor and wait for it to finish
run = client.actor("s-r/instagram-post-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 '{
  "search": [
    "https://www.instagram.com/p/C1sQZ1sLQ8w/"
  ]
}' |
apify call s-r/instagram-post-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/lAtnNmoCqTN77oRCp/builds/SJUzDru2Dunf7dgkS/openapi.json
