# Instagram Downloader API – Reels, Stories & Highlights (`snapinsta/instagram-downloader-api`) Actor

Instagram downloader API for public Reels, videos, photos, Stories, Highlights, and carousels. Get direct media links in clean JSON without login.

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

## Pricing

from $0.48 / 1,000 download requests

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does Instagram Downloader API do?

**Instagram downloader API for public Reels, videos, photos, Stories, Highlights, and carousels. Get direct media links in clean JSON without login.**

Send one public Instagram URL and receive direct media URLs, thumbnails, and file types. Use the simple Actor Input form or call the low-latency Standby API.

### Why use Instagram Downloader API?

- One stable response format for supported Instagram media.
- No Instagram username, password, cookie, or login required.
- Built-in Apify authentication, billing, monitoring, and scaling.

### How to use Instagram Downloader API

#### Input form

1. Open the Actor's **Input** tab.
2. Paste one public Instagram URL.
3. Click **Start**.
4. Open the run's **Output** tab.
5. Switch between **Table** and **JSON**, or export the result.

The Input form processes one URL per run. No Instagram login or API token field is required.

#### Standby API

Base URL:

```text
https://snapinsta--instagram-downloader-api.apify.actor
```

Use your Apify API token as a Bearer token:

```text
Authorization: Bearer YOUR_APIFY_TOKEN
```

You can test both endpoints from the Actor's **Endpoints** tab. Apify adds authentication automatically when you use the interactive API form.

#### GET request

```bash
curl --get \
  "https://snapinsta--instagram-downloader-api.apify.actor/api/download" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  --data-urlencode "url=https://www.instagram.com/reel/SHORTCODE/"
```

#### POST request

```bash
curl -X POST \
  "https://snapinsta--instagram-downloader-api.apify.actor/api/download" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.instagram.com/reel/SHORTCODE/"}'
```

GET and POST return the same response. POST is usually easier for backend applications.

#### Node.js

```js
const response = await fetch('https://snapinsta--instagram-downloader-api.apify.actor/api/download', {
    method: 'POST',
    headers: {
        Authorization: `Bearer ${process.env.APIFY_TOKEN}`,
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({
        url: 'https://www.instagram.com/reel/SHORTCODE/',
    }),
});

const result = await response.json();
if (!response.ok) {
    throw new Error(`${result.error.code}: ${result.error.message}`);
}
```

#### Python

```python
import os
import requests

response = requests.post(
    "https://snapinsta--instagram-downloader-api.apify.actor/api/download",
    headers={"Authorization": f"Bearer {os.environ['APIFY_TOKEN']}"},
    json={"url": "https://www.instagram.com/reel/SHORTCODE/"},
    timeout=30,
)

result = response.json()
if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
```

Keep the Apify token on your server. Do not place it in browser JavaScript, mobile apps, public repositories, or URLs.

### Input

Both run modes accept exactly one value: `url`.

| Mode         | Location      | Example                               |
| ------------ | ------------- | ------------------------------------- |
| Input run    | **Input** tab | Paste the URL and click **Start**     |
| Standby GET  | `?url=...`    | `/api/download?url=INSTAGRAM_URL`     |
| Standby POST | JSON body     | `{"url":"https://instagram.com/..."}` |

Supported public URL formats include:

- Posts: `https://www.instagram.com/p/SHORTCODE/`
- Reels: `https://www.instagram.com/reel/SHORTCODE/`
- Profile-prefixed media: `https://www.instagram.com/USERNAME/reel/SHORTCODE/`
- Stories: `https://www.instagram.com/stories/USERNAME/STORY_ID/`
- Highlights: `https://www.instagram.com/stories/highlights/HIGHLIGHT_ID/`

The equivalent `/reels/` and `/tv/` media paths are also accepted. Private, deleted, expired, age-restricted, or region-restricted content may not resolve.

### Output

Successful response:

```json
{
    "status": true,
    "sourceUrl": "https://www.instagram.com/reel/SHORTCODE/",
    "media": [
        {
            "url": "https://cdn.example/video.mp4",
            "thumbnail": "https://cdn.example/thumbnail.jpg",
            "fileType": "video/mp4"
        }
    ],
    "requestId": "8c38bd30-93e1-4578-9107-5a6de616daf0"
}
```

Error response:

