# Instagram Post Details Scraper - Likes, Comments, Views & Media (`socialscrapers/instagram-post-details-scraper`) Actor

Instagram post details scraper: paste post or reel URLs or shortcodes and get each post's caption, likes, comments count, plays/views, image and video URLs, hashtags, mentions, date, owner and location, plus comments if you want them. No login, no cookies. API, JSON, CSV. $0.32 per 1,000 posts.

- **URL**: https://apify.com/socialscrapers/instagram-post-details-scraper.md
- **Developed by:** [Social Scrapers](https://apify.com/socialscrapers) (community)
- **Categories:** Social media, Marketing, 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.26 / 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 Details Scraper** gets the full details of public Instagram posts and reels from their URLs or shortcodes, with no Instagram account, login or cookies. Paste links and get each post's caption, likes, comments count, plays (views), video length, posting date, owner, location, tagged accounts, hashtags, mentions, and every image and video URL, ready as JSON, CSV or Excel. Add the newest comments when you need them. It costs **$0.32 per 1,000 posts**.

> 💡 **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 Post Details Scraper do?

Instagram Post Details Scraper opens each post or reel you give it the way a logged-out visitor would and saves everything Instagram shows about it, one dataset item per post. You can:

- 🔗 **Look up posts in bulk**: paste `/p/`, `/reel/` and `/tv/` links, links copied from the app with `?igsh=…`, share links (`instagram.com/share/…`) or bare shortcodes such as `DfahZrMjAqq`, as many as you like in one run.
- 📊 **Get engagement numbers**: likes, comments count and reel plays (views) of every post, with its video length and exact posting time.
- 🖼️ **Download the media**: the full-size image, the video file URL, and every slide of a carousel with its own image or video and size.
- 🏷️ **Read the context**: caption, hashtags, @mentions, tagged location, tagged accounts, collaborators and the sound used in a reel.
- 💬 **Add comments if you want them**: turn on **Include comments** to get each post's newest comments (or every comment Instagram shows) with text, date, likes, reply count and commenter.
- 💸 **Pay per post found**: posts that are deleted, private or age-restricted cost nothing.

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 get from an Instagram post?

| Field | What it is |
|---|---|
| `url`, `shortCode`, `id` | The post's link, shortcode and media id |
| `type`, `productType` | `Image`, `Video` or `Sidecar` (carousel); `feed`, `clips` (a reel) or `carousel_container` |
| `caption`, `hashtags`, `mentions` | The caption, its hashtags and its @mentions |
| `likesCount`, `commentsCount`, `videoPlayCount` | Likes, comments and plays (views) |
| `timestamp`, `videoDuration` | When it was posted (UTC) and the video length in seconds |
| `ownerUsername`, `ownerFullName`, `ownerId` | The account that posted it |
| `displayUrl`, `videoUrl`, `images`, `childPosts` | The main image, the video file, and each carousel slide with its own media |
| `dimensionsWidth`, `dimensionsHeight`, `alt` | Size in pixels and Instagram's image description |
| `locationName`, `locationId` | The tagged location, when the post has one |
| `taggedUsers`, `coauthorProducers` | Tagged accounts and collaborators |
| `isPaidPartnership`, `sponsors`, `isCommentsDisabled` | Always `null`: Instagram no longer shows visitors who are not logged in paid partnerships, brand partners or whether comments are turned off |
| `musicInfo` | A reel's sound: artist, song, original audio or not, sound id |
| `latestComments` | The newest comments, when **Include comments** is on |
| `inputUrl`, `scrapedAt` | The link you gave, and when the post was read |

Every item has the same fields in the same order. A field is `null` (or an empty list) when the post leaves it empty or Instagram does not show it. The **Post details** view of the dataset shows the main fields as a table, **Media** the image and video URLs, and **Comments** one row per comment.

### How to get Instagram post details

1. Open Instagram Post Details Scraper and click **Try for free**.
2. Paste post or reel links (or shortcodes) into **Post or reel URLs**, one per line.
3. Optionally turn on **Include comments** and set **Max comments per post**.
4. Click **Start**. The details appear in the dataset as each post is read.
5. Download them as JSON, CSV, Excel or HTML, or read them with the Apify API.

### How much does it cost to get Instagram post details?

You pay per post saved, **$0.32 per 1,000 posts**, platform usage and proxies included. Comments are optional and cost **$0.46 per 1,000 comments** when you turn them on.

| Your Apify plan | Per 1,000 posts | Per 1,000 comments |
|---|---|---|
| Free and Starter (Bronze) | $0.32 | $0.46 |
| Scale (Silver) | $0.288 (−10%) | $0.414 |
| Business (Gold), Platinum and Diamond | $0.256 (−20%) | $0.368 |

Each run also carries Apify's standard start charge of $0.001 (one per GB of memory; Apify then covers the run's first 5 seconds of compute).

