# 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
- **Features:** Limited permissions
- **Stats:** 216 total users, 8 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/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# 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(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 '{
  "action": "profile",
  "username": "instagram",
  "limit": 12
}' |
apify call singhera07/instagram-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,singhera07/instagram-scraper"
        }
    }
}
```

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/dvhl38GjvU0JEmsK7/builds/vPkWdag1B5s7a1WX0/openapi.json
