# Instagram Image Downloader (`codenest/instagram-image-downloader`) Actor

Download Instagram images with metadata at lower rate using our Instagram Image Downloader! 🚀 Get secure KV Store links for 24-hour access and bulk downloads. Perfect for marketers 📈, researchers 🔬, and creators 🎨 needing organized visual content. ❤️Instagram Image Downloader❤️.

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

## Pricing

$5.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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 Image Downloader - Professional Photo Extraction Tool

**Effortlessly download high-quality Instagram images with our enterprise-grade Instagram Image Downloader! This powerful Apify actor enables you to batch download Instagram photos while preserving original quality, comprehensive metadata, and secure storage access.**

---

### 📸 Overview
Need to archive Instagram content or collect photos for analysis? This **Instagram Image Downloader** delivers:
- **High-resolution images**: Original quality preservation
- **Apify KV Store**: Secure, encrypted download URLs
- **Full metadata**: Descriptions, engagement metrics, user data
- **Bulk processing**: Multiple posts per run

Perfect for marketers 📈, researchers 🔬, content creators 🎨, and social media managers 📱!

### 🚀 Core Capabilities

#### 🖼️ Image Options
- **Multiple Formats**: JPEG quality preservation
- **Bulk Downloads**: Process numerous posts simultaneously
- **Original Resolution**: Highest available quality
- **Carousel Support**: Download all images from multi-photo posts

#### 📊 Metadata Mastery
- **Engagement Analytics**: Likes, comments counts
- **User Information**: Usernames, user IDs
- **Content Details**: Captions, descriptions, upload dates
- **Hashtag Tracking**: Campaign performance monitoring

#### 💾 KV Store Benefits
The **Instagram Image Downloader** leverages Apify's Key-Value Store for:
- **Secure Links**: Temporary, authenticated download URLs
- **Reliable Access**: 24-hour availability for downloaded content
- **Encrypted Storage**: Protected image storage
- **Easy Retrieval**: Simple API endpoints for integration

---

### ⚙️ Input Configuration
Configure your **Instagram Image Downloader** with this simple JSON input:

```json
{
  "key_value": true,
  "post_urls": [
    {
      "url": "https://www.instagram.com/p/DM-qZyuxRpf/?utm_source=ig_web_copy_link",
      "method": "GET"
    },
    {
      "url": "https://www.instagram.com/p/DPFDZBUAIOu/?utm_source=ig_web_copy_link",
      "method": "GET"
    }
  ]
}
````

#### 📋 Input Specifications

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key_value` | Boolean | Yes | Enable KV Store for secure image links |
| `post_urls` | Array | Yes | Instagram post URLs to process |
| `url` | String | Yes | Valid Instagram post URL |
| `method` | String | Yes | HTTP method (GET recommended) |

***

### 📄 Output Structure

Your **Instagram Image Downloader** provides comprehensive output:

```json
[
  {
    "post_url": "https://www.instagram.com/p/DM-qZyuxRpf/?utm_source=ig_web_copy_link",
    "user_id": "20824486",
    "likes": 162000,
    "comments": 155,
    "hashtags": [],
    "description": "A Statue of Liberty slam from Victor Wembanyama through the lens of @natlyphoto 👽🗽 Is this your pick for Photo of the Year? Use your NBA ID to vote for Wemby's picture-perfect dunk, now on the NBA App!.",
    "caption": "NBA on Instagram: \"A Statue of Liberty slam from Victor Wembanyama through the lens of @natlyphoto 👽🗽\n\nIs this your pick for Photo of the Year? Use your NBA ID to vote for Wemby's picture-perfect dunk, now on the NBA App!\"",
    "username": "nba",
    "upload_date": "August 5, 2025",
    "images": {
      "urls": [
        {
          "content_type": "image/jpeg",
          "image_download_link_1": "https://api.apify.com/v2/key-value-stores/CH3BcIu7Q1jtKfRP4/records/ig_-4862669500575094273.jpg"
        }
      ]
    }
  }
]
```

#### 📊 Output Field Documentation