- 1,000 post links, details only → **$0.32**
- 1,000 posts with their 20 newest comments → $0.32 + $9.20 = **$9.52**
- 10 viral reels with 500 comments each → $0.0032 + $2.30 = **about $2.30**

Deleted, private and age-restricted posts cost nothing. To cap the cost of a run, set **Maximum cost per run** in the run options: the scraper saves posts until the next one would go over it, then stops cleanly. Apify's free plan includes monthly platform credit, enough to look up thousands of posts.

### Input example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/DfahZrMjAqq/",
    "https://www.instagram.com/reel/Dfc1mYxFevS/",
    "DejHmrpjj-E"
  ],
  "includeComments": false
}
```

| Field | Type | Description |
|---|---|---|
| `postUrls` | array of strings | Post, reel or video links (`/p/...`, `/reel/...`, `/tv/...`, with or without the username before them, any `?igsh=…` parameters), share links, or shortcodes. A link inside other text is read as that link. Duplicates are read once. |
| `includeComments` | boolean | Add each post's newest comments to `latestComments`, charged per comment. Default: off. |
| `maxComments` | integer | With comments on: comments per post, newest first. `0` for every comment Instagram shows. Default: 20. |
| `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 post (the image URL abbreviated):

```json
{
  "inputUrl": "https://www.instagram.com/p/DfahZrMjAqq/",
  "id": "4024676116912147114",
  "type": "Image",
  "productType": "feed",
  "shortCode": "DfahZrMjAqq",
  "url": "https://www.instagram.com/p/DfahZrMjAqq/",
  "caption": "Galaxy in bloom\n\nData from our Hubble, Chandra, and Spitzer telescopes blend to reveal a starburst galaxy ... #NASA #Galaxy #Flower",
  "hashtags": ["NASA", "Galaxy", "Flower"],
  "mentions": [],
  "likesCount": 232125,
  "commentsCount": 764,
  "videoPlayCount": null,
  "videoDuration": null,
  "timestamp": "2026-11-06T21:00:08.000Z",
  "displayUrl": "https://scontent.cdninstagram.com/v/t51.82787-15/8868...jpg",
  "images": [],
  "videoUrl": null,
  "dimensionsHeight": 1440,
  "dimensionsWidth": 1440,
  "alt": null,
  "childPosts": [],
  "ownerId": "528817151",
  "ownerUsername": "nasa",
  "ownerFullName": "NASA",
  "taggedUsers": [],
  "coauthorProducers": [],
  "isPaidPartnership": null,
  "isCommentsDisabled": null,
  "locationName": null,
  "locationId": null,
  "sponsors": null,
  "musicInfo": null,
  "latestComments": [],
  "scrapedAt": "2026-11-12T22:07:24.414Z"
}
```

### Use cases

