# Instagram Post Details Scraper (`fetch_cat/instagram-post-details-scraper`) Actor

Extract public Instagram post captions, authors, timestamps, media URLs, and visible engagement metrics from direct post URLs.

- **URL**: https://apify.com/fetch\_cat/instagram-post-details-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 94.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.48 / 1,000 item processeds

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/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 Details Scraper

Extract structured metadata from direct public Instagram post URLs. Paste `/p/{shortcode}/` links and get normalized post details for reporting, research, enrichment, exports, API workflows, and AI agents.

### At a glance

- **Primary job**: Turn public Instagram post URLs into clean dataset rows.
- **Input**: Direct public Instagram `/p/` post URLs.
- **Output**: Caption, author, shortcode, timestamp, visible engagement counts, media links, and diagnostics.
- **Best for**: Social media analysis, creator research, brand monitoring, compliance review, and content datasets.

### Who is this for?

- **Social media analysts** tracking public post performance from known URLs.
- **Influencer and creator marketers** auditing campaign posts without crawling full profiles.
- **Brand, compliance, and research teams** collecting normalized public post records for review.
- **AI and automation builders** feeding public post metadata into reports, alerts, or enrichment pipelines.

### Use cases

- **Campaign reporting**: Export captions, authors, dates, and visible engagement for a curated URL list.
- **Content research**: Build datasets from public posts you already know about.
- **Compliance review**: Keep reproducible records of public post metadata and capture missing/error diagnostics.
- **Workflow automation**: Trigger runs from API, Zapier-like tools, or MCP agents and process the dataset downstream.

### Input recipes

- **Small smoke test**: Use one public post URL and `maxItems: 1`.
- **Campaign audit**: Paste a list of saved campaign post URLs and export owner, caption, date, likes, and comments.
- **Research dataset**: Schedule repeat runs for the same URL list to refresh public metadata over time.

### What data can you extract?

| Field | Description |
| --- | --- |
| `inputUrl` | Original URL from your input. |
| `status` | `success` or `error` for each input URL. |
| `shortCode` | Instagram post shortcode. |
| `url` | Normalized canonical post URL. |
| `ownerUsername` | Public username shown in post metadata. |
| `ownerFullName` | Public display name when visible. |
| `ownerId` | Public Instagram owner ID when exposed. |
| `ownerProfileUrl` | Instagram profile URL for the owner. |
| `caption` | Public post caption when visible. |
| `hashtags` | Hashtags parsed from the caption. |
| `mentions` | Mentioned usernames parsed from the caption. |
| `timestamp` | Public post date/time when visible. |
| `likesCount` | Public like count when visible. |
| `commentsCount` | Public comment count when visible. |
| `viewsCount` | Public view count when visible. |
| `isVideo` | Whether the post exposes a video URL. |
| `isCarousel` | Whether the page indicates a carousel/sidecar post. |
| `displayUrl` | Public image/display URL when exposed and requested. |
| `videoUrl` | Public video URL when exposed and requested. |
| `thumbnailUrl` | Public thumbnail URL when exposed and requested. |
| `missingFields` | Fields not visible in the public page metadata. |
| `errorType`, `errorMessage` | Diagnostics for invalid, blocked, deleted, or unsupported URLs. |
| `scrapedAt` | Timestamp when the row was saved. |

### Input configuration

| Setting | JSON key | Use it for | Example |
| --- | --- | --- | --- |
| Post URLs | `startUrls` | Direct public Instagram `/p/{shortcode}/` URLs. | `https://www.instagram.com/p/DWZitMjgHp1/` |
| Maximum URLs | `maxItems` | Cap how many URLs are processed from the list. | `3` |
| Include media URLs | `includeMediaUrls` | Include public thumbnail/display/video URLs when exposed. | `true` |
| Proxy configuration | `proxyConfiguration` | Use Apify Proxy for more reliable Instagram access. | Residential Apify Proxy |

### Example input

