# Instagram Post and Reel Details API (`khadinakbar/instagram-post-details-scraper`) Actor

Get a public Instagram post or Reel by URL: caption, author, likes, comments, IG-only views, media, and music. Provider-backed via ScrapeCreators and SociaVault; no user cookies required. Charged $0.008 per post.

- **URL**: https://apify.com/khadinakbar/instagram-post-details-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 instagram post scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 and Reel Details API

Turn a public Instagram post or Reel URL into **one dataset row** with caption, author, like count, comment count, Instagram-only play count, media URLs, and music when Instagram exposes them. Designed for content teams, researchers, and AI agents that already have a URL and need a structured archive record. No Instagram login. No cookies.

This Actor is the **get-by-URL** sibling: one post or Reel in, one detail row out.

### Best fit for this Actor

- You already have a public Instagram `/p/`, `/reel/`, `/tv/` URL, or a shortcode, and you want the full public record.
- You need like and comment **counts** on the same row as caption, author, and media.
- You want a cookieless, MCP-ready get-post tool rather than a profile-grid crawl.

Start with a single URL for agent calls. Continue with a compact batch when you are archiving a known list. Pair it with [Instagram Post Engagers Scraper](https://apify.com/khadinakbar/instagram-post-engagers-scraper) when the next step is the people who commented.

### Sibling routing

- Profile grid posts → [Instagram Posts Scraper](https://apify.com/khadinakbar/instagram-posts-scraper)
- Profile Reels feed → [Instagram Reels Scraper](https://apify.com/khadinakbar/instagram-reels-scraper)
- Commenter identities from a post URL → [Instagram Post Engagers Scraper](https://apify.com/khadinakbar/instagram-post-engagers-scraper)
- Tagged / UGC discovery → [Instagram Tagged Posts Scraper](https://apify.com/khadinakbar/instagram-tagged-posts-scraper) when you need posts that mention a profile
- Multi-tool profile, posts, Reels, comments → [Instagram MCP Server](https://apify.com/khadinakbar/instagram-mcp-server) when an agent needs several Instagram tools in one call

### Workflow story: from a pasted post URL to an archive row

A competitive-intel analyst drops a rival launch post URL into this Actor. The run starts, the managed provider chain fetches the public post, and one row lands with caption, author handle, like count, comment count, display image, and a short comments preview. She then exports JSON into her briefing doc. When she needs the people who commented, she continues with Instagram Post Engagers Scraper on the same URL.

### Quick start input

```json
{
    "postUrls": [
        "https://www.instagram.com/p/DLNsnpUTdVS/"
    ]
}
```

`postUrls` is the only required field. Accepts `/p/`, `/reel/`, `/tv/` URLs, or a bare shortcode. Unique shortcodes are processed up to `maxPosts` (100).

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `postUrls` | array (required) | Public Instagram post, Reel, or IGTV URLs, or a shortcode |
| `maxPosts` | integer | Budget cap on unique URLs processed (1–100) |
| `includeCommentsPreview` | boolean | Attach visible comments on the post row |
| `maxCommentsPreview` | integer | Cap comments attached per row (0–50) |
| `outputMode` | enum | `full` (default) or `compact` for smaller agent records |
| `providerOrder` | enum | Managed provider priority (`scrapecreators-first` default) |

### What data you receive

One dataset item represents **one public Instagram post or Reel**.

| Field | What it answers |
|---|---|
| `caption`, `hashtags`, `mentions` | **What** was posted |
| `authorUsername`, `authorName`, `authorUrl`, `authorFollowers` | **Who** posted it |
| `likeCount`, `commentCount`, `viewCount` | **How** it is performing publicly (`viewCount` is Instagram-only play/view count) |
| `displayUrl`, `videoUrl`, `mediaUrls`, `musicTitle`, `musicArtist` | **Media** and Reel audio when exposed |
| `commentsPreview[]` | **Top visible comments** on the same row |
| `postUrl`, `shortcode`, `postKind`, `publishedAt`, `provider`, `scrapedAt` | **Provenance** |

```json
{
    "postUrl": "https://www.instagram.com/p/DLNsnpUTdVS/",
    "shortcode": "DLNsnpUTdVS",
    "postKind": "image",
    "caption": "A wildlife photo with #wildlife",
    "publishedAt": "2025-07-01T12:00:00.000Z",
    "authorUsername": "natgeo",
    "authorName": "National Geographic",
    "authorUrl": "https://www.instagram.com/natgeo/",
    "likeCount": 72581,
    "commentCount": 220,
    "provider": "scrapecreators",
    "scrapedAt": "2026-01-15T12:00:00.000Z"
}
```

Download the dataset as JSON, CSV, Excel, or HTML. Every terminal run also writes `OUTPUT` and `RUN_SUMMARY` with `outcome` (`COMPLETE` / `PARTIAL` / `VALID_EMPTY` / `INVALID_INPUT` / `UPSTREAM_FAILED` / `CONFIG_ERROR`). Inspect that outcome, then read the dataset. Each row keeps `postUrl`, `provider`, and `scrapedAt` as provenance.

### Best results guidance

- Provide a public post or Reel URL you can open while logged out.
- Start with one URL for agent calls; schedule a compact batch of known URLs for archive jobs.
- Confirm the source is a post, Reel, or IGTV URL. Profile, hashtag, and story URLs belong on the sibling scrapers above.
- Validate `OUTPUT.outcome` before treating an empty dataset as a product issue: missing posts report `VALID_EMPTY` with zero `post-scraped` charges.

### Why AI agents and MCP clients choose this Actor

- **One required input.** `postUrls` is the only required field.
- **Predictable cost.** Saved posts use the `post-scraped` Pay per event unit; see the live Pricing tab.
- **Structured output.** Stable keys plus a published dataset schema.
- **Honest outcomes.** Inspect `OUTPUT` for `INVALID_INPUT`, `VALID_EMPTY`, or `UPSTREAM_FAILED`, then read the dataset.

> Get the full public details for this Instagram post URL: caption, author, likes, comments, IG-only views, media, and provenance. Return the dataset row and the run outcome.

MCP tool name: `apify--instagram-post-details-scraper`. Hosted setup lives at [mcp.apify.com](https://mcp.apify.com). After the call, read the dataset, keep `postUrl` / `provider` / `scrapedAt`, and respect the run cost cap.

### Pricing — Pay per event + platform usage

| Event | Charged when |
|---|---|
| Actor start | Once per run |
| `post-scraped` | One public post or Reel row saved to the dataset |

Pay per event plus Apify platform usage. When you need current event amounts, open the live [Pricing tab](https://apify.com/khadinakbar/instagram-post-details-scraper/pricing). Missing posts are unbilled. Compact and full modes share the same event.

### Use through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~instagram-post-details-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postUrls":["https://www.instagram.com/p/DLNsnpUTdVS/"]}'
```

### Integrations and chaining

- Archive then people: this Actor, then [Instagram Post Engagers Scraper](https://apify.com/khadinakbar/instagram-post-engagers-scraper) for commenter rows.
- Discover then details: [Instagram Posts Scraper](https://apify.com/khadinakbar/instagram-posts-scraper) or [Instagram Reels Scraper](https://apify.com/khadinakbar/instagram-reels-scraper) to collect URLs, then pass those URLs here.

### Scope, data boundary, and recovery

Public, logged-out visible posts and Reels only. `viewCount` is Instagram-only play/view count. Like counts are public totals; liker identities, shares, saves, and owner insights stay behind Instagram login. Dual-provider fallback uses owner-managed ScrapeCreators then SociaVault. Owner secrets, never caller API keys.

### Builder's note

I built this after probing both public-data providers on a live photo URL and a live Reel URL. Both return the same public Graph object — caption, author, likes, comments, media, and Reel play count plus music — and neither exposes who liked the post. That is why this Actor is a get-post-details tool with honest public counts.

### FAQ

**Are like identities included?** Like counts are public totals. For commenter identities, continue with Instagram Post Engagers Scraper.

**Is Instagram login required?** Public posts and Reels work without login or cookies.

**What happens when a post is gone?** The Actor reports `VALID_EMPTY` with zero `post-scraped` charges when every URL is missing.

### Legal

This Actor retrieves publicly available data. You are responsible for complying with Instagram's Terms of Service, applicable data-protection laws (GDPR/CCPA), and Apify's [Exclusion Policy](https://apify.com/terms/exclusion-policy) when using the results.

Instagram is a trademark of its owner. This independent Actor is not affiliated with, associated with, or endorsed by Instagram or Meta.

# Changelog

This Actor's version history is a separate document: https://apify.com/khadinakbar/instagram-post-details-scraper/changelog.md

# Actor input Schema

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

Public Instagram post, Reel, or IGTV URLs to fetch. Accepts https://www.instagram.com/p/DLNsnpUTdVS/, /reel/{shortcode}/, /tv/{shortcode}/, or a bare shortcode like DLNsnpUTdVS. Up to 100 URLs per run. NOT profile, hashtag, or story URLs — use a profile or hashtag scraper for those.

## `maxPosts` (type: `integer`):

Hard cap on how many unique post or Reel URLs to fetch in one run, protecting your budget. Defaults to 100 (the absolute max). Extra URLs beyond this cap are skipped and noted in the run summary. Does not invent posts that were not supplied in postUrls.

## `includeCommentsPreview` (type: `boolean`):

When true (default), each post row includes a commentsPreview array of visible public comments (username, profile URL, text). This is a preview attached to the post row, not a full thread export. Turn off to keep records smaller. For one-row-per-commenter leads use instagram-post-engagers-scraper.

## `maxCommentsPreview` (type: `integer`):

Maximum number of visible comments to attach on each post row when includeCommentsPreview is true. Default is 10. Maximum is 50. This caps output size; it does not create comments that the public provider did not return.

## `outputMode` (type: `string`):

How much per-post data to return. 'full' (default) keeps complete caption, media URL list, music, tagged users, and comments preview. 'compact' truncates caption to 500 characters and drops extra media URLs, music, and author image for smaller agent records. Pricing is identical in both modes.

## `providerOrder` (type: `string`):

Which managed public-data provider to try first. 'scrapecreators-first' (default) uses ScrapeCreators then falls back to SociaVault. 'sociavault-first' reverses it. The '-only' values disable fallback. Leave default unless one provider is degraded. NOT a place for API keys — keys are owner secrets.

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

How many post URLs to fetch in parallel. Default is 2. Range is 1–5. Raise only after watching provider pacing in the log. Does not increase the maxPosts cap.

## `includeRawData` (type: `boolean`):

When true, each output row also includes the unmodified provider JSON under rawPost for debugging or accessing fields not yet mapped. Defaults to false to keep records small and agent-friendly. Turn on only when you need fields the normalized schema does not expose yet.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DLNsnpUTdVS/"
  ],
  "maxPosts": 10,
  "includeCommentsPreview": true,
  "maxCommentsPreview": 10,
  "outputMode": "full",
  "providerOrder": "scrapecreators-first",
  "maxConcurrency": 2,
  "includeRawData": false
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items containing caption, author, likes, comments, IG-only views, media, and optional comments preview.

## `outputRecord` (type: `string`):

Compact terminal contract with outcome, itemsPushed, and chargedEventCounts.

## `runSummary` (type: `string`):

Detailed run diagnostics including per-post results, provider status codes, and billing counters.

# 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/p/DLNsnpUTdVS/"
    ],
    "maxPosts": 10,
    "maxCommentsPreview": 10,
    "maxConcurrency": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/instagram-post-details-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/p/DLNsnpUTdVS/"],
    "maxPosts": 10,
    "maxCommentsPreview": 10,
    "maxConcurrency": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/instagram-post-details-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/p/DLNsnpUTdVS/"
  ],
  "maxPosts": 10,
  "maxCommentsPreview": 10,
  "maxConcurrency": 2
}' |
apify call khadinakbar/instagram-post-details-scraper --silent --output-dataset

```

## MCP server setup

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