# 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:** 29 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/actors/running/actors-in-store.md#rental-actors

## 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 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(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codenest/instagram-image-downloader"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/887rldZ0azzsJ3GoD/builds/HpbfsuhRaJmAHc8u5/openapi.json