**Post Metadata**
| Field | Description |
|-------|-------------|
| `username` | Content creator's Instagram handle |
| `user_id` | Unique Instagram user identifier |
| `upload_date` | Publication date in readable format |
| `likes` | Number of post likes |
| `comments` | Number of post comments |

**Content Information**
| Field | Description |
|-------|-------------|
| `description` | Full post description text |
| `caption` | Post caption with attribution |
| `hashtags` | Array of associated hashtags |

**Image Assets**
| Field | Description |
|-------|-------------|
| `image_download_link_X` | Secure KV Store download URL |
| `content_type` | Image format (image/jpeg) |

***

### 🔧 How to Use the Instagram Image Downloader

#### Step-by-Step Guide:

1. **Configure Input**: Paste Instagram post URLs in the input JSON
2. **Enable KV Store**: Set `"key_value": true` for secure downloads
3. **Run Actor**: Start the **Instagram Image Downloader**
4. **Access Results**: Retrieve images from KV Store links
5. **Download Images**: Use provided URLs within 24 hours

#### KV Store Integration:

The **Instagram Image Downloader** stores images in Apify's Key-Value Store, providing:

- **Time-limited access**: 24-hour download window
- **Authentication**: Secure token-based access
- **Scalability**: Handle large volumes of images
- **Reliability**: Guaranteed image availability

***

### 💡 Advanced Features

#### 🛠️ Technical Capabilities

- **Multi-image Support**: Carousel post extraction
- **Quality Preservation**: Original resolution maintenance
- **Metadata Enrichment**: Comprehensive post analytics
- **Batch Processing**: Efficient bulk operations

#### 🔒 Security Features

- **Encrypted URLs**: Secure download links
- **Temporary Access**: Time-limited image availability
- **API Protection**: Token-based authentication
- **Data Privacy**: Secure content handling

***

### 🎯 Use Cases for Instagram Image Downloader

**Marketing Agencies** 📊 - Collect user-generated content
**Researchers** 🔬 - Analyze visual social trends
**Content Creators** 🎨 - Archive and repurpose content
**Brand Managers** 🏢 - Monitor brand visual presence
**Developers** 💻 - Build image-based applications

This **Instagram Image Downloader** is perfect for anyone needing reliable Instagram image extraction with full metadata preservation.

***

### 🌟 Why Choose Our Instagram Image Downloader?

**Reliable Performance** ⚡ - Consistent and efficient downloading
**User-Friendly** 🎯 - Simple setup for all skill levels
**Regular Updates** 🔄 - Maintained for Instagram compatibility
**Comprehensive Data** 📈 - Full metadata and engagement metrics
**Secure Storage** 🔒 - KV Store protection for your downloads

The **Instagram Image Downloader** stands out with its robust KV Store integration and comprehensive metadata extraction.

***

### ⚠️ Limitations

- Only works with public Instagram posts
- KV Store links expire after 24 hours
- Subject to Instagram's rate limits and restrictions
- Requires valid Instagram post URLs

***

### 🔗🛠 Related Actors (Full Content Scraping Suite)

#### 📸 Instagram Tools:

