# Instagram Scraper (`singhera07/instagram-scraper`) Actor

Scrape Instagram profiles, posts, reels, stories, highlights, and download media. All-in-one actor, no login required.

- **URL**: https://apify.com/singhera07/instagram-scraper.md
- **Developed by:** [Umer Singhera](https://apify.com/singhera07) (community)
- **Categories:** Social media, AI, Automation
- **Stats:** 171 total users, 15 monthly users, 100.0% runs succeeded, 1 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 Scraper & Downloader

Scrape and download Instagram data without login. Get profiles, posts, reels, stories, highlights, and download any media by URL. One actor replaces 5+ specialized scrapers.

### What does this actor do?

This actor extracts data from public Instagram profiles. Just provide a username or Instagram URL and choose what data you want:

- **Profiles** — Bio, followers, following, posts count, profile picture (HD), website, verification
- **Posts** — Captions, likes, comments count, media URLs, timestamps (paginated)
- **Reels** — Video URLs, view counts, duration, engagement metrics (paginated)
- **Stories** — Active stories from the last 24 hours with media URLs
- **Highlights** — Highlight collections with cover images
- **Download** — Download any post/reel/story by URL (supports carousels)
- **Search** — Find users by keyword

### Input

```json
{
  "action": "profile",
  "username": "instagram",
  "limit": 12,
  "cursor": ""
}
````

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `action` | string | Yes | One of: `profile`, `posts`, `reels`, `stories`, `highlights`, `download`, `search` |
| `username` | string | Yes\* | Instagram username or profile URL. *Required for all actions except `download` and `search` |
| `url` | string | Yes* | Instagram post/reel URL. *Required for `download` action |
| `query` | string | Yes* | Search keyword. \*Required for `search` action |
| `limit` | number | No | Results per page (1-50, default: 12) |
| `cursor` | string | No | Pagination cursor from previous run |

#### Input examples

**Get profile:**

```json
{
  "action": "profile",
  "username": "instagram"
}
```

**Get posts with pagination:**

```json
{
  "action": "posts",
  "username": "natgeo",
  "limit": 20
}
```

**Download a reel:**

```json
{
  "action": "download",
  "url": "https://www.instagram.com/reel/ABC123DEF456/"
}
```

**Search users:**

```json
{
  "action": "search",
  "query": "travel photography"
}
```

### Output

Results are saved to the default dataset. You can download them as JSON, CSV, Excel, XML, or RSS.

#### Profile output example

```json
{
  "username": "instagram",
  "full_name": "Instagram",
  "biography": "Bringing you closer to the people and things you love.",
  "profile_pic_url_hd": "https://cdn.socialhubapi.com/media/...",
  "follower_count": 676000000,
  "following_count": 452,
  "media_count": 7892,
  "is_verified": true,
  "is_private": false,
  "external_url": "https://about.instagram.com"
}
```

#### Post output example

```json
{
  "shortcode": "ABC123",
  "display_url": "https://cdn.socialhubapi.com/media/...",
  "video_url": null,
  "caption": "Amazing sunset #photography",
  "like_count": 125000,
  "comment_count": 1500,
  "timestamp": 1707436800,
  "is_video": false
}
```

### Pricing

Cheapest Instagram actor on Apify. All-in-one pricing with no surprise add-on charges.

| Event | Free | Bronze | Silver | Gold | Platinum | Diamond |
|-------|------|--------|--------|------|----------|---------|
| Actor start | $0.003 | $0.002 | $0.0015 | $0.001 | $0.0008 | $0.0005 |
| Profile result | $0.0015 | $0.0012 | $0.001 | $0.0008 | $0.0005 | $0.0002 |
| Post/Reel result | $0.0015 | $0.0012 | $0.001 | $0.0008 | $0.0005 | $0.0002 |
| Search result | $0.003 | $0.0025 | $0.002 | $0.0015 | $0.001 | $0.0005 |
| Media download | $0.002 | $0.0015 | $0.001 | $0.0008 | $0.0005 | $0.0002 |

#### Cost examples

- 1,000 profiles: ~$1.50 (Free tier) / ~$0.20 (Diamond)
- 10,000 posts: ~$15.00 (Free tier) / ~$2.00 (Diamond)
- 100 downloads: ~$0.20 (Free tier) / ~$0.02 (Diamond)

### Use cases

- **Influencer marketing** — Analyze profiles, follower counts, and engagement rates
- **Brand monitoring** — Track posts mentioning your brand or competitors
- **Content research** — Find trending content in your niche
- **Media archiving** — Download posts, reels, and stories for backup
- **Lead generation** — Find potential partners or customers by search
- **Academic research** — Collect public social media data for analysis

### FAQ

**Q: Does this require an Instagram login?**
A: No. All data is extracted from public profiles without login.

**Q: Are private profiles supported?**
A: No. Only public profiles can be scraped.

**Q: How fast is it?**
A: Most requests complete in under 500ms. Posts/reels with pagination may take 1-2 seconds.

**Q: Do media URLs expire?**
A: No. All media URLs are served through our CDN proxy and remain accessible.

**Q: Can I download carousels (multi-image posts)?**
A: Yes. The download action returns URLs for all images/videos in a carousel.

**Q: How do I paginate through results?**
A: After a run, check the key-value store for a `PAGINATION` key. It contains the `cursor` for the next page. Pass it as input to the next run.

# Actor input Schema

## `action` (type: `string`):

What data to fetch from Instagram

## `username` (type: `string`):

Instagram username or profile URL. Required for profile, posts, reels, stories, highlights.

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

Full Instagram post or reel URL. Required for the 'download' action.

## `query` (type: `string`):

Search keyword to find Instagram users. Required for the 'search' action.

## `limit` (type: `integer`):

Maximum number of results per page (for posts, reels).

## `cursor` (type: `string`):

Cursor from a previous run to fetch the next page of results.

## Actor input object example

```json
{
  "action": "profile",
  "username": "instagram",
  "url": "https://www.instagram.com/reel/ABC123/",
  "limit": 12
}
```

# Actor output Schema

## `profileData` (type: `string`):

Instagram profile information including bio, followers, following, verification status, and profile picture.

## `postsData` (type: `string`):

Instagram posts with captions, likes, comments, media URLs, and timestamps.

## `reelsData` (type: `string`):

Instagram reels with video URLs, view counts, likes, comments, and download links.

## `highlightsData` (type: `string`):

Instagram story highlights with titles and cover images.

## `searchResults` (type: `string`):

Instagram user search results with usernames, avatars, and follower counts.

## `downloadedMedia` (type: `string`):

Downloaded post/reel media with image and video URLs.

## `allResults` (type: `string`):

Complete raw dataset with all results from the actor 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 = {
    "action": "profile",
    "username": "instagram",
    "limit": 12
};

// Run the Actor and wait for it to finish
const run = await client.actor("singhera07/instagram-scraper").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 = {
    "action": "profile",
    "username": "instagram",
    "limit": 12,
}

# Run the Actor and wait for it to finish
run = client.actor("singhera07/instagram-scraper").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 '{
  "action": "profile",
  "username": "instagram",
  "limit": 12
}' |
apify call singhera07/instagram-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Scraper",
        "description": "Scrape Instagram profiles, posts, reels, stories, highlights, and download media. All-in-one actor, no login required.",
        "version": "1.0",
        "x-build-id": "vPkWdag1B5s7a1WX0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/singhera07~instagram-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-singhera07-instagram-scraper",
                "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/singhera07~instagram-scraper/runs": {
            "post": {
                "operationId": "runs-sync-singhera07-instagram-scraper",
                "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/singhera07~instagram-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-singhera07-instagram-scraper",
                "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": [
                    "action"
                ],
                "properties": {
                    "action": {
                        "title": "Action",
                        "enum": [
                            "profile",
                            "posts",
                            "reels",
                            "stories",
                            "highlights",
                            "download",
                            "search"
                        ],
                        "type": "string",
                        "description": "What data to fetch from Instagram",
                        "default": "profile"
                    },
                    "username": {
                        "title": "Username",
                        "type": "string",
                        "description": "Instagram username or profile URL. Required for profile, posts, reels, stories, highlights."
                    },
                    "url": {
                        "title": "Post/Reel URL",
                        "type": "string",
                        "description": "Full Instagram post or reel URL. Required for the 'download' action."
                    },
                    "query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search keyword to find Instagram users. Required for the 'search' action."
                    },
                    "limit": {
                        "title": "Results Limit",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of results per page (for posts, reels).",
                        "default": 12
                    },
                    "cursor": {
                        "title": "Pagination Cursor",
                        "type": "string",
                        "description": "Cursor from a previous run to fetch the next page of results."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