```json
{
    "status": false,
    "error": {
        "code": "INVALID_INSTAGRAM_URL",
        "message": "Provide a supported public Instagram URL.",
        "requestId": "d8abfca0-07cc-436c-826e-8b07902c3fd2"
    }
}
```

Input-form runs save one row to the run's default dataset. The **Output** tab shows the same result in Table and JSON views, and Apify can export it as JSON, CSV, Excel, XML, or RSS. Standby API requests return the result directly over HTTP. Neither mode downloads, stores, or hosts the media files themselves.

`fileType` is the media item's MIME type. Common values are `video/mp4` for videos and `image/jpeg` for photos. A carousel can return multiple items with different file types.

### Data table

| Field               | Description                                               |
| ------------------- | --------------------------------------------------------- |
| `status`            | `true` for success and `false` for an error.              |
| `sourceUrl`         | Validated and normalized Instagram URL.                   |
| `media`             | One or more resolved media items.                         |
| `media[].url`       | Temporary direct HTTPS media URL.                         |
| `media[].thumbnail` | HTTPS thumbnail URL, or `null`.                           |
| `media[].fileType`  | MIME type such as `video/mp4` or `image/jpeg`, or `null`. |
| `requestId`         | ID to include when reporting a failed request.            |

### How much does it cost?

The billable event is named **Download request**.

| Apify tier | Price per 1,000 accepted requests |
| ---------- | --------------------------------: |
| Free       |                             $1.20 |
| Starter    |                             $0.60 |
| Scale      |                             $0.54 |
| Business   |                             $0.48 |

A valid URL is charged once before media processing begins in either run mode. It remains charged if processing later fails. Invalid input, readiness checks, unsupported routes, and requests blocked by the spending limit are not charged. Apify platform usage may be charged separately.

The Actor page's **Pricing** section is the source of truth for current prices.

### Tips and error handling

| HTTP status | Error code                                     | Charged?                                   |
| ----------: | ---------------------------------------------- | ------------------------------------------ |
|         400 | `INVALID_*`                                    | No                                         |
|         402 | `PAYMENT_LIMIT_REACHED`                        | No                                         |
|     413/415 | `REQUEST_TOO_LARGE` / `UNSUPPORTED_MEDIA_TYPE` | No                                         |
|         502 | `UPSTREAM_*`                                   | Yes                                        |
|         503 | `UPSTREAM_RATE_LIMITED`                        | Yes                                        |
|         503 | `BILLING_UNAVAILABLE`                          | Not confirmed; media processing is skipped |
|         504 | `UPSTREAM_TIMEOUT`                             | Yes                                        |
|         500 | `INTERNAL_ERROR`                               | Depends on when the error occurred         |

Every error contains a stable `error.code`, safe `error.message`, and `requestId`. Use the code in application logic and keep the request ID for support.

The Actor already retries temporary media-service failures inside one accepted request. If your application sends a new retry, that retry is a new request and may be charged again.

### FAQ, disclaimers, and support

**Are Instagram credentials required?** No. Never submit Instagram credentials.

**Can I use the API from a frontend?** No. Use your backend so the Apify token remains private.

**Are direct media URLs permanent?** No. Download or process returned URLs promptly because they can expire.

Only process content you own, have permission to use, or are otherwise legally authorized to access. Users are responsible for copyright, privacy, platform terms, and content-owner rights. This Actor is not affiliated with, sponsored by, or endorsed by Instagram or Meta.

For help, open the Actor's **Issues** tab and include the `requestId`. Never include API tokens or credentials.

# Actor input Schema

## `url` (type: `string`):

A public Instagram post, Reel, Story, Highlight, or carousel URL.

## Actor input object example

```json
{
  "url": "https://www.instagram.com/cristiano/reel/DbDp7T4olyC/"
}
```

# Actor output Schema

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

The normalized result produced by an Input-form run.

# 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/cristiano/reel/DbDp7T4olyC/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("snapinsta/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/cristiano/reel/DbDp7T4olyC/" }

# Run the Actor and wait for it to finish
run = client.actor("snapinsta/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/cristiano/reel/DbDp7T4olyC/"
}' |
apify call snapinsta/instagram-downloader-api --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/1WIXAz3cnrzAfwN6P/builds/5L8yzzvpZeOQecJfX/openapi.json