- [Instagram Reels Downloader](https://apify.com/codenest/instagram-reels-downloader)
- [Instagram Reels Thumbnail Downloader](https://apify.com/codenest/instagram-reels-thumbnail-downloader)
- [Instagram Video Downloader](https://apify.com/codenest/instagram-video-downloader)
- [Instagram Reels Scraper & Downloader](https://apify.com/codenest/instagram-reels-downloader-scraper)
- [Instagram Reels Audio Downloader](https://apify.com/codenest/instagram-reels-audio-downloader)
- [Instagram Post Downloader (Image & Video)](https://apify.com/codenest/instagram-post-downloader-image-video)
- [Instagram Reels Thumbnail Scraper & Downloader](https://apify.com/codenest/instagram-reels-thumbnail-scraper-downloader)
- [Instagram Reels Audio Scraper & Downloader](https://apify.com/codenest/instagram-reels-audio-scraper-downloader)

***

### 📧 Need Customization?

Want \*higher resolutions, \*\*extended storage, or \**enhanced metadata* for your **Instagram Image Downloader**?

✉ Email *<codenest2.0@gmail.com>* for tailored solutions!

***

**Keywords**: Instagram Image Downloader, Instagram photo download, Instagram image extractor, Instagram content downloader, social media image download, Instagram Downloader, image scraping, Instagram metadata, KV Store integration, bulk image download

# Actor input Schema

## `post_urls` (type: `array`):

A list of public Instagram post, reel, or carousel URLs.

## `key_value_store` (type: `boolean`):

If enabled, downloaded media files are saved to the Apify Key-Value Store and KV Store URLs are included in the output. If disabled, only the original CDN/proxy URLs are returned.

## `proxy` (type: `object`):

Proxy settings for the Playwright browser. Uses Apify Proxy by default.

## `headless` (type: `boolean`):

Run the Playwright browser without a visible window (recommended for production).

## `max_retries` (type: `integer`):

Maximum number of times to retry fetching media for a single URL if the first attempt fails.

## `page_timeout_ms` (type: `integer`):

Maximum time in milliseconds to wait for the fastdl.app page to load.

## Actor input object example

```json
{
  "post_urls": [
    {
      "url": "https://www.instagram.com/p/DZOa4YgiRoL/"
    }
  ],
  "key_value_store": true,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "headless": true,
  "max_retries": 3,
  "page_timeout_ms": 30000
}
```

# 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 = {
    "post_urls": [
        {
            "url": "https://www.instagram.com/p/DZOa4YgiRoL/"
        }
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("codenest/instagram-image-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 '{
  "post_urls": [
    {
      "url": "https://www.instagram.com/p/DZOa4YgiRoL/"
    }
  ]
}' |
apify call codenest/instagram-image-downloader --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Image Downloader",
        "description": "Download Instagram images with metadata at lower rate using our Instagram Image Downloader! 🚀 Get secure KV Store links for 24-hour access and bulk downloads. Perfect for marketers 📈, researchers 🔬, and creators 🎨 needing organized visual content. ❤️Instagram Image Downloader❤️.",
        "version": "0.0",
        "x-build-id": "HpbfsuhRaJmAHc8u5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codenest~instagram-image-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codenest-instagram-image-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/codenest~instagram-image-downloader/runs": {
            "post": {
                "operationId": "runs-sync-codenest-instagram-image-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/codenest~instagram-image-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-codenest-instagram-image-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": [
                    "post_urls"
                ],
                "properties": {
                    "post_urls": {
                        "title": "Instagram Post URLs",
                        "type": "array",
                        "description": "A list of public Instagram post, reel, or carousel URLs.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "url": {
                                    "title": "Post URL",
                                    "description": "The full URL of the public Instagram post or reel.",
                                    "type": "string",
                                    "pattern": "^https://(www\\.)?instagram\\.com/(p|reel|tv)/"
                                }
                            },
                            "required": [
                                "url"
                            ]
                        }
                    },
                    "key_value_store": {
                        "title": "Store files in the Key-Value Store?",
                        "type": "boolean",
                        "description": "If enabled, downloaded media files are saved to the Apify Key-Value Store and KV Store URLs are included in the output. If disabled, only the original CDN/proxy URLs are returned.",
                        "default": true
                    },
                    "proxy": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for the Playwright browser. Uses Apify Proxy by default.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    },
                    "headless": {
                        "title": "Run browser in headless mode?",
                        "type": "boolean",
                        "description": "Run the Playwright browser without a visible window (recommended for production).",
                        "default": true
                    },
                    "max_retries": {
                        "title": "Max Retries per URL",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of times to retry fetching media for a single URL if the first attempt fails.",
                        "default": 3
                    },
                    "page_timeout_ms": {
                        "title": "Page Load Timeout (ms)",
                        "minimum": 5000,
                        "maximum": 120000,
                        "type": "integer",
                        "description": "Maximum time in milliseconds to wait for the fastdl.app page to load.",
                        "default": 30000
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
