# Instagram Profile Backup & Media Downloader (`seemuapps/instagram-profile-downloader`) Actor

Back up any public Instagram profile - download every post, Reel, story, and highlight photo/video with direct links and optional saved media files.

- **URL**: https://apify.com/seemuapps/instagram-profile-downloader.md
- **Developed by:** [Andrew](https://apify.com/seemuapps) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 media item backed ups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Instagram Profile Backup & Media Downloader

Back up an entire public Instagram profile — download every post, Reel, story, and highlight photo/video with direct links, no login required.

### What you get

One dataset record per media item, each with:

- `source` — where the item came from: `post`, `story`, or `highlight`
- `mediaId`, `shortcode`, and the item's `url` on Instagram
- `mediaType` (photo / video / carousel), `productType` (feed / clips / story)
- `takenAt` timestamp, and `expiresAt` for active stories
- Full `caption`, `likeCount`, `commentCount`, `playCount`, and `videoDuration`
- `highlightId` and `highlightTitle` for items pulled from highlight reels
- A `downloads` array with one entry per photo/video — carousels get one entry per slide — each with the direct `downloadUrl`, image/video URLs, and pixel dimensions
- With **Save files** on: a permanent `savedUrl` for every file, stored on Apify so links never expire
- Export everything to JSON, CSV, Excel, or Google Sheets straight from the Apify console

### Use cases

- **Profile backup** — keep a complete, restorable copy of your own account's photos and videos
- **Content archiving** — preserve stories and highlights before they disappear or change
- **UGC collection** — gather campaign posts and Reels from creator accounts in one export
- **Account migration** — pull all media out of an old account before moving to a new one
- **Brand monitoring** — snapshot a competitor's public feed for research and analysis

### How to use

1. Enter the Instagram **Username** (with or without @)
2. Pick what to back up: **posts & Reels** (default on), **stories**, and/or **highlights**
3. Optionally enable **Save files to storage** to store every photo/video on Apify with permanent links — Instagram's own CDN links expire after a few hours
4. Set **Max Items** (default 100; 0 = unlimited) and run the actor
5. Results appear in the **Dataset** tab; saved files appear in the **Key-value store** tab

#### Backing up large profiles across runs

The feed is fetched newest-first in pages. After the run finishes, open the **Key-value store** tab → copy the `NEXT_PAGE_ID` value → paste it into **Page ID** on your next run to continue where it stopped. If `NEXT_PAGE_ID` is `null`, you've fetched everything. Stories and highlights are always fetched in full and don't need a cursor.

### Output format

Each dataset record:

```json
{
  "source": "post",
  "username": "natgeo",
  "mediaId": "3957463127796339198",
  "shortcode": "Dbru79IAdH-",
  "url": "https://www.instagram.com/reel/Dbru79IAdH-/",
  "mediaType": "video",
  "productType": "clips",
  "takenAt": "2026-08-06T14:00:02.000Z",
  "expiresAt": null,
  "caption": "This young cub could be king…",
  "likeCount": 207220,
  "commentCount": 1436,
  "playCount": 0,
  "videoDuration": 62.08,
  "highlightId": null,
  "highlightTitle": null,
  "downloads": [
    {
      "index": 0,
      "type": "video",
      "imageUrl": "https://…cdninstagram.com/….jpg",
      "videoUrl": "https://…cdninstagram.com/….mp4",
      "width": 720,
      "height": 1280,
      "downloadUrl": "https://…cdninstagram.com/….mp4",
      "savedUrl": null
    }
  ]
}
```

Carousel posts include one `downloads` entry per slide. When **Save files** is enabled, `savedUrl` holds a permanent link to the stored copy of each file.

### Notes

- Only **public** profiles can be backed up — the run fails with a clear message on private accounts
- Stories cover the last 24 hours only; `expiresAt` tells you when each one disappears
- Direct Instagram CDN links expire after a few hours — turn on **Save files** if you need lasting links

# Actor input Schema

## `username` (type: `string`):

Instagram username (with or without @) of the public profile you want to back up.

## `includePosts` (type: `boolean`):

Back up the profile's feed - photos, carousels, and Reels. Each media item becomes one dataset record with direct download links.

## `includeStories` (type: `boolean`):

Also back up the profile's currently active stories (the ones posted in the last 24 hours).

## `includeHighlights` (type: `boolean`):

Also back up every story saved in the profile's highlight reels. Each highlight item becomes one dataset record.

## `saveFiles` (type: `boolean`):

Also download each photo/video and store it on Apify, returning a permanent link (savedUrl) per file. Instagram's own CDN links expire after a few hours - enable this if you need links that keep working. Slower and uses more storage.

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

Maximum total number of media items (posts + stories + highlight items) to back up in this run. Set 0 for unlimited.

## `pageId` (type: `string`):

Paste NEXT\_PAGE\_ID from the previous run's Key-value store to continue backing up the feed where the last run stopped. Only applies to posts & Reels - stories and highlights are always fetched in full.

## Actor input object example

```json
{
  "username": "natgeo",
  "includePosts": true,
  "includeStories": false,
  "includeHighlights": false,
  "saveFiles": false,
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

Each record contains source (post/story/highlight), mediaId, shortcode, url, mediaType, takenAt, caption, engagement counts, highlight title, and a downloads array with one entry per photo/video (direct URL, dimensions, and savedUrl when Save files is on).

## `nextPageId` (type: `string`):

NEXT\_PAGE\_ID record in the default key-value store. Paste into Page ID on the next run to continue the feed backup; null when every post has been fetched.

## `files` (type: `string`):

When Save files is enabled, every photo/video is stored in the default key-value store and linked from each record's downloads\[].savedUrl field.

# 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 = {
    "username": "natgeo"
};

// Run the Actor and wait for it to finish
const run = await client.actor("seemuapps/instagram-profile-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 = { "username": "natgeo" }

# Run the Actor and wait for it to finish
run = client.actor("seemuapps/instagram-profile-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 '{
  "username": "natgeo"
}' |
apify call seemuapps/instagram-profile-downloader --silent --output-dataset

```

## MCP server setup

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