# 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:** 162 total users, 50 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.10 / 1,000 url processeds

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

Download the OpenAPI definition: https://api.apify.com/v2/acts/pzCwJXhIH5jfn5uSN/builds/PiEBz527FswivexQI/openapi.json
