# Instagram Scraper - Profiles, Posts, Likes and Comments (`extraordinary_grasshopper/instagram-profile-post-scraper`) Actor

Scrape public Instagram profiles (followers, bio, verified, recent posts) and post or reel details: likes, comments, views, caption, hashtags, media links. No login.

- **URL**: https://apify.com/extraordinary_grasshopper/instagram-profile-post-scraper.md
- **Developed by:** [GetVidFB Data](https://apify.com/extraordinary_grasshopper) (community)
- **Categories:** Social media, Lead generation, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## 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 Profile & Post Scraper

Scrape **public Instagram profiles and posts**: follower, following and post counts, bio, verified badge, profile picture and the latest posts of any public account, plus full **post and reel details** with likes, comments, views, caption, hashtags, mentions, location, tagged users and media links. No login and no cookies needed, and you **pay only for the results you get**.

### What can this Instagram scraper do?

- 👤 **Profiles**: username, full name, bio, verified badge, private flag, followers, following, post count, reels flag, HD profile picture and the **12 most recent posts** (with caption, type, pinned flag and thumbnail).
- 🖼️ **Posts and reels**: publish date, like, comment and view counts, caption (and whether it was edited), hashtags, mentions, location, tagged users, co-authors, owner details and the comments shown publicly.
- 🎞️ **Media links**: every image and video of a post or carousel in order, with width, height, duration and Instagram's accessibility caption.
- 🔗 **Flexible input**: usernames (`nasa`, `@nasa`), profile URLs, post and reel URLs (`/p/`, `/reel/`, `/tv/`, `/share/`) or plain shortcodes.
- ➕ **One-click deep scrape**: turn on "Also scrape details of each profile's recent posts" to get full details of every recent post.

Only public data is collected: no stories, highlights, follower lists or private accounts.

### How much does it cost to scrape Instagram?

This Actor uses **pay per event** pricing, so you pay only for results:

| Event | Price |
|---|---|
| Profile (with its 12 most recent posts listed) | $0.0015 ($1.50 per 1,000) |
| Post or reel details | $0.0012 ($1.20 per 1,000) |

Inputs that fail (unknown or private account, deleted post) are reported in the dataset **for free**. Set a maximum cost per run in the run options, and the Actor stops when it reaches the limit.

### How to use it

1. Enter one or more **usernames or profile URLs**, and/or **post or reel URLs**.
2. Optionally turn on **Also scrape details of each profile's recent posts** and choose how many per profile (up to 12).
3. Click **Start**, then download your data as JSON, CSV, Excel or HTML, or get it through the API.

### Input example

```json
{
    "usernames": ["nasa", "https://www.instagram.com/natgeo/"],
    "postUrls": ["https://www.instagram.com/p/DfkkknjD6vm/"],
    "scrapeRecentPosts": true,
    "maxPostsPerProfile": 3
}
```

### Output example

A profile from a real run (long image links shortened with `...`, 1 of 12 recent posts shown):

```json
{
    "resultType": "profile",
    "input": "nasa",
    "image": "https://scontent-mxp2-1.cdninstagram.com/v/t51.2885-19/29090066_159271...",
    "id": "528817151",
    "username": "nasa",
    "full_name": "NASA",
    "biography": "Making the seemingly impossible, possible. ✨",
    "is_verified": true,
    "is_private": false,
    "followers": 104329133,
    "following": 91,
    "posts": 5010,
    "has_reels": true,
    "profile_pic_url": "https://scontent-mxp2-1.cdninstagram.com/v/t51.2885-19/29090066_159271...",
    "url": "https://www.instagram.com/nasa/",
    "recent_posts_count": 12,
    "recent_posts": [
        {
            "id": "4029750691019327952",
            "shortcode": "DfsjOcnl4nQ",
            "url": "https://www.instagram.com/p/DfsjOcnl4nQ/",
            "type": "image",
            "product_type": "feed",
            "is_pinned": false,
            "caption": "Before dawn breaks…\n\nOne of the astronauts aboard the @ISS snapped thi...",
            "thumbnail": "https://scontent-mxp2-1.cdninstagram.com/v/t51.82787-15/905243762_1866..."
        }
    ],
    "scrapedAt": "2026-11-15T06:51:17.979Z"
}
```

A post from the same test (2 of 12 comments shown):

```json
{
    "resultType": "post",
    "input": "https://www.instagram.com/p/Dfs33l2DPXC/",
    "from_profile": "natgeo",
    "image": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.82787-15/90427...",
    "username": "natgeo",
    "full_name": "National Geographic",
    "id": "4029841479354348994",
    "shortcode": "Dfs33l2DPXC",
    "url": "https://www.instagram.com/p/Dfs33l2DPXC/",
    "type": "image",
    "product_type": "feed",
    "taken_at": "2026-11-14T17:00:00.000Z",
    "taken_at_timestamp": 1794675600,
    "caption": "The ketogenic diet has helped some people find relief from c...",
    "caption_is_edited": false,
    "hashtags": [],
    "mentions": [],
    "like_count": 4158,
    "comment_count": 84,
    "view_count": null,
    "likes_hidden": false,
    "comments_disabled": false,
    "location": null,
    "tagged_users": [],
    "coauthors": [],
    "owner": {
        "id": "787132",
        "username": "natgeo",
        "full_name": "National Geographic",
        "is_verified": true,
        "profile_pic_url": "https://scontent.cdninstagram.com/v/t51.82787-19/683576066_1..."
    },
    "media": [
        {
            "type": "image",
            "url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.82787-15/90427...",
            "thumbnail": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.82787-15/90427...",
            "width": 1080,
            "height": 1350,
            "duration": null,
            "accessibility_caption": "Photo by National Geographic on November 14, 2026. May be an image of bread and text."
        }
    ],
    "comments": [
        {
            "id": "18107373584021178",
            "text": "Anti-histamine diet has worked for me !!",
            "created_at": "2026-11-15T05:07:54.000Z",
            "username": "anita.mango",
            "is_verified": false,
            "like_count": 0,
            "reply_count": null
        }
    ],
    "media_count": 1,
    "scrapedAt": "2026-11-15T06:51:35.385Z"
}
```

`resultType` tells profiles and posts apart, and `from_profile` shows which profile a post was found on. `view_count` is filled for reels and videos when Instagram shows it.

### Tips

- Profiles already include the latest 12 posts with caption and thumbnail. Turn on the deep scrape only when you need likes, comments or media links of those posts.
- For influencer research or brand monitoring, schedule the Actor daily and compare follower and like counts between runs.
- Connect the Actor to Google Sheets, Make, Zapier, n8n or a webhook to feed the data into your own tools.

### Is it legal to scrape Instagram?

This Actor collects only information that Instagram shows publicly to logged-out visitors. It doesn't log in, and it doesn't access stories, private accounts or follower lists. Profiles and comments can contain personal data, which is protected by laws such as the GDPR: only collect what you have a legitimate reason to use, and make sure your use follows Instagram's terms and the laws that apply to you.

### Need another field or a custom feed?

Open an issue on the **Issues** tab. We usually reply within a day.

# Actor input Schema

## `usernames` (type: `array`):

Public Instagram accounts, one per line: nasa, @nasa or https://www.instagram.com/nasa/.

## `postUrls` (type: `array`):

Public post, reel or video links (/p/, /reel/, /tv/ or /share/) or shortcodes such as DfkkknjD6vm, one per line.

## `scrapeRecentPosts` (type: `boolean`):

Opens the recent posts found on each profile and returns full post details (charged as post details). Profiles already list their 12 latest posts with caption and thumbnail.

## `maxPostsPerProfile` (type: `integer`):

How many recent posts to open per profile when the option above is on (Instagram shows up to 12 without login).

## Actor input object example

```json
{
  "usernames": [
    "nasa"
  ],
  "scrapeRecentPosts": false,
  "maxPostsPerProfile": 12
}
```

# Actor output Schema

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

No description

## `results` (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 = {
    "usernames": [
        "nasa"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("extraordinary_grasshopper/instagram-profile-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 = { "usernames": ["nasa"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,extraordinary_grasshopper/instagram-profile-post-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/6cnOkUZyGI4qV4Ng5/builds/IfucBobtq5zyXMOvd/openapi.json
