# Instagram Downloader API (`elis/instagram-downloader-api`) Actor

Download videos, photos, Reels, IGTV, Stories, and carousels from Instagram, Facebook, and Pinterest.

- **URL**: https://apify.com/elis/instagram-downloader-api.md
- **Developed by:** [Elis Bushaj](https://apify.com/elis) (community)
- **Categories:** Social media
- **Stats:** 14 total users, 8 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Instagram Downloader API — Download Videos, Reels & Photos

Resolve direct download links for Instagram Reels, Videos, Photos, IGTV, Stories, and Carousels — plus Facebook Videos and Pinterest Images — in a single HTTP call. Unlike general Instagram scrapers, this Actor is purpose-built for download link resolution, returning HD and SD quality variants with file sizes and thumbnails.

**Supports 6 Instagram URL types + Facebook + Pinterest** | **Pay-Per-Event pricing** | **Batch mode — bulk download & export**

---

### Features

- **HD + SD quality variants for videos** — the only Apify Actor that exposes multiple resolution options per Reel or Video. Clients choose the quality tier that fits their bandwidth and storage needs.
- **Priced 9% below the SOCIAL_MEDIA category average** — $0.0021/request vs. $0.0023 market average, verified April 2026. Pay less per URL than any major Instagram scraper on the Store.
- **Broad platform coverage** — Instagram Reels, Posts (`/p/`), IGTV, Stories, Carousels, Facebook Videos, and Pinterest Images. Competitors handle one or two formats; this Actor handles eight.
- **Batch mode** — paste a list of URLs into the "URL(s) to process" field, click Start, and get all results in the Apify dataset. No polling, no API client required.
- **Pay only for what you use** — no monthly commitment, cancel any time. Budget cap via `ACTOR_MAX_TOTAL_CHARGE_USD`.

---

### Quick Start

#### Option 1: Apify Console (no code)

1. Open the Actor in [Apify Console](https://console.apify.com/actors/pzCwJXhIH5jfn5uSN)
2. Paste one or more URLs into the **"URL(s) to process"** field
3. Click **Start**
4. View results in the **Output** tab or export from the **Dataset** tab

#### Option 2: REST API

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/elis~instagram-downloader-api/runs?waitForFinish=120" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": ["https://www.instagram.com/reel/DWv-hr9Cfph/"]}'
````

> Replace `$APIFY_TOKEN` with your token from **Apify Console → Settings → Integrations**

**Example result item:**

```json
{
  "inputUrl": "https://www.instagram.com/reel/DWv-hr9Cfph/",
  "platform": "instagram",
  "result": [
    { "url": "https://dl.snapcdn.app/get?token=...", "type": "video", "quality": "HD", "size": "12.4 MB", "thumb": "https://..." },
    { "url": "https://dl.snapcdn.app/get?token=...", "type": "video", "quality": "SD", "size": "4.1 MB",  "thumb": "https://..." }
  ]
}
```

> **Note**: Download URLs are JWT-signed with a 1-hour TTL — download media immediately after calling this API.

***

### Pricing & Budget Guide

**$0.0021 per URL processed** — one `request` event fires per URL, regardless of how many quality variants are returned.

| Budget | Approximate calls |
|--------|-------------------|
| $5 (free credit) | ~2,380 URLs |
| $20 | ~9,500 URLs |
| $50 | ~23,800 URLs |
| $100 | ~47,600 URLs |

Set a spend cap with `ACTOR_MAX_TOTAL_CHARGE_USD` in the Actor input — the run stops gracefully when the limit is reached.

**Event pricing:**

| Event | Price | Description |
|-------|-------|-------------|
| `request` | $0.0021 | Fired once per URL processed |

> 20% Apify platform commission included. You keep 80% if you publish your own fork.

***

### Endpoint Reference

#### GET /api/v1/download — Resolve download links

Returns direct download URLs for the given Instagram, Facebook, or Pinterest media URL.

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Full URL of the media to download |

**Supported URL formats:**

- `https://www.instagram.com/reel/{shortcode}/`
- `https://www.instagram.com/p/{shortcode}/` (posts, carousels)
- `https://www.instagram.com/tv/{shortcode}/` (IGTV)
- `https://www.instagram.com/stories/{username}/{id}/`
- `https://www.facebook.com/...` (public videos)
- `https://www.pinterest.com/pin/{id}/`

**curl example (Batch Standby URL):**

```bash
curl "https://elis--instagram-downloader-api.apify.actor/api/v1/download?url=https://www.instagram.com/reel/DWv-hr9Cfph/" \
  -H "Authorization: Bearer $APIFY_TOKEN"
```

**Response:**

```json
{
  "status": "success",
  "platform": "instagram",
  "result": [
    { "url": "https://dl.snapcdn.app/get?token=...", "type": "video", "quality": "HD", "size": "12.4 MB", "thumb": "https://..." },
    { "url": "https://dl.snapcdn.app/get?token=...", "type": "video", "quality": "SD", "size": "4.1 MB",  "thumb": "https://..." }
  ]
}
```

***

#### GET /api/v1/ping — Health check

Returns service status and current timestamp. Use for uptime monitoring.

```bash
curl "https://elis--instagram-downloader-api.apify.actor/api/v1/ping" \
  -H "Authorization: Bearer $APIFY_TOKEN"
```

**Response:**

```json
{ "status": "ok", "timestamp": "2026-04-14T00:00:00.000Z" }
```

***

### FAQ

**How is this different from general Instagram scrapers?**
General scrapers (e.g., Instagram Scraper, Instagram Post Scraper) extract profile data, captions, likes, and comments. This Actor resolves **direct download URLs** for the actual media files — videos and images you can immediately save. It also returns HD and SD variants, which no other Apify Actor does.

**Is there a free tier?**
New Apify accounts receive $5 in free platform credit ≈ **2,380 free URL resolutions**. No credit card required to start.

**How does batch mode work?**
Provide a list of URLs in the `url` input field. The Actor processes each one sequentially, writing results to the Apify dataset. Download the dataset as JSON, CSV, or XLSX when the run completes.

**What happens when I reach my budget?**
The run stops gracefully at the `ACTOR_MAX_TOTAL_CHARGE_USD` limit — no overages, no surprises. Increase the cap and re-run to continue processing remaining URLs.

**Can I automate this via API?**
Yes. Use the Apify REST API (`POST /v2/acts/elis~instagram-downloader-api/runs`) or any Apify SDK (Node.js, Python). You can also schedule runs via **Apify Console → Schedules**.

# Actor input Schema

## `url` (type: `array`):

One or more Instagram, Facebook, or Pinterest URLs. Each is processed individually and results pushed to the dataset.

## Actor input object example

```json
{
  "url": [
    "https://www.instagram.com/reel/DWv-hr9Cfph/"
  ]
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "url": [
        "https://www.instagram.com/reel/DWv-hr9Cfph/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("elis/instagram-downloader-api").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 = { "url": ["https://www.instagram.com/reel/DWv-hr9Cfph/"] }

# Run the Actor and wait for it to finish
run = client.actor("elis/instagram-downloader-api").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 '{
  "url": [
    "https://www.instagram.com/reel/DWv-hr9Cfph/"
  ]
}' |
apify call elis/instagram-downloader-api --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Downloader API",
        "description": "Download videos, photos, Reels, IGTV, Stories, and carousels from Instagram, Facebook, and Pinterest.",
        "version": "0.1",
        "x-build-id": "PiEBz527FswivexQI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/elis~instagram-downloader-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-elis-instagram-downloader-api",
                "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/elis~instagram-downloader-api/runs": {
            "post": {
                "operationId": "runs-sync-elis-instagram-downloader-api",
                "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/elis~instagram-downloader-api/run-sync": {
            "post": {
                "operationId": "run-sync-elis-instagram-downloader-api",
                "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": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "URL(s) to process",
                        "type": "array",
                        "description": "One or more Instagram, Facebook, or Pinterest URLs. Each is processed individually and results pushed to the dataset.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
