# Fast Instagram Profile Posts Scraper 🚀 (`instagram-scraper/fast-instagram-post-scraper`) Actor

Instagram Post Scraper. Post data: hashtags, comment\_count, like\_count, usertags, images, videos, shortcode and etc.
Scrape Instagram Posts with Ease and Speed

- **URL**: https://apify.com/instagram-scraper/fast-instagram-post-scraper.md
- **Developed by:** [Instagram Scraper](https://apify.com/instagram-scraper) (community)
- **Categories:** Social media, Developer tools, Lead generation
- **Stats:** 3,124 total users, 744 monthly users, 99.3% runs succeeded, 27 bookmarks
- **User rating**: 4.72 out of 5 stars

## Pricing

from $0.45 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 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

## 🚀🚀 Fast Instagram Post Scraper 🚀🚀

<img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/fast-instagram-post-scraper" height="20" alt="Apify Stats">

Welcome to the **Fast Instagram Post Scraper**! This Apify actor is designed to quickly and efficiently scrape Instagram posts based on specific criteria. Whether you're looking to gather data for research, analytics, or any other purpose, this scraper will help you extract detailed information from Instagram posts with ease.

### Features

-   hashtags
-   mentions
-   comment_count
-   like_count
-   images
-   videos
-   audio

### Alternative version

If you need a version with richer post-level analytics while keeping the same public-profile, no-login scraping flow, try [Instagram Profile Posts Scraper](https://apify.com/instagram-scraper/instagram-profile-posts-scraper).

It is a reimplementation of this Actor that focuses on more normalized output and additional fields such as `view_count` and `play_count`.

### Want to get other details from Instagram?

If you need a different type of Instagram data, use the scraper that matches that source or tab.

Related Actors:

-   [Instagram Profile Scraper](https://apify.com/instagram-scraper/instagram-profile-scraper) — Scrape profile data, account flags, and profile statistics
-   [Fast Instagram Profile Reels Scraper](https://apify.com/instagram-scraper/instagram-profile-reels-scraper) — Scrape public Instagram Reels from profile pages
-   [Instagram Tagged Posts Scraper](https://apify.com/instagram-scraper/instagram-tagged-posts-scraper) — Scrape posts from the profile Tagged tab (`/tagged/`)
-   [Instagram Hashtags Posts Scraper](https://apify.com/instagram-scraper/instagram-hashtags-scraper) — Scrape public Instagram hashtag popular pages
-   [Browse all Instagram Scraper Actors](https://apify.com/instagram-scraper) — View the full collection of related Instagram scraping tools

### FAQ

#### 1) Why is the Dataset empty / much smaller than expected?

The profile has no public posts, not enough posts, or Instagram is limiting access.

#### 2) What does `Restricted profile` mean?

A profile can be public but still limited for anonymous (no-login) access.
Instagram may gate some profile endpoints unless a logged-in session is used.
When this happens, the Actor logs the restriction and skips/stops that profile.

#### 3) How does billing work for unavailable profiles?

The Actor uses one unified charge event: `restricted_profile`.
This event is emitted when a profile cannot return posts due to:

-   restricted/no-login access limits,
-   profile not found (dead link / non-existent profile),
-   no posts found for that profile.

### Sample Data of Instagram Post

![Sample Data](https://i.imgur.com/66L3qpt.png)

```json
{
    "id": "3575882131314413302_225193095",
    "pk": "3575882131314413302",
    "type": "Video",
    "image": "https://scontent-atl3-1.cdninstagram.com/v/t51.29350-15/481405191_1156684699194992_5691024182121159272_n.jpg?...",
    "shortcode": "DGgFdpDqY72",
    "product_type": "clips",
    "hashtags": [],
    "mentions": [],
    "location": {
        "pk": "1975369232680346",
        "lat": 26.1941712,
        "lng": -80.1613801,
        "name": "Inter Miami CF",
        "profile_pic_url": null,
        "__typename": "XDTLocationDict"
    },
    "caption": "“Women are dying,” one person in the audience shouted. “And doctors are leaving our state!” another yelled. A moderator tried to quiet the crowd, scolding people for “popping off with stupid remarks.”",
    "comment_count": 421,
    "like_count": 1549,
    "view_count": null,
    "has_audio": true,
    "usertags": null,
    "clips_metadata": {
        "audio_type": "original_sounds",
        "achievements_info": {
            "show_achievements": false
        },
        "music_info": null,
        "original_sound_info": {
            "original_audio_title": "Original audio",
            "should_mute_audio": false,
            "audio_asset_id": "903765741835840",
            "consumption_info": {
                "is_trending_in_clips": false,
                "should_mute_audio_reason": "",
                "should_mute_audio_reason_type": null
            },
            "ig_artist": {
                "username": "nypost",
                "id": "225193095"
            },
            "is_explicit": false
        }
    },
    "from_url": "https://www.instagram.com/nypost/",
    "post_url": "https://www.instagram.com/p/DGgFdpDqY72/",
    "video_duration": 133.44,
    "user": {
        "pk": "225193095",
        "username": "nypost",
        "profile_pic_url": "https://scontent-atl3-1.cdninstagram.com/v/t51.2885-19/243703439_1188462358328641_1593493214054989522_n.jpg?...",
        "is_private": false,
        "is_embeds_disabled": false,
        "is_unpublished": false,
        "is_verified": true,
        "friendship_status": null,
        "latest_besties_reel_media": null,
        "latest_reel_media": null,
        "live_broadcast_visibility": null,
        "live_broadcast_id": null,
        "seen": null,
        "supervision_info": null,
        "id": "225193095",
        "hd_profile_pic_url_info": {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/t51.2885-19/243703439_1188462358328641_1593493214054989522_n.jpg?..."
        },
        "full_name": "New York Post",
        "__typename": "XDTUserDict"
    },
    "owner": {
        "pk": "225193095",
        "profile_pic_url": "https://scontent-atl3-1.cdninstagram.com/v/t51.2885-19/243703439_1188462358328641_1593493214054989522_n.jpg?...",
        "username": "nypost",
        "friendship_status": null,
        "is_embeds_disabled": false,
        "is_unpublished": false,
        "is_verified": true,
        "show_account_transparency_details": true,
        "supervision_info": null,
        "transparency_product": null,
        "transparency_product_enabled": false,
        "transparency_label": null,
        "id": "225193095",
        "__typename": "XDTUserDict",
        "is_private": false
    },
    "images": [
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/t5/...",
            "height": 1920,
            "width": 1080
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.c...",
            "height": 1280,
            "width": 720
        },
        {
            "url": "https://scontent-atl3-1.cdninstagr...",
            "height": 1138,
            "width": 640
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/...",
            "height": 853,
            "width": 480
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.co..",
            "height": 569,
            "width": 320
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/..",
            "height": 427,
            "width": 240
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/t5...",
            "height": 608,
            "width": 608
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/...",
            "height": 422,
            "width": 422
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/...",
            "height": 360,
            "width": 360
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/t5...",
            "height": 270,
            "width": 270
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/t5...",
            "height": 180,
            "width": 180
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/t5...",
            "height": 135,
            "width": 135
        },
        {
            "url": "https://scontent-atl3-1.cdninstagram.com/v/...",
            "height": 84,
            "width": 84
        }
    ],
    "video_versions": [
        {
            "width": 480,
            "height": 853,
            "url": "https://scontent-atl3-1.cdninstagram.com/...",
            "type": 101
        },
        {
            "width": 480,
            "height": 853,
            "url": "https://scontent-atl3-1.cdninstagram.com/...",
            "type": 103
        },
        {
            "width": 480,
            "height": 853,
            "url": "https://scontent-atl3-1.cdninstagram.com/...",
            "type": 102
        }
    ],
    "carousel_media_count": null,
    "carousel_media": null,
    "coauthor_producers": [],
    "timeline_pinned_user_ids": ["23294935302"],
    "date": "2025-02-25T16:16:18.000Z",
    "crawled_at": "2025-02-26T09:38:21.497Z"
}
````

### Limitations

**No-login-cookie mode**: This actor runs without a logged-in session cookie, so some information is only available when logged in.

# Actor input Schema

## `instagramUsernames` (type: `array`):

Insert the username or URL of any profile you want to get posts from.

## `postsPerProfile` (type: `integer`):

No description

## `retries` (type: `integer`):

Retries to get which is has blocked

## `recent` (type: `string`):

Recent posts. Items filtered out by this date will incur a processing fee.

## Actor input object example

```json
{
  "instagramUsernames": [
    "nypost"
  ],
  "postsPerProfile": 10,
  "retries": 3
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("instagram-scraper/fast-instagram-post-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("instagram-scraper/fast-instagram-post-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 '{}' |
apify call instagram-scraper/fast-instagram-post-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Fast Instagram Profile Posts Scraper 🚀",
        "description": "Instagram Post Scraper. Post data: hashtags, comment_count, like_count, usertags, images, videos, shortcode and etc.\nScrape Instagram Posts with Ease and Speed",
        "version": "0.1",
        "x-build-id": "B7eLMjAhxhUqH6D2N"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/instagram-scraper~fast-instagram-post-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-instagram-scraper-fast-instagram-post-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/instagram-scraper~fast-instagram-post-scraper/runs": {
            "post": {
                "operationId": "runs-sync-instagram-scraper-fast-instagram-post-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/instagram-scraper~fast-instagram-post-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-instagram-scraper-fast-instagram-post-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": [
                    "instagramUsernames",
                    "postsPerProfile"
                ],
                "properties": {
                    "instagramUsernames": {
                        "title": "Instagram Username",
                        "minItems": 1,
                        "type": "array",
                        "description": "Insert the username or URL of any profile you want to get posts from.",
                        "default": [
                            "nypost"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "postsPerProfile": {
                        "title": "Maximum posts per profile",
                        "minimum": 5,
                        "type": "integer",
                        "description": "",
                        "default": 10
                    },
                    "retries": {
                        "title": "Retries",
                        "minimum": 3,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Retries to get which is has blocked",
                        "default": 3
                    },
                    "recent": {
                        "title": "Recent",
                        "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
                        "type": "string",
                        "description": "Recent posts. Items filtered out by this date will incur a processing fee."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