```json
{
  "startUrls": [
    { "url": "https://www.instagram.com/p/DWZitMjgHp1/" }
  ],
  "maxItems": 1,
  "includeMediaUrls": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Example output

```json
{
  "inputUrl": "https://www.instagram.com/p/DWZitMjgHp1/",
  "status": "success",
  "shortCode": "DWZitMjgHp1",
  "url": "https://www.instagram.com/p/DWZitMjgHp1/",
  "type": "post",
  "ownerUsername": "cristiano",
  "ownerFullName": "Cristiano Ronaldo",
  "ownerProfileUrl": "https://www.instagram.com/cristiano/",
  "caption": "On the ball ⚽️",
  "hashtags": [],
  "mentions": [],
  "timestamp": "2026-03-27T00:00:00.000Z",
  "likesCount": 3000000,
  "commentsCount": 28000,
  "isVideo": false,
  "isCarousel": false,
  "missingFields": [],
  "scrapedAt": "2026-07-15T08:49:40.909Z"
}
```

### Pricing

| Event | Free | Bronze | Silver | Gold | Platinum | Diamond | Charged when |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | --- |
| Run start | `$0.005` | `$0.005` | `$0.005` | `$0.005` | `$0.005` | `$0.005` | Once when the Actor starts. |
| Item processed | `$0.006665` | `$0.0057957` | `$0.0045206` | `$0.0034774` | `$0.0023183` | `$0.0016228` | Each successful post detail row is saved. |

Pricing will be recalibrated from cloud cost measurements before Store publication.

### Tips for best results

- **Use direct post links**: This Actor is for `/p/{shortcode}/` URLs, not profile, hashtag, search, or comment URLs.
- **Start small**: Test 1-3 URLs before running larger batches.
- **Expect missing fields**: Instagram may hide likes, comments, dates, or media URLs on some public posts. Missing public fields are listed in `missingFields`.
- **Use proxies**: Residential proxy is prefilled because Instagram often rate-limits cloud traffic.

### API usage

Node.js:

```js
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("fetch_cat/instagram-post-details-scraper").call({
  startUrls: [{ url: "https://www.instagram.com/p/DWZitMjgHp1/" }],
  maxItems: 1,
  includeMediaUrls: true
});
console.log(run.defaultDatasetId);
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("fetch_cat/instagram-post-details-scraper").call(run_input={
    "startUrls": [{ "url": "https://www.instagram.com/p/DWZitMjgHp1/" }],
    "maxItems": 1,
    "includeMediaUrls": True,
})
print(run["defaultDatasetId"])
```

cURL:

```bash
curl -X POST "https://api.apify.com/v2/acts/fetch_cat~instagram-post-details-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://www.instagram.com/p/DWZitMjgHp1/"}],"maxItems":1,"includeMediaUrls":true}'
```

### MCP and AI agents

Use this Actor from MCP-compatible tools through the official Apify MCP Server.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=fetch_cat/instagram-post-details-scraper"
```

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

Example prompt: "Run Instagram Post Details Scraper for these public post URLs and summarize captions, owners, and visible engagement."

### Limits and caveats

- Public direct Instagram post URLs only. Private, deleted, age-gated, login-only, profile, hashtag, search, follower, liker, DM, and comment-thread data are out of scope.
- Visible public metrics can be hidden or rounded by Instagram.
- Instagram may throttle large or frequent runs; keep concurrency low and use proxies.
- Error rows are saved for invalid or unsupported URLs so batch runs are easier to debug.

### Legality and responsible use

Process only public data that you are allowed to access. Follow Instagram's terms, Apify's terms, and applicable laws. Do not use this Actor for private account data, login-only data, or personal data misuse.

### Related actors

- [Instagram Profile Posts Scraper](https://apify.com/fetch_cat/instagram-profile-posts-scraper)
- [Instagram Reel Scraper](https://apify.com/fetch_cat/instagram-reel-scraper)
- [Instagram Profile Scraper](https://apify.com/fetch_cat/instagram-profile-scraper)

### FAQ

#### Does it scrape comments or likers?

No. V1 returns post-level public metadata only. Comment threads, likers, followers, and private account analytics are not included.

#### Why are some fields empty?

Instagram does not expose every field for every public post. The Actor leaves unavailable fields empty and lists them in `missingFields` instead of guessing.

#### Can I export results?

Yes. Apify datasets support JSON, CSV, Excel, XML, RSS, and API access.

### Support

Open an issue from the Actor page if a run fails or output looks wrong. Include the run ID or run URL, input JSON, expected output, actual output, and one reproducible public URL.

# Actor input Schema

## `startUrls` (type: `array`):

Direct public Instagram post URLs in /p/{shortcode}/ format. Profile, hashtag, search, private, and login-only URLs are not supported.

## `maxItems` (type: `integer`):

Safety cap for how many input URLs are processed from the list.

## `includeMediaUrls` (type: `boolean`):

Include public thumbnail/display/video URLs when Instagram exposes them in the page metadata.

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

Instagram often rate-limits cloud traffic. Residential Apify Proxy is prefilled for reliability.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.instagram.com/p/DWZitMjgHp1/"
    }
  ],
  "maxItems": 3,
  "includeMediaUrls": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://www.instagram.com/p/DWZitMjgHp1/"
        }
    ]
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

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