# Instagram Posts & Reels Scraper (`instagram-scraper/instagram-posts-reels-scraper`) Actor

Scrape public Instagram posts and Reels from direct URLs or shortcodes. Export captions, media URLs, engagement counts, hashtags, mentions, tagged users, timestamps, owner data, and carousel metadata to a structured dataset.

- **URL**: https://apify.com/instagram-scraper/instagram-posts-reels-scraper.md
- **Developed by:** [Instagram Scraper](https://apify.com/instagram-scraper) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.75 / 1,000 results

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

Extract structured data from public Instagram
posts and Reels by submitting direct URLs or raw shortcodes. This Actor works as
a focused **Instagram post and Reel scraper** in Apify Console and as an
**unofficial API for public Instagram post data** in automated workflows. It is
not an API provided by Instagram or Meta.

The Actor is designed for direct post and Reel lookup. It does not crawl
profiles, hashtags, feeds, Stories, or private account content.

### What does Instagram Posts & Reels Scraper do?

Instagram Posts & Reels Scraper turns a known list of public Instagram post or
Reel URLs into a structured Dataset. Each result includes a
`status`. Results with `status: "ok"` can include the caption, image and video
URLs, engagement counts, hashtags, mentions, tagged users, publication time,
owner data, and available carousel or audio metadata.

Use it to:

- Enrich a list of Instagram URLs or shortcodes with structured post details.
- Analyze captions, hashtags, mentions, engagement, and publishing times.
- Build datasets for public-content research, campaign reporting, or creator
  analysis.
- Retrieve media and thumbnail URLs for downstream workflows.
- Run repeatable jobs through the Apify API, schedules, webhooks, or
  integrations.

### How to scrape Instagram posts and Reels

No coding is required for a first run:

1. Open the Actor in Apify Console and go to the **Input** tab.
2. Add one or more public Instagram post or Reel URLs, or raw shortcodes, to
   **Instagram post/reel URLs or shortcodes**.
3. Click **Save & Start**.
4. When the run finishes, open the **Dataset** or **Output** tab to view the
   results.
5. Download the results or use the **API** tab to consume them
   programmatically.

For a quick test, use an input such as:

```json
{
  "postUrls": [
    "https://www.instagram.com/p/CkYfzMlg62-/",
    "https://i.instagram.com/reel/Cj8HtgJgsei",
    "DeqTKtxtOpP"
  ]
}
```

Start with a small sample before submitting a large batch. This confirms that
the target media is still public and that the returned fields fit your
workflow.

### What Instagram data can the Actor extract?

Each result contains the post details or an availability status. The supported
output fields are listed below.
All results include `status`, `shortcode`, `url`, and `crawled_at`. Media and
author fields are included only in successful results (`status: "ok"`).

| Field | Type | Description |
| --- | --- | --- |
| `status` | `"ok" \| "not_found" \| "restricted"` | Resolution status for this input target. |
| `id` | `string \| null` | Instagram media identity as returned by the selected response. |
| `pk` | `string \| null` | Numeric Instagram media primary key. |
| `shortcode` | `string \| null` | Public shortcode used in the Instagram post or Reel URL. |
| `url` | `string \| null` | Canonical post or reel URL. |
| `from_url` | `string \| null` | Source URL associated with this result. |
| `reel_url` | `string \| null` | Public Instagram post or Reel URL. |
| `caption` | `string \| null` | Post caption text when provided by Instagram. |
| `title` | `string \| null` | Media title when available. |
| `caption_is_edited` | `boolean \| null` | Whether the caption has been edited. |
| `hashtags` | `array<string>` | Hashtags extracted from the caption. |
| `mentions` | `array<string>` | Mentions extracted from the caption, including `@`. |
| `accessibility_caption` | `string \| null` | Instagram accessibility text when available. |
| `user` | `object \| null` | Post author's account details. |
| `owner` | `object \| null` | Post author's profile details, including available post and follower counts. |
| `tagged_user` | `array<object>` | Normalized Instagram users tagged in the media. |
| `has_tagged_users` | `boolean \| null` | Whether Instagram reports tagged users. |
| `coauthor_producers` | `array<object> \| null` | Coauthor accounts. |
| `invited_coauthor_producers` | `array<object> \| null` | Invited coauthor accounts. |
| `location` | `object \| string \| null` | Tagged location details or location name. |
| `media_type` | `integer \| null` | Instagram media type: 1 for image, 2 for video, or 8 for carousel. |
| `product_type` | `string \| null` | Instagram product type, such as feed or clips. |
| `is_video` | `boolean \| null` | Whether the media is a video or Reel. |
| `image` | `string \| null` | Best available preview image URL. |
| `video_url` | `string \| null` | Best available video URL. |
| `dimensions` | `object \| null` | Media width and height when available. |
| `original_width` | `integer \| null` | Original media width in pixels. |
| `original_height` | `integer \| null` | Original media height in pixels. |
| `image_versions2` | `object \| null` | Available image sizes and image URLs. |
| `video_versions` | `array<object> \| null` | Available video versions, resolutions, and URLs. |
| `video_duration` | `integer \| number \| null` | Video duration in seconds. |
| `has_audio` | `boolean \| null` | Whether Instagram reports an audio track. |
| `carousel_media` | `array<object> \| null` | Media objects belonging to the carousel. |
| `carousel_media_count` | `integer \| null` | Number of media items in the carousel. |
| `clips_metadata` | `object \| null` | Reel audio and other clip metadata. |
| `clips_music_attribution_info` | `object \| null` | Music artist, track, and audio attribution details. |
| `clips_attribution_info` | `object \| null` | Clip attribution details. |
| `media_attributions_data` | `array<object> \| null` | Attribution details for the media. |
| `comment_count` | `integer \| number \| null` | Comment count reported by Instagram. |
| `comments` | `array<object> \| null` | Available comment previews. |
| `has_more_comments` | `boolean \| null` | Whether Instagram reports more comments are available. |
| `like_count` | `integer \| number \| null` | Like count reported by Instagram, or -1 when Instagram hides like and view counts. |
| `view_count` | `number \| null` | View count reported by Instagram. |
| `play_count` | `integer \| number \| null` | Play count reported by Instagram. |
| `ig_play_count` | `integer \| number \| null` | Instagram-specific play count when available. |
| `fb_play_count` | `integer \| number \| null` | Facebook-attributed play count when available. |
| `fb_like_count` | `integer \| number \| null` | Facebook-attributed like count when available. |
| `fb_comment_count` | `integer \| number \| null` | Facebook-attributed comment count when available. |
| `media_repost_count` | `number \| null` | Repost count reported by Instagram. |
| `like_and_view_counts_disabled` | `boolean \| null` | Whether Instagram hides like and view counts for this media. |
| `comment_likes_enabled` | `boolean \| null` | Whether comments can receive likes. |
| `comment_threading_enabled` | `boolean \| null` | Whether threaded comment replies are enabled. |
| `comments_disabled` | `boolean \| null` | Whether comments are disabled. |
| `is_ad` | `boolean \| null` | Whether the post is marked as an advertisement. |
| `is_affiliate` | `boolean \| null` | Whether the post contains affiliate content. |
| `affiliate_info` | `object \| null` | Affiliate content details. |
| `is_paid_partnership` | `boolean \| null` | Whether the post is marked as a paid partnership. |
| `is_published` | `boolean \| null` | Whether the media is published. |
| `sponsor_tags` | `array<object> \| null` | Sponsor tags associated with the post. |
| `can_viewer_reshare` | `boolean \| null` | Whether the current viewer can reshare the post. |
| `can_reshare` | `boolean \| null` | Whether Instagram allows resharing the post. |
| `crosspost_metadata` | `object \| null` | Cross-platform posting and engagement metadata. |
| `fb_user_tags` | `object \| array<object> \| null` | Facebook user tags in the original Instagram shape, including an object such as `{"in": []}` or an array of tag objects. |
| `timeline_pinned_user_ids` | `array<string \| integer>` | Timeline pinning identities returned by Instagram. |
| `clips_tab_pinned_user_ids` | `array<string \| integer> \| null` | Account IDs for which this clip is pinned. |
| `taken_at_timestamp` | `integer \| null` | Publication time as Unix seconds. |
| `taken_at` | `string \| null` | UTC ISO 8601 publication time. |
| `crawled_at` | `string` | UTC ISO 8601 time when the item was normalized. |

Field availability varies by post.

### Input

See the Actor's **Input** tab for the current input form and validation rules.
The required `postUrls` field accepts between 1 and 100,000 unique strings. Every
value must use one of these exact forms:

```text
https://www.instagram.com/p/{shortcode}/
https://www.instagram.com/reel/{shortcode}/
https://i.instagram.com/p/{shortcode}/
https://i.instagram.com/reel/{shortcode}/
{shortcode}
```

The trailing slash on a full URL is optional. Query strings, fragments, profile
URLs, Stories URLs, other hosts, and characters outside Instagram's shortcode
alphabet are rejected.

Remove duplicate entries before starting a run. If different URLs or shortcodes
refer to the same post, the Actor processes that post once.

### Output

Results are stored in the run's default Dataset. You can view them as a table or
download the Dataset in formats such as JSON, HTML, CSV, or Excel. You can also
retrieve the results through the Apify API or connect the Dataset to another
service with Apify integrations and webhooks.

The following illustrative JSON array shows complete formatted results for one
Reel and one image carousel post. It includes all fields produced for these
example responses, including author, coauthor, audio, comment, and video
metadata. Optional fields depend on what Instagram returns; their presence and
nested content can differ between posts:

```json
[
  {
    "status": "ok",
    "id": "2961256612645547454_2208713638",
    "pk": "2961256612645547454",
    "shortcode": "CkYfzMlg62-",
    "url": "https://www.instagram.com/reel/CkYfzMlg62-/",
    "from_url": "https://www.instagram.com/reel/CkYfzMlg62-/",
    "reel_url": "https://www.instagram.com/reel/CkYfzMlg62-/",
    "caption": "Example Reel caption #launch @openai",
    "title": "Example product launch",
    "caption_is_edited": false,
    "hashtags": [
      "#launch"
    ],
    "mentions": [
      "@openai"
    ],
    "accessibility_caption": null,
    "user": {
      "pk": "2208713638",
      "username": "examplereelcreator",
      "full_name": "Example Reel Creator",
      "is_private": false,
      "is_verified": false,
      "profile_pic_url": "https://example.com/reel-creator.jpg"
    },
    "owner": {
      "id": "2208713638",
      "username": "examplereelcreator",
      "full_name": "Example Reel Creator",
      "is_verified": false,
      "profile_pic_url": "https://example.com/reel-creator.jpg",
      "edge_owner_to_timeline_media": {
        "count": 12
      },
      "edge_followed_by": {
        "count": 345
      },
      "post_count": 12,
      "followers": 345
    },
    "tagged_user": [],
    "has_tagged_users": false,
    "coauthor_producers": [
      {
        "id": "987654321",
        "username": "examplecreator",
        "full_name": "Example Creator",
        "is_verified": false,
        "profile_pic_url": "https://example.com/profile.jpg"
      }
    ],
    "invited_coauthor_producers": [],
    "location": null,
    "media_type": 2,
    "product_type": "clips",
    "is_video": true,
    "image": "https://example.com/reel-preview.jpg",
    "video_url": "https://example.com/reel.mp4",
    "dimensions": {
      "width": 1080,
      "height": 1920
    },
    "original_width": 1080,
    "original_height": 1920,
    "image_versions2": {
      "candidates": [
        {
          "url": "https://example.com/reel-preview.jpg",
          "width": 1080,
          "height": 1920
        }
      ]
    },
    "video_versions": [
      {
        "type": 101,
        "width": 1080,
        "height": 1920,
        "url": "https://example.com/reel.mp4"
      }
    ],
    "video_duration": 18.4,
    "has_audio": true,
    "clips_metadata": {
      "audio_type": "original_sounds",
      "achievements_info": {
        "show_achievements": false
      },
      "music_info": null,
      "original_sound_info": {
        "original_audio_title": "Original audio",
        "should_mute_audio": false,
        "audio_asset_id": "123456789012345",
        "consumption_info": {
          "is_trending_in_clips": false,
          "should_mute_audio_reason": "",
          "should_mute_audio_reason_type": null
        },
        "ig_artist": {
          "username": "examplereelcreator",
          "id": "2208713638"
        },
        "is_explicit": false,
        "audio_filter_infos": null
      },
      "originality_info": null,
      "is_shared_to_fb": false
    },
    "clips_music_attribution_info": {
      "artist_name": "Example Reel Creator",
      "song_name": "Original audio",
      "uses_original_audio": true,
      "should_mute_audio": false,
      "should_mute_audio_reason": "",
      "audio_id": "123456789012345"
    },
    "clips_attribution_info": null,
    "media_attributions_data": [],
    "comment_count": 12,
    "comments": [
      {
        "pk": "12345678901234567",
        "text": "Great launch! #inspired @examplecreator",
        "created_at": 1792485060,
        "user": {
          "pk": "987654321",
          "username": "examplecreator"
        },
        "hashtags": [
          "#inspired"
        ],
        "mentions": [
          "@examplecreator"
        ]
      }
    ],
    "has_more_comments": true,
    "like_count": 340,
    "view_count": 1200,
    "play_count": 1200,
    "ig_play_count": 1200,
    "fb_play_count": null,
    "fb_like_count": null,
    "fb_comment_count": null,
    "media_repost_count": 8,
    "like_and_view_counts_disabled": false,
    "comment_likes_enabled": null,
    "comment_threading_enabled": null,
    "comments_disabled": null,
    "is_ad": null,
    "is_affiliate": null,
    "affiliate_info": null,
    "is_paid_partnership": null,
    "is_published": null,
    "sponsor_tags": [],
    "can_viewer_reshare": null,
    "can_reshare": true,
    "crosspost_metadata": {
      "is_feedback_aggregated": false,
      "is_feed_feedback_aggregated": false
    },
    "fb_user_tags": {
      "in": []
    },
    "timeline_pinned_user_ids": [],
    "clips_tab_pinned_user_ids": [],
    "taken_at_timestamp": 1792485000,
    "taken_at": "2026-10-20T08:30:00Z",
    "crawled_at": "2026-10-23T04:15:00Z"
  },
  {
    "status": "ok",
    "id": "4011102717357648463_123456789",
    "pk": "4011102717357648463",
    "shortcode": "DeqTKtxtOpP",
    "url": "https://www.instagram.com/p/DeqTKtxtOpP/",
    "from_url": "https://www.instagram.com/p/DeqTKtxtOpP/",
    "reel_url": "https://www.instagram.com/p/DeqTKtxtOpP/",
    "caption": "Example photo #design",
    "title": null,
    "caption_is_edited": false,
    "hashtags": [
      "#design"
    ],
    "mentions": [],
    "accessibility_caption": "A product on a white background",
    "user": {
      "pk": "123456789",
      "username": "examplephotocreator",
      "full_name": "Example Photo Creator",
      "is_private": false,
      "is_verified": false,
      "profile_pic_url": "https://example.com/photo-creator.jpg"
    },
    "owner": {
      "id": "123456789",
      "username": "examplephotocreator",
      "full_name": "Example Photo Creator",
      "is_verified": false,
      "profile_pic_url": "https://example.com/photo-creator.jpg",
      "edge_owner_to_timeline_media": {
        "count": 24
      },
      "edge_followed_by": {
        "count": 678
      },
      "post_count": 24,
      "followers": 678
    },
    "tagged_user": [
      {
        "pk": "987654321",
        "full_name": "Example Creator",
        "id": "987654321",
        "is_verified": false,
        "profile_pic_url": "https://example.com/profile.jpg",
        "username": "examplecreator"
      }
    ],
    "has_tagged_users": true,
    "coauthor_producers": [],
    "invited_coauthor_producers": [],
    "location": null,
    "media_type": 1,
    "product_type": "feed",
    "is_video": false,
    "image": "https://example.com/photo.jpg",
    "video_url": null,
    "dimensions": {
      "width": 1080,
      "height": 1080
    },
    "original_width": 1080,
    "original_height": 1080,
    "image_versions2": {
      "candidates": [
        {
          "url": "https://example.com/photo.jpg",
          "width": 1080,
          "height": 1080
        }
      ]
    },
    "video_versions": null,
    "video_duration": null,
    "has_audio": null,
    "carousel_media": [
      {
        "id": "4011102717357648461_123456789",
        "pk": "4011102717357648461",
        "media_type": 1,
        "original_width": 1080,
        "original_height": 1080,
        "image_versions2": {
          "candidates": [
            {
              "url": "https://example.com/carousel-1.jpg",
              "width": 1080,
              "height": 1080
            }
          ]
        },
        "video_versions": null,
        "accessibility_caption": "Example product photo 1"
      },
      {
        "id": "4011102717357648462_123456789",
        "pk": "4011102717357648462",
        "media_type": 1,
        "original_width": 1080,
        "original_height": 1080,
        "image_versions2": {
          "candidates": [
            {
              "url": "https://example.com/carousel-2.jpg",
              "width": 1080,
              "height": 1080
            }
          ]
        },
        "video_versions": null,
        "accessibility_caption": "Example product photo 2"
      }
    ],
    "carousel_media_count": 2,
    "clips_attribution_info": null,
    "media_attributions_data": [],
    "comment_count": 4,
    "comments": [],
    "has_more_comments": true,
    "like_count": -1,
    "view_count": null,
    "play_count": null,
    "ig_play_count": null,
    "fb_play_count": null,
    "fb_like_count": null,
    "fb_comment_count": null,
    "media_repost_count": 2,
    "like_and_view_counts_disabled": true,
    "comment_likes_enabled": null,
    "comment_threading_enabled": null,
    "comments_disabled": null,
    "is_ad": null,
    "is_affiliate": null,
    "affiliate_info": null,
    "is_paid_partnership": null,
    "is_published": null,
    "sponsor_tags": [],
    "can_viewer_reshare": null,
    "can_reshare": true,
    "crosspost_metadata": {
      "is_feedback_aggregated": false,
      "is_feed_feedback_aggregated": false
    },
    "fb_user_tags": null,
    "timeline_pinned_user_ids": [],
    "clips_tab_pinned_user_ids": [],
    "taken_at_timestamp": 1792398600,
    "taken_at": "2026-10-19T08:30:00Z",
    "crawled_at": "2026-10-23T04:15:01Z"
  }
]
```

Results with `not_found` or `restricted` status contain only `status`,
`shortcode`, `url`, and `crawled_at`, so you can match them to your input.
Media and author fields are omitted:

```json
[
  {
    "status": "restricted",
    "shortcode": "CKz5-Dvpw40",
    "url": "https://www.instagram.com/p/CKz5-Dvpw40/",
    "crawled_at": "2026-10-23T04:15:02Z"
  },
  {
    "status": "not_found",
    "shortcode": "THISDOESNT99",
    "url": "https://www.instagram.com/p/THISDOESNT99/",
    "crawled_at": "2026-10-23T04:15:03Z"
  }
]
```

#### Access results through the Apify API

The Actor's **API** tab provides ready-to-use examples for HTTP, Python,
JavaScript, the Apify CLI, and other supported clients. Use this synchronous
HTTP request to run the Actor and retrieve its Dataset items:

```bash
curl --request POST \
  "https://api.apify.com/v2/acts/lqkZr0IvgNpVQwFgY/run-sync-get-dataset-items" \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "postUrls": [
      "https://www.instagram.com/p/CkYfzMlg62-/",
      "Cj8HtgJgsei"
    ]
  }'
```

Keep your Apify API token private and use an environment variable rather than
committing it to source control.

### How much does it cost to scrape Instagram posts?

Check the Actor's **Pricing** tab for current rates and billing details. Start
with a small sample to estimate the cost before submitting a large batch.

Depending on the billing model shown in the Pricing tab, every Dataset
row—including `not_found` and `restricted` rows—may count as a result.

### Limitations

- Only public post and Reel URLs or shortcodes are supported.
- Some posts may be unavailable because they are private, restricted, or require
  an Instagram login. If the Actor cannot determine a post's availability after
  retries, that input may have no Dataset result.
- Available fields depend on what Instagram returns and can change when its
  public responses change.
- Engagement counts and media links reflect the data available at scrape
  time. The Actor does not guarantee real-time values or permanently
  downloadable media.
- Carousel results may include fewer images or videos than the reported total
  if Instagram does not make all items available.

### Related Instagram Actors

Need a profile-focused or discovery workflow instead of direct post and Reel
lookup? Explore the full [Instagram Scraper Public Actors
collection](https://apify.com/instagram-scraper), or use one of these related
Actors:

| Actor | Best for |
| --- | --- |
| [Fast Instagram Profile Posts Scraper](https://apify.com/instagram-scraper/fast-instagram-post-scraper) | Fast extraction of structured post metadata from public Instagram profiles. |
| [Fast Instagram Profile Reels Scraper](https://apify.com/instagram-scraper/instagram-profile-reels-scraper) | Scraping public Reels from a profile's Reels tab. |
| [Instagram Related Profiles Scraper](https://apify.com/instagram-scraper/instagram-related-profiles) | Collecting public profile data, profile statistics, and recursively discovered related profiles. |
| [Instagram Profile Posts Scraper](https://apify.com/instagram-scraper/instagram-profile-posts-scraper) | Extracting posts from public profiles with post and engagement metadata when available. |
| [Instagram Profile Scraper](https://apify.com/instagram-scraper/instagram-profile-scraper) | Scraping public profile identity, statistics, account flags, and optional post previews. |
| [Instagram Profile Finder](https://apify.com/instagram-scraper/instagram-profile-finder) | Discovering public Instagram profiles through Google Search and returning structured profile data. |
| [Instagram User ID Profile Scraper](https://apify.com/instagram-scraper/instagram-user-id-profile-scraper) | Looking up public Instagram profile data by numeric user ID. |

### FAQ

#### Is this an official Instagram or Meta API?

No. This Actor is an independent tool, not an API provided by Instagram or
Meta. It retrieves structured data from publicly accessible Instagram posts and
Reels and can be run through Apify Console or the Apify API.

#### Can this Actor scrape an Instagram profile, hashtag, or feed?

No. It resolves known public post and Reel URLs or raw shortcodes. It does not
discover posts from profiles, hashtags, feeds, or search results.

#### What do the output statuses mean?

| Status | Meaning |
| --- | --- |
| `ok` | The post or Reel was retrieved successfully. |
| `not_found` | Instagram indicates that the post or Reel could not be found. |
| `restricted` | The post details could not be accessed, and the Actor classified the result as restricted. This does not identify the specific restriction. |

#### Why did a valid-looking URL still produce no Dataset item?

A result may be missing if a request keeps failing or the Actor cannot determine
whether a post is missing or restricted. Check the run log for errors and retry
the affected URLs later.

#### Can a stopped run continue without scraping completed results again?

Yes. When the run reaches its result or charge budget, it stops starting new
work and lets active batches finish. Complete results that could not be written
to the Dataset are saved in the run's key-value store. During a graceful stop
or migration, the Actor also saves recovery state after active batches settle.

Increase the budget if needed and **resurrect the same run**, keeping its input
and storage. The Actor checks the existing Dataset, writes saved results
directly, and then processes any unfinished inputs. For example, if 100 results
are complete but the budget allows only 10 to be stored, the remaining 90 are
saved for direct writing when the run resumes. Saved results retain their
original scrape-time data, including media links and timestamps.

Recovery writes still follow the run's billing rules. If the available budget
is exhausted again, the remaining saved results are retained for the next
resurrection. This recovery depends on the run having time to finish its
shutdown and save state; an immediate forced termination can interrupt it.

#### Why is `like_count` equal to `-1`?

When Instagram explicitly reports that like and view counts are hidden, the
Actor sets `like_count` to `-1` and
`like_and_view_counts_disabled` to `true`. When the count is simply unavailable,
`like_count` is `null` instead.

#### Why are some fields `null` or some arrays empty?

For successful results (`status: "ok"`), field availability varies between image
posts, videos, Reels, and carousels and depends on what Instagram makes
available. Missing details use `null`, while
lists such as `hashtags`, `mentions`, and `tagged_user` are empty when no values
are available. Results with `not_found` or `restricted` status contain only
`status`, `shortcode`, `url`, and `crawled_at`.

#### Are results returned in the same order as the input?

Not necessarily. Use `shortcode` or `url` to match each result to its input.

#### Can I use query parameters in an Instagram URL?

No. Remove query strings and fragments before adding a URL. Submit the canonical
`/p/{shortcode}/` or `/reel/{shortcode}/` form, or submit the shortcode alone.

#### How can I report a problem or request a field?

Use the Actor's **Issues** tab and include a public example URL, the run ID, and
the field or behavior you expected. Do not include your API token, proxy
credentials, cookies, or other secrets.

### Responsible use

This Actor retrieves publicly accessible Instagram post and Reel data without
requiring Instagram login credentials or accessing private content. You are
responsible for complying with applicable laws, Instagram and Meta terms,
privacy and data-protection obligations, and third-party intellectual-property
rights. Public availability and returned media URLs do not grant permission or
a license to republish or commercially use the underlying content.

Results are stored in the run's default Apify Dataset according to the user's
Apify storage and retention settings. This Actor is independent and is not
affiliated with, endorsed by, or sponsored by Instagram or Meta.

# Actor input Schema

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

Add Instagram post or reel URLs from www.instagram.com or i.instagram.com, or raw shortcodes.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/CkYfzMlg62-/",
    "Cj8HtgJgsei"
  ]
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("instagram-scraper/instagram-posts-reels-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/CkYfzMlg62-/",
        "Cj8HtgJgsei",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("instagram-scraper/instagram-posts-reels-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/CkYfzMlg62-/",
    "Cj8HtgJgsei"
  ]
}' |
apify call instagram-scraper/instagram-posts-reels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,instagram-scraper/instagram-posts-reels-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/lqkZr0IvgNpVQwFgY/builds/rWzTtZIXcPbfz45UT/openapi.json