- **Campaign reporting**: track the likes, comments and views of the posts and reels in a campaign from their links.
- **Influencer and UGC checks**: verify a creator's posts, collaborators and real engagement before you pay.
- **Content archives**: keep the captions, dates and media URLs of posts you reference or monitor.
- **Enriching link lists**: turn a spreadsheet of Instagram links into full post data for dashboards and CRMs.
- **Research and AI datasets**: collect public post details and comments for studies, classification and language models.

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

Call Instagram Post Details 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-post-details-scraper").call(
    run_input={"postUrls": ["https://www.instagram.com/p/DfahZrMjAqq/", "Dfc1mYxFevS"]}
)
for post in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(post["url"], post["likesCount"], post["commentsCount"], post["videoPlayCount"])
```

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('socialscrapers/instagram-post-details-scraper').call({ postUrls: ['DfahZrMjAqq'], includeComments: true, maxComments: 50 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

You can also schedule runs, get a webhook when a run finishes, send the details 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 posts only.** Instagram Post Details Scraper never logs in, so it sees what a logged-out visitor sees. Deleted, private and age-restricted posts are skipped and cost nothing.
- **Plays (views).** `videoPlayCount` is filled in for reels and videos that are among their owner's recent posts; for older ones Instagram does not show plays to logged-out visitors, and the field is `null`.
- **Comments.** Instagram shows logged-out visitors most top-level comments; replies are counted in `repliesCount` but not listed.
- **Time limit.** A run that nears its timeout stops in time, keeps every post it saved and ends as Succeeded, saying so in its status message. Raise the run's timeout for longer lists.
- **A run with 0 results still succeeds, and no results are charged.** When every post is deleted or private, the run ends as Succeeded with a status message naming each entry and why. When no entry holds a post link or shortcode 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."

### FAQ

**Is it legal to scrape Instagram post details?**
Instagram Post Details Scraper collects only public data that anyone can see without logging in. Captions and comments can contain personal data covered by laws such as the GDPR: have a legitimate reason to collect them, and follow Instagram's terms and the laws that apply to you.

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

**Can I scrape reels with it?**
Yes. Reel links work like post links, and a reel comes with its plays, video length, video URL and sound.

**How do I get only the numbers, without comments?**
Leave **Include comments** off (the default). You then pay only for the posts.

**Why is `videoPlayCount` empty for some videos?**
Instagram shows logged-out visitors the plays of an account's recent reels only; older videos come without them.

### 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 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 Scraper](https://apify.com/socialscrapers/instagram-reels-scraper) | Reels, Plays, Likes and Comments |
| [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

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

Posts and reels to get the details of: URLs such as <code>https://www.instagram.com/p/DfahZrMjAqq/</code> or <code>https://www.instagram.com/reel/Dfc1mYxFevS/</code>, or just their shortcodes, such as <code>DfahZrMjAqq</code>. 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 post or reel they open, and a profile link or <code>@handle</code> reads that profile's latest posts. An entry with no post in it is skipped with a warning. Posts that are deleted, private or age-restricted are skipped and never charged.

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

Add each post's newest comments (text, date, likes, reply count and commenter) to its <code>latestComments</code> list, charged per comment. Off: post details only.

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

With comments on: how many of each post's newest comments to add. <code>0</code> adds every comment Instagram shows, up to what one dataset item can hold (about 25,000 comments).

## `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
{
  "postUrls": [
    "https://www.instagram.com/p/DfahZrMjAqq/",
    "https://www.instagram.com/reel/Dfc1mYxFevS/"
  ],
  "includeComments": false,
  "maxComments": 20,
  "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 = {
    "postUrls": [
        "https://www.instagram.com/p/DfahZrMjAqq/",
        "https://www.instagram.com/reel/Dfc1mYxFevS/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/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/DfahZrMjAqq/",
        "https://www.instagram.com/reel/Dfc1mYxFevS/",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/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/DfahZrMjAqq/",
    "https://www.instagram.com/reel/Dfc1mYxFevS/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call socialscrapers/instagram-post-details-scraper --silent --output-dataset

```

## MCP server setup

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