# Instagram Media Archive Downloader (`data-slayer/instagram-media-archive-downloader`) Actor

Download public Instagram post, Reel, cover, and carousel media into customer-owned run storage with ordered manifests, file hashes, limits, and truthful retrieval status.

- **URL**: https://apify.com/data-slayer/instagram-media-archive-downloader.md
- **Developed by:** [Data Slayer](https://apify.com/data-slayer) (community)
- **Categories:** Social media, Marketing
- **Stats:** 3 total users, 2 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 public post resolveds

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 Media Archive Downloader

Download the actual files from public Instagram posts, Reels, videos, and carousels into your own Apify run storage, with an ordered manifest that tells you exactly what was stored, skipped, or unavailable.

### Watch the demo

YouTube video coming soon.

### Why use this Actor?

Media links returned by social platforms are delivery links, not an archive. They can expire, change, or require another fetch when your automation finally needs the file. This Actor retrieves the bytes during the run, validates the content, saves each accepted file in your run's key-value store, and gives you a manifest you can audit.

Use it to:

- archive your own or licensed campaign posts before they change;
- collect every ordered slide from a public carousel;
- hand client assets to editing, transcription, or review workflows;
- retain source IDs, file hashes, byte sizes, and retrieval status for research;
- build bounded media-ingestion pipelines without Instagram login cookies.

### Supported inputs

Add 1–10 items in one run. Each item can be:

- a public post URL such as `https://www.instagram.com/p/SHORTCODE/`;
- a public Reel URL such as `https://www.instagram.com/reel/SHORTCODE/`;
- a public TV URL such as `https://www.instagram.com/tv/SHORTCODE/`; or
- a bare post shortcode.

Profile, hashtag, Explore, and story-page URLs are not accepted. Duplicate shortcodes are processed once.

### Choose what to store

- **Download videos** stores Reel, video-post, and video-carousel MP4 files when available.
- **Download images and covers** stores photo posts, image-carousel slides, and available video or Reel cover images.

At least one media type must remain selected.

### Keep every run bounded

Three visible limits protect runtime and cost:

- **Maximum files** — default 100, maximum 200.
- **Maximum size per file** — default 100 MB, maximum 250 MB.
- **Maximum total download size** — default 500 MB, maximum 1,000 MB.

Input size limits use decimal megabytes: 1 MB equals 1,000,000 bytes. The separate storage billing unit is 10 MiB, or 10,485,760 successfully stored bytes.

When a limit is reached, the Actor stops starting new downloads and marks every known remaining asset in the manifest. It does not silently drop carousel positions.

### What you receive

The default dataset contains one manifest row per unique source post. A resolved row is designed to include:

- source post ID, shortcode, canonical post URL, and media type;
- source asset ID and ordered carousel position;
- image, video, or cover classification;
- deterministic storage key and stored record URL;
- validated MIME type, byte size, and SHA-256 hash;
- per-asset retrieval status and a safe error category when applicable;
- expected, stored, skipped, and failed asset counts;
- missing carousel positions and an overall completeness state;
- retrieval timestamp and the run storage retention note.

The run summary records input duplicates, content lookup attempts, retries, downloaded files and bytes, limit stops, complete and partial posts, and spending-limit state. It does not expose private service configuration or temporary delivery URLs.

### Partial failures stay useful

A carousel can contain a mix of images and videos, and individual files can become unavailable at different times. Each asset is handled independently. If one slide times out, exceeds your size cap, returns an unexpected content type, or disappears, the files already stored remain available and the missing position is explicit.

The proposed normalized statuses include:

- `stored`;
- `skipped_file_limit`;
- `skipped_file_size`;
- `skipped_total_size`;
- `not_attempted_charge_limit`;
- `media_unavailable`;
- `invalid_media_content`;
- `unsafe_media_redirect`;
- `retrieval_timeout`;
- `download_failed`; and
- `storage_write_failed`.

Post-level results use `complete`, `partial`, `no_selected_assets`, `not_available`, `failed`, or `not_attempted_charge_limit`. Public errors contain only a normalized `code`, customer-safe `message`, and `retryable` flag.

### Security and file validation

The Actor accepts media downloads only over HTTPS from approved Instagram media hosts. Redirects are limited and every redirect target is checked again. Stored files must use an allowed media MIME type and match the corresponding file signature. Downloads are streamed under byte limits, and private-network or arbitrary external URLs are never fetched from user input.

### Retention and access

Files are written to the default key-value store created for your run. They are isolated in your Apify account and follow your plan's data-retention and access settings. The returned record URL remains usable only while the record and store exist.

An unnamed run store is not a permanent archive. If you need longer retention, preserve or rename the store in Apify and account for the ongoing storage cost. This Actor does not copy files into a developer-owned shared archive.

### Pricing

Pricing is based on public posts successfully resolved and the volume of bytes successfully stored. Failed downloads are not billed as stored bytes. Images, videos, covers, and carousel slides do not carry separate feature add-ons.

| Plan | Resolved post manifest | Each started 10 MiB stored | Run start |
|---|---:|---:|---:|
| Free | $0.0040 | $0.0120 | $0.00005 |
| Bronze | $0.0036 | $0.0105 | $0.00005 |
| Silver | $0.0033 | $0.0095 | $0.00005 |
| Gold | $0.0030 | $0.0087 | $0.00005 |
| Platinum | $0.0030 | $0.0087 | $0.00005 |
| Diamond | $0.0030 | $0.0087 | $0.00005 |

Storage units are rounded once across the whole run, not once per file. Gold, Platinum, and Diamond use identical event prices.

You can set a maximum run charge in Apify. When the remaining limit cannot cover more work, the Actor stops before another lookup or download and keeps the completed manifest.

### Responsible use

Download only public media you have the right to retain and use. Respect copyright, privacy, publicity rights, platform terms, and applicable law. This Actor does not bypass private-account access controls and does not require Instagram login credentials.

### Limits to understand

- Availability is limited to public content that can be resolved at run time.
- A post deleted or restricted before the run may not be retrievable.
- The Actor cannot reconstruct assets that the source no longer serves.
- Retention is controlled by your Apify storage, not guaranteed forever by the Actor.
- Completion means every selected asset observed for that post was stored; it does not claim knowledge of content absent from the retrieval result.

### FAQ

**How much does it cost to run this Actor?**
Pricing is listed in the Pricing section above, charged per row returned. You only pay for the rows
the Actor actually produces, so a small test run costs cents.

**Do I need cookies or a login?**
No. This Actor reads public data only - no cookies, no account, no browser automation.

**Can I schedule it?**
Yes. Run it from the Apify API, on a schedule, or via a webhook, and export results as JSON, CSV or Excel.

**What if I need a slightly different output?**
Open an issue on the Actor's Issues tab describing the shape you need.

### Related actors

More Instagram actors from the same portfolio. Apify only auto-recommends actors in the same category, so here are the rest of ours:

| Actor |
|---|
| [Instagram Audio & Trending Sounds Scraper · No Login](https://apify.com/data-slayer/instagram-audio-scraper) |
| [Instagram Brand Mentions & UGC Monitor](https://apify.com/data-slayer/instagram-brand-monitor) |
| [Instagram Comments Scraper with Replies · No Login](https://apify.com/data-slayer/instagram-comments-scraper-no-login-required) |
| [Instagram Creator Lead Finder · Keywords & Hashtags](https://apify.com/data-slayer/instagram-creator-lead-finder) |
| [Instagram Engaged Audience Exporter](https://apify.com/data-slayer/instagram-engaged-audience-exporter) |
| [Instagram Follower Count & Growth Monitor](https://apify.com/data-slayer/instagram-follower-count-growth-monitor) |
| [Instagram Followers & Following Search](https://apify.com/data-slayer/instagram-followers-following-search) |
| [Instagram Followers Scraper & Enricher · No Login](https://apify.com/data-slayer/instagram-followers-scraper---no-login) |
| [Instagram Following Scraper & Enricher · No Login](https://apify.com/data-slayer/instagram-following) |
| [Instagram Hashtag Finder · No Login](https://apify.com/data-slayer/instagram-hashtags-scraper-no-login-required) |
| [Instagram Hashtag Posts & Reels Scraper · No Login](https://apify.com/data-slayer/instagram-hashtag-posts-reels-scraper-no-login) |
| [Instagram Hashtag Research Reports](https://apify.com/data-slayer/instagram-hashtag-research) |
| [Instagram Highlights Scraper · No Login](https://apify.com/data-slayer/instagram-highlights-scraper) |
| [Instagram Keyword Posts Scraper](https://apify.com/data-slayer/instagram-keyword-posts-scraper) |
| [Instagram Likes Scraper · No Cookies](https://apify.com/data-slayer/instagram-likes) |
| [Instagram Location Posts Scraper · No Login](https://apify.com/data-slayer/instagram-location-posts) |
| [Instagram Place Finder & Details](https://apify.com/data-slayer/instagram-place-finder) |
| [Instagram Post & Reel Details Scraper · No Login](https://apify.com/data-slayer/instagram-post-details) |
| [Instagram Profile Posts & Reels Scraper · No Login](https://apify.com/data-slayer/instagram-posts) |
| [Instagram Profile Reels Scraper · No Login](https://apify.com/data-slayer/instagram-profile-reels) |
| [Instagram Profile Scraper · Account Age & Verified Emails](https://apify.com/data-slayer/instagram-user-info-scraper-cookieless) |
| [Instagram Public Contact Finder](https://apify.com/data-slayer/instagram-email-phone-scraper) |
| [Instagram Reel Performance Tracker](https://apify.com/data-slayer/instagram-reel-performance-tracker) |
| [Instagram Reel Transcript Scraper](https://apify.com/data-slayer/instagram-reel-transcript-scraper) |
| [Instagram Reels Search & Trend Discovery · No Login](https://apify.com/data-slayer/instagram-search-reels) |
| [Instagram Reels by Audio ID · Sound & Music Tracker · No Login](https://apify.com/data-slayer/instagram-reels-by-audio) |
| [Instagram Related Creator Network](https://apify.com/data-slayer/instagram-related-creator-network) |
| [Instagram Reposts Scraper · Profile Repost History · No Login](https://apify.com/data-slayer/instagram-reposts) |
| [Instagram Similar Accounts Scraper · No Login](https://apify.com/data-slayer/instagram-related-profiles-scraper) |
| [Instagram Similar Accounts Scraper · No Login](https://apify.com/data-slayer/instagram-similar-accounts-scraper) |
| [Instagram Stories Scraper · No Login](https://apify.com/data-slayer/instagram-stories-scraper) |
| [Instagram Tagged Posts & Mentions Scraper · No Login](https://apify.com/data-slayer/instagram-tagged-posts) |
| [Instagram Trending Audio & Sounds Search · No Login](https://apify.com/data-slayer/instagram-trending-audio-search) |
| [Instagram User Search · Find Leads by Keyword · No Login](https://apify.com/data-slayer/instagram-search-users) |

# Actor input Schema

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

Add 1–10 public Instagram post, Reel, or TV URLs, or bare shortcodes. Duplicate posts are processed once.

## `downloadVideos` (type: `boolean`):

Store Reel, video-post, and carousel-slide MP4 files when available.

## `downloadImages` (type: `boolean`):

Store photo posts, carousel images, and available video or Reel cover images.

## `maxFiles` (type: `integer`):

Stop starting new downloads after this many unique media files. Every skipped asset is listed in the manifest.

## `maxFileSizeMb` (type: `integer`):

Skip a file when its declared or streamed size exceeds this limit. One MB equals 1,000,000 bytes. Other files continue.

## `maxTotalSizeMb` (type: `integer`):

Stop starting new downloads when stored bytes reach this run-wide limit. One MB equals 1,000,000 bytes. Every remaining asset is listed as not attempted.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/reel/DdRf9lktEb1/",
    "https://www.instagram.com/p/DdY0AWwF5pG/"
  ],
  "downloadVideos": true,
  "downloadImages": true,
  "maxFiles": 100,
  "maxFileSizeMb": 100,
  "maxTotalSizeMb": 500
}
```

# Actor output Schema

## `manifests` (type: `string`):

One manifest row per unique normalized source post.

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

Counts, limits, billing-event counts, and public errors for the run.

## `storedFiles` (type: `string`):

Media records stored in the run's default key-value store.

# 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/reel/DdRf9lktEb1/",
        "https://www.instagram.com/p/DdY0AWwF5pG/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-slayer/instagram-media-archive-downloader").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/reel/DdRf9lktEb1/",
        "https://www.instagram.com/p/DdY0AWwF5pG/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("data-slayer/instagram-media-archive-downloader").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/reel/DdRf9lktEb1/",
    "https://www.instagram.com/p/DdY0AWwF5pG/"
  ]
}' |
apify call data-slayer/instagram-media-archive-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-slayer/instagram-media-archive-downloader"
        }
    }
}
```

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/61qkVbEwgj9earY9g/builds/4Y0D0Prtlm8Z4JSRc/openapi.json
