# Instagram Video Downloader (`eunit/instagram-video-and-reel-downloader`) Actor

Download public Instagram Reels, video posts, and IGTV links with this Apify Actor. Extract direct video URLs, metadata, thumbnails, and optional stored files for automation, backups, and content workflows.

- **URL**: https://apify.com/eunit/instagram-video-and-reel-downloader.md
- **Developed by:** [Emmanuel Uchenna](https://apify.com/eunit) (community)
- **Categories:** Videos, Social media, Automation
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $90.00 / 1,000 each instagram video scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

### What does Instagram Video Downloader do?

**Instagram Video Downloader** helps you **download public Instagram Reels, video posts, and IGTV links** with Apify. Extract direct video URLs, metadata, thumbnails, and optional stored files for automation, backups, and content workflows.

### Why use Instagram Video Downloader?

This Actor is useful when you need a repeatable workflow for public Instagram video assets instead of a one-off browser tool.

- Archive your own published Reels or IGTV videos
- Feed public video links into downstream automations
- Save resolved download URLs for dashboards, approvals, or content operations
- Optionally persist files in Apify storage for later processing
- Apply PPE pricing cleanly around one processed Instagram URL at a time

### How to use Instagram Video Downloader

1. Open the Actor in Apify Console and go to the **Input** tab.
2. Paste one or more public Instagram `/reel/`, `/p/`, or `/tv/` URLs into `startUrls`.
3. Choose whether to store the resolved video files, thumbnails, or page HTML snapshots.
4. Adjust concurrency, retries, timeout, and proxy settings if needed.
5. Run the Actor.
6. Review the dataset output for resolved `videoUrl` values and optional key-value store references.

### Input

The Actor accepts these main input fields:

- `startUrls`: Required array of public Instagram post URLs
- `storeVideoFiles`: Download each resolved video file into the default key-value store
- `storeThumbnailFiles`: Download each resolved thumbnail image into the key-value store
- `includePageHtml`: Save the fetched Instagram HTML for debugging
- `filenamePrefix`: Prefix used for stored file names
- `maxConcurrency`, `maxRequestRetries`, `requestTimeoutSecs`: Runtime tuning options
- `proxyConfiguration`: Optional proxy settings from the Apify proxy editor

Example input:

```json
{
  "startUrls": [
    { "url": "https://www.instagram.com/p/C/" },
    { "url": "https://www.instagram.com/p/Cx4R5s6DeFg/" }
  ],
  "storeVideoFiles": true,
  "storeThumbnailFiles": false,
  "includePageHtml": false,
  "filenamePrefix": "campaign-archive",
  "maxConcurrency": 3,
  "maxRequestRetries": 2,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

### Output

Each processed URL produces one dataset item. Successful items include the resolved video URL and optional storage references. Failed items stay in the dataset with an error code and message so the run remains auditable.

Example dataset item:

```json
[
  {
    "status": "ready",
    "inputUrl": "https://www.instagram.com/p/C/",
    "canonicalUrl": "https://www.instagram.com/p/C/",
    "shortcode": "Cx1Q2a3BCdE",
    "mediaType": "reel",
    "title": "Instagram video",
    "description": "Public Instagram Reel",
    "videoUrl": "https://instagram.fxyz1-1.fna.fbcdn.net/o1/v/t16/f1/m86/...",
    "thumbnailUrl": "https://instagram.fxyz1-1.fna.fbcdn.net/v/t51.2885-15/...",
    "videoStoreKey": "video-campaign-archive-cx1q2a3bcde.mp4",
    "videoPublicUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/video-campaign-archive-cx1q2a3bcde.mp4",
    "thumbnailStoreKey": null,
    "thumbnailPublicUrl": null,
    "htmlStoreKey": null,
    "uploadDate": "2025-01-16T18:42:10.000Z",
    "fetchedAt": "2026-06-14T10:00:00.000Z",
    "errorCode": null,
    "errorMessage": null
  }
]
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Data table

| Field | Description |
| --- | --- |
| `status` | `ready` when a video URL was resolved, otherwise `error` |
| `canonicalUrl` | Canonical Instagram page URL used for the item |
| `shortcode` | Instagram shortcode extracted from the URL |
| `mediaType` | `reel`, `post`, or `tv` |
| `videoUrl` | Direct video URL resolved from the public page |
| `thumbnailUrl` | Main public thumbnail URL |
| `videoStoreKey` | Key-value store key for the saved video file |
| `videoPublicUrl` | Public URL for the stored video file on Apify |
| `errorCode` / `errorMessage` | Failure details when no public video URL could be resolved |

### Tips or Advanced options

- Keep concurrency low when Instagram responds aggressively to repeated requests.
- Turn on `storeVideoFiles` only when you really need binary files in Apify storage; otherwise the dataset `videoUrl` may be enough.
- Use `includePageHtml` for debugging extraction changes when Instagram updates page markup.
- Add proxy settings if your deployment needs better request distribution.

### FAQ, disclaimers, and support

#### Does this work for private Instagram posts?

No. This Actor is designed for **public Instagram pages only**.

#### Will all public Instagram pages expose a direct video URL?

Not always. Instagram can change markup, geo-behavior, or anti-bot protections. When a URL cannot be resolved, the Actor returns an error dataset item instead of failing the entire run.

#### Is it legal to use?

You are responsible for complying with Instagram terms, copyright restrictions, and local laws. Only download content you own or have permission to use.

#### Where do I report issues?

Use the repository Issues tab or the Actor feedback section in Apify Console. If you need a more specialized extraction workflow, build on this Actor and adapt the extraction logic to your content pipeline.

# Actor input Schema

## `startUrls` (type: `array`):

Public Instagram /reel/, /p/, or /tv/ URLs to process.

## `storeVideoFiles` (type: `boolean`):

When enabled, the Actor downloads each resolved video file and saves it to the default key-value store.

## `storeThumbnailFiles` (type: `boolean`):

When enabled, the Actor downloads the main thumbnail image and saves it to the default key-value store.

## `includePageHtml` (type: `boolean`):

Save each fetched Instagram HTML page to the key-value store for debugging or auditing.

## `filenamePrefix` (type: `string`):

Prefix used when the Actor stores video files, thumbnails, or HTML snapshots.

## `maxConcurrency` (type: `integer`):

Maximum number of Instagram pages processed in parallel.

## `maxRequestRetries` (type: `integer`):

How many times a failed Instagram page request should be retried before the Actor returns an error item.

## `requestTimeoutSecs` (type: `integer`):

Timeout used for page fetches and optional file downloads.

## `proxyConfiguration` (type: `object`):

Optional proxy settings for fetching Instagram pages.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.instagram.com/p/C/"
    }
  ],
  "storeVideoFiles": false,
  "storeThumbnailFiles": false,
  "includePageHtml": false,
  "filenamePrefix": "instagram-video",
  "maxConcurrency": 3,
  "maxRequestRetries": 2,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `files` (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 = {
    "startUrls": [
        {
            "url": "https://www.instagram.com/p/C/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eunit/instagram-video-and-reel-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 = { "startUrls": [{ "url": "https://www.instagram.com/p/C/" }] }

# Run the Actor and wait for it to finish
run = client.actor("eunit/instagram-video-and-reel-downloader").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.instagram.com/p/C/"
    }
  ]
}' |
apify call eunit/instagram-video-and-reel-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=eunit/instagram-video-and-reel-downloader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Video Downloader",
        "description": "Download public Instagram Reels, video posts, and IGTV links with this Apify Actor. Extract direct video URLs, metadata, thumbnails, and optional stored files for automation, backups, and content workflows.",
        "version": "0.0",
        "x-build-id": "BunzNE4hICHeBItL7"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/eunit~instagram-video-and-reel-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-eunit-instagram-video-and-reel-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/eunit~instagram-video-and-reel-downloader/runs": {
            "post": {
                "operationId": "runs-sync-eunit-instagram-video-and-reel-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/eunit~instagram-video-and-reel-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-eunit-instagram-video-and-reel-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Instagram post URLs",
                        "type": "array",
                        "description": "Public Instagram /reel/, /p/, or /tv/ URLs to process.",
                        "default": [
                            {
                                "url": "https://www.instagram.com/p/C/"
                            }
                        ],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "storeVideoFiles": {
                        "title": "Store resolved video files",
                        "type": "boolean",
                        "description": "When enabled, the Actor downloads each resolved video file and saves it to the default key-value store.",
                        "default": false
                    },
                    "storeThumbnailFiles": {
                        "title": "Store thumbnails",
                        "type": "boolean",
                        "description": "When enabled, the Actor downloads the main thumbnail image and saves it to the default key-value store.",
                        "default": false
                    },
                    "includePageHtml": {
                        "title": "Store HTML snapshots",
                        "type": "boolean",
                        "description": "Save each fetched Instagram HTML page to the key-value store for debugging or auditing.",
                        "default": false
                    },
                    "filenamePrefix": {
                        "title": "Filename prefix",
                        "type": "string",
                        "description": "Prefix used when the Actor stores video files, thumbnails, or HTML snapshots.",
                        "default": "instagram-video"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of Instagram pages processed in parallel.",
                        "default": 3
                    },
                    "maxRequestRetries": {
                        "title": "Max request retries",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many times a failed Instagram page request should be retried before the Actor returns an error item.",
                        "default": 2
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Timeout used for page fetches and optional file downloads.",
                        "default": 30
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional proxy settings for fetching Instagram pages.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
