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

📸 Extract detailed Instagram post data effortlessly! Get likes, comments, captions, hashtags & more. Perfect for 📊 analytics, 🎯 marketing research & 📈 performance tracking. Easy setup, powerful results! Supports multiple formats: JSON, CSV, Excel. Start scraping Instagram posts today! 🚀✨

- **URL**: https://apify.com/powerful_bachelor/instagram-post-details-scraper.md
- **Developed by:** [Powerful Bachelor](https://apify.com/powerful_bachelor) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 190 total users, 2 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 2.00 out of 5 stars

## Pricing

$15.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## 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 Tagged & Mentions Posts Scraper PPR](https://apify.com/actor-badge?actor=powerful_bachelor/instagram-post-details-scraper-ppr)

## 📸 Instagram Post Details Scraper - Extract Full Post Data from URLs

Scrape Instagram post details without coding. Extract captions, likes, comments, video URLs, engagement metrics, owner info, and more from any public Instagram post URL. Download data in JSON, CSV, Excel, HTML, or XML format.

### 🚀 What does Instagram Post Details Scraper do?

This Instagram Post Details Scraper allows you to **extract comprehensive data from any Instagram post by URL**. Simply provide one or more post URLs and get structured data back in minutes. Using this simple web scraping tool, you can get:

<table>
<tr>
<td>📝 Post Caption</td>
<td>🔗 Post URL & Short Code</td>
</tr>
<tr>
<td>👍 Like Count</td>
<td>💬 Comment Count</td>
</tr>
<tr>
<td>🎥 Video URL & Duration</td>
<td>👀 Video View & Play Count</td>
</tr>
<tr>
<td>📅 Post Date & Timestamp</td>
<td>🖼️ Display URL & Thumbnail</td>
</tr>
<tr>
<td>💰 Is Paid Partnership</td>
<td>🤝 Is Affiliate Post</td>
</tr>
<tr>
<td>📢 Is Advertisement</td>
<td>🌟 Sponsor Users</td>
</tr>
<tr>
<td>👤 Post Owner Info</td>
<td>💬 Latest Comments</td>
</tr>
<tr>
<td>📍 Location</td>
<td>🏷️ Alt Text</td>
</tr>
</table>

### 🤔 Why scrape Instagram post details?

Instagram post data provides valuable insights for businesses, marketers, and researchers:

- **Content Analysis**: Deep-dive into individual posts to understand what drives engagement
- **Influencer Research**: Analyze post performance metrics for influencer vetting and campaigns
- **Competitor Monitoring**: Track specific competitor posts and benchmark their engagement
- **Sentiment Analysis**: Extract captions and comments for customer feedback analysis
- **Brand Safety**: Check paid partnership labels, affiliate flags, and ad disclosures on posts
- **Market Research**: Gather post-level data to understand audience preferences and trends
- **AI Training**: Build labeled datasets of Instagram posts for machine learning models
- **Reporting & Analytics**: Pull post metrics into dashboards, spreadsheets, or custom reports

### 🛠️ How to scrape Instagram post details (Step-by-Step)

1. **Create a free Apify account** at [apify.com](https://apify.com)
2. **Open Instagram Post Details Scraper** from the Apify Store
3. **Enter Instagram post URLs** - Add one or more post URLs (e.g., `https://www.instagram.com/p/Bq-mIJWgUAU/`)
4. **Click "Save & Start"** - Wait for the scraper to extract data
5. **Download your data** - Export in JSON, CSV, Excel, HTML, or XML format

### 🧾 Example input:

Simply provide a list of Instagram post URLs you want to extract data from.

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

### 📊 Output Example

Each item will be a separate entry in the dataset. You can view the extracted data as an overview table or see all fields in different formats. Export them from the platform onto your computer or integrate with other apps directly.

```json
{
    "post_id": "1927145376125632532",
    "short_code": "Bq-mIJWgUAU",
    "username": "google",
    "thumbnail_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-15/46235000_1964532230299395_5910423360180969851_n.jpg?stp=c0.126.1080.1080a_dst-jpg_e35_s640x640_sh0.08_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=103&_nc_ohc=dcSLZIduNMEQ7kNvgG_RUYs&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAZSuKK0Y-rRI-GlCoikLHcUgSeMCZGkbLVhC8MX0M41g&oe=6771F6E4&_nc_sid=d885a2",
    "is_affiliate": false,
    "is_paid_partnership": false,
    "is_ad": false,
    "is_insights_as_brand": false,
    "is_caption_edited": true,
    "has_ranked_comments": false,
    "like_count": 2126,
    "comment_count": 95,
    "video_view_count": null,
    "video_play_count": null,
    "post_date": "2018-12-04T20:00:52.000Z",
    "display_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-15/46235000_1964532230299395_5910423360180969851_n.jpg?stp=dst-jpg_e15_fr_p1080x1080_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=103&_nc_ohc=dcSLZIduNMEQ7kNvgG_RUYs&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBjmQ-8-7PyeUuIOcpbF-JUvfNo_3h1QVF7QzINQ4m7IA&oe=6771F6E4&_nc_sid=d885a2",
    "alt": "Photo shared by @hikeinlandempire on December 04, 2018 tagging @google, and @googlepixel. ಯಾವುದೇ ಫೋಟೋ ವಿವರಣೆ ಲಭ್ಯವಿಲ್ಲ..",
    "location": null,
    "caption": "Got this shot of @ill_profe at Mt. Rubidoux with my @googlepixel using #nightsight  And no, I'm not sponsored by @Google (but feel free to slide into my DM), I just like bragging to my iPhone friends 🤣  #nativeland: Tongva . . .  #nightphotography #nightshots #teampixel",
    "video_duration": null,
    "video_url": null,
    "sponsor_user": [],
    "upcoming_event": null,
    "owner": {
        "id": "2010716910",
        "username": "hikeinlandempire",
        "is_verified": false,
        "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/20065765_343080616126111_3682358977946976256_a.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=107&_nc_ohc=0rAgbjp6fK0Q7kNvgGZ3lKf&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBwoScKoLmfkkeRV0FGzZechCs-y7O1Hae5pabyIh6DcA&oe=6771D250&_nc_sid=d885a2",
        "blocked_by_viewer": false,
        "restricted_by_viewer": null,
        "followed_by_viewer": false,
        "full_name": "",
        "has_blocked_viewer": false,
        "is_embeds_disabled": false,
        "is_private": false,
        "is_unpublished": false,
        "requested_by_viewer": false,
        "pass_tiering_recommendation": true,
        "edge_owner_to_timeline_media": {
            "count": 1125
        },
        "edge_followed_by": {
            "count": 14186
        }
    },
    "latest_comments": [
        {
            "id": "18022690880158902",
            "text": "🔥",
            "created_at": 1715116412,
            "did_report_as_spam": false,
            "owner": {
                "id": "144966546",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/438621124_1383359178998671_6092909666870954080_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=107&_nc_ohc=HN8kE42HWAAQ7kNvgFAngrh&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYDcEfLBap5C5PBS5njXyjrZTZBRpAISh_OS_Kz_H6qxxQ&oe=6771D477&_nc_sid=d885a2",
                "username": "jeanlucbattini"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 0
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "17904390209909615",
            "text": "Hii",
            "created_at": 1703263032,
            "did_report_as_spam": false,
            "owner": {
                "id": "62842439739",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/404043796_1545156989617702_2760613701731059346_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=110&_nc_ohc=fQPWaE1J3NgQ7kNvgHdebRd&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYB7P37g4KuOd2WCMyRoV9YISz7ti0DWxqeqCauJZUqETQ&oe=6771DA3C&_nc_sid=d885a2",
                "username": "dnyaneshwardongare529"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 0
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "17978023691252499",
            "text": "@hikeinlandempire",
            "created_at": 1692671427,
            "did_report_as_spam": false,
            "owner": {
                "id": "61350563839",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fbth9-1.fna.fbcdn.net/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_ht=instagram.fbth9-1.fna.fbcdn.net&_nc_cat=1&_nc_oc=Q6cZ2AHf4pnfqUfxDwMvptgXo8Mz7-AmmLmTXmFKJGwMLrsG5gwAKgXo7xggf5xoJJhaUZ0&_nc_ohc=enlbsKnUEpgQ7kNvgGgIxEb&_nc_gid=e40668c38e87445e9a2fda30c6aace8c&edm=AP7HCqgBAAAA&ccb=7-5&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.3-ccb7-5&oh=00_AYA7NPEeNhQsRt8VkEU-gGC8tup5y1_x9lG4PypLPrfkCA&oe=6771C9CF&_nc_sid=b09b61",
                "username": "se.rcan2262"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 1
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "17972184221291301",
            "text": "𝐉𝐢𝐬𝐤𝐨 𝐛𝐡𝐢 𝐅𝐨𝐥𝐥𝐨𝐰𝐞𝐫𝐬 𝐥𝐢𝐤𝐞𝐬 𝐕𝐢𝐞𝐰𝐬 𝐜𝐡𝐚𝐡𝐢𝐲𝐞 𝐭𝐨 𝐒𝐌𝐆 𝐤𝐚𝐫𝐨.... 𝐂𝐚𝐥𝐥 𝐦𝐞 ☎️ 𝟖𝟓𝟐𝟏𝟖𝟗𝟐𝟓𝟔𝟐",
            "created_at": 1677393974,
            "did_report_as_spam": false,
            "owner": {
                "id": "12274600046",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/464681142_1052526733018050_7671547865000414193_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=106&_nc_ohc=mL-RqqYDSGEQ7kNvgH3cfFN&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYDkud3oO3UCHHIXysNwuChD4M39zwt8TrB82X0PfkU6Qw&oe=6771C885&_nc_sid=d885a2",
                "username": "makbul.ahmad786"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 1
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "17961439748206466",
            "text": "💸💸",
            "created_at": 1674141404,
            "did_report_as_spam": false,
            "owner": {
                "id": "45262215832",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/141152624_409444990166450_1222245245964228962_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=YdBJ1Ej9I0MQ7kNvgGkz6Cq&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYC-Z8xQ8zaZ05dFBwlVDPf1Bm7nV-J7F-nWdkcURM-w0w&oe=6771E6DE&_nc_sid=d885a2",
                "username": "godof_lf"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 1
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "17943328754517155",
            "text": "Illinois",
            "created_at": 1669242047,
            "did_report_as_spam": false,
            "owner": {
                "id": "53257073359",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/329009013_514184620914620_2143697034704072316_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=108&_nc_ohc=BDzbDGozAG4Q7kNvgE-fdGG&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBIZtB2AfcykMtMHVb6pGEOSq9d5YaVNdQxz-V-SIvKOw&oe=6771C668&_nc_sid=d885a2",
                "username": "gina.fiscus"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 0
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "17954858872982629",
            "text": "😍❤️",
            "created_at": 1664748527,
            "did_report_as_spam": false,
            "owner": {
                "id": "49752602762",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/460538769_1961578477641893_3762268212240578579_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=105&_nc_ohc=eqlqN0_csHEQ7kNvgG5vc45&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCmqH7Iy8eKzcPJCZ8ch_nYtVCtnBR4xbnP3CzCBGvl6A&oe=6771EAFD&_nc_sid=d885a2",
                "username": "exploring_photo_"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 2
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "18175071028217776",
            "text": "Ee",
            "created_at": 1662241701,
            "did_report_as_spam": false,
            "owner": {
                "id": "4338917020",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/387268980_340696465082018_8223437963672147938_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=0TIoQCBsy5AQ7kNvgFkqg3d&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYA32l0Kd0-NyJCy9RCWLx9kg8dFJOqW8i2B7lEO2FJiNg&oe=6771F6A7&_nc_sid=d885a2",
                "username": "only_me_2408"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 0
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        },
        {
            "id": "17938533677363523",
            "text": "E",
            "created_at": 1662241701,
            "did_report_as_spam": false,
            "owner": {
                "id": "4338917020",
                "is_verified": false,
                "profile_pic_url": "https://instagram.fblr23-1.fna.fbcdn.net/v/t51.2885-19/387268980_340696465082018_8223437963672147938_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_ht=instagram.fblr23-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=0TIoQCBsy5AQ7kNvgFkqg3d&_nc_gid=687f32643eb04bb59fab2bcc3d241cf8&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYA32l0Kd0-NyJCy9RCWLx9kg8dFJOqW8i2B7lEO2FJiNg&oe=6771F6A7&_nc_sid=d885a2",
                "username": "only_me_2408"
            },
            "viewer_has_liked": false,
            "edge_liked_by": {
                "count": 0
            },
            "is_restricted_pending": false,
            "edge_threaded_comments": {
                "count": 0,
                "page_info": {
                    "has_next_page": false,
                    "end_cursor": null
                },
                "edges": []
            }
        }
    ]
}
```

### 🔗 Integrations

Instagram Post Details Scraper works with common tools on Apify and beyond:

| Integration           | Description                                             |
| --------------------- | ------------------------------------------------------- |
| **Google Sheets**     | Export or sync scraped data into spreadsheets           |
| **Zapier**            | Connect runs to thousands of other apps                 |
| **Make (Integromat)** | Build multi-step automations around your runs           |
| **Slack**             | Get notified when a run finishes or fails               |
| **Webhooks**          | Call your own URL when a run completes                  |
| **REST API**          | Start runs and fetch datasets from code in any language |

Browse more options on [Apify Integrations](https://apify.com/integrations). For programmatic use, see the [Apify API](https://docs.apify.com/api/v2) and the **API** tab on your Actor in the Apify Console.

### 🔗 Related Instagram Scrapers

| Scraper                                                                                                      | Description                           |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------- |
| [Instagram Followers Count Scraper](http://apify.com/powerful_bachelor/Instagram-Followers-Count-Scraper)    | Extract profile info, followers count |
| [Instagram Post Scraper](http://apify.com/powerful_bachelor/Instagram-Posts-Scraper)                         | Scrape posts from any profile         |
| [Instagram Tagged Posts Scraper](http://apify.com/powerful_bachelor/Instagram-Tagged-Mentions-Posts-Scraper) | Scrape tagged & mentioned posts       |
| [Instagram Profile Scraper Pro](http://apify.com/powerful_bachelor/instagram-profile-scraper-pro)            | Scrape profile engagement metrics     |
| [Instagram Reel Scraper](http://apify.com/powerful_bachelor/Instagram-Profile-Reels-Scraper)                 | Scrapes Instagram Reels data          |

### 💬 Feedback & Support

Found a bug or have a feature request? Please create an issue on the Actor's Issues tab in Apify Console. We're always working to improve this scraper!

### 🚀 Unlock Valuable Insights

Instagram Post Details Scraper is an essential tool for extracting and analyzing data from individual Instagram posts. Whether you're looking to gain insights for market research, conduct sentiment analysis, track influencer performance, or build datasets for AI models, this scraper offers a comprehensive and efficient solution.

### Happy scraping! 🎉

# Actor input Schema

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

Enter the Instagram post URLs you want to scrape. Supports regular posts (/p/), reels (/reel/), TV/IGTV (/tv/)

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/Bq-mIJWgUAU/",
    "https://www.instagram.com/reel/CgzOZz5DWaQ/",
    "https://www.instagram.com/tv/CgzOZz5DWaQ/"
  ]
}
```

# 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/Bq-mIJWgUAU/",
        "https://www.instagram.com/reel/CgzOZz5DWaQ/",
        "https://www.instagram.com/tv/CgzOZz5DWaQ/"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("powerful_bachelor/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/Bq-mIJWgUAU/",
    "https://www.instagram.com/reel/CgzOZz5DWaQ/",
    "https://www.instagram.com/tv/CgzOZz5DWaQ/"
  ]
}' |
apify call powerful_bachelor/instagram-post-details-scraper --silent --output-dataset

```

## MCP server setup

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