# Instagram Posts Scraper (`icoe-man/instagram-posts-scraper`) Actor

An instagram posts scraper: collect public posts, reels, tagged posts, stories and highlights from Instagram, with captions, dates and counts. Export JSON, CSV or Excel.

- **URL**: https://apify.com/icoe-man/instagram-posts-scraper.md
- **Developed by:** [Icoe Man](https://apify.com/icoe-man) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/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 Posts Scraper

Download public Instagram content in a table you can use in reports or bring into other tools. Start with a profile to collect feed posts, reels, posts that tag it, current stories, or highlight albums. For a specific post or reel, paste its link. To get the individual stories in a highlight, enter its ID (the number in its link).

### What you get

Under **What to collect**, choose the type of results you want. Fill in the fields for that choice, then start the run. Each run returns one kind of result. The Actor ignores fields from other modes. Use full web addresses. If you have a short link, open it and copy the full address from your browser's address bar. Choose **Live** under **Data freshness** to collect fresh data on every run.

### Collection modes

#### Profile posts

Collect the latest public feed posts from each Instagram profile you enter. In `profile-posts` mode, fill in **Usernames or profile links** (up to 100 entries), and **Posts from** (optional), **Posts before** (optional). Use **Result limit per target** to set how many posts the Actor can collect per entry. The default is 100 and the highest setting is 1000. Each post appears in its own row and counts as one **Profile posts** charge.

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "instagram",
  "id": "Dfc1mYxFevS",
  "url": "https://www.instagram.com/p/Dfc1mYxFevS/",
  "author": {
    "id": "528817151",
    "username": "nasa",
    "displayName": "NASA",
    "verified": true
  },
  "text": "Apply to become an astronaut!\n\nWe've opened applications to join NASA's astronaut corps, who will expand the frontiers of discovery in low Earth orbit, on the Moon, and beyond. Check our link in bio for the details.\n\n#NASA #Astronaut #JobSearch",
  "language": null,
  "createdAt": "2026-11-07T18:35:41Z",
  "hashtags": [
    "NASA",
    "Astronaut",
    "JobSearch"
  ],
  "mentions": [],
  "metrics": {
    "likes": 84421,
    "comments": 1096,
    "views": 3467953
  },
  "media": [
    {
      "kind": "video",
      "url": "https://scontent.cdninstagram.com/v/t51/example.mp4",
      "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51/example.jpg",
      "durationSec": 63,
      "width": 720,
      "height": 1280
    }
  ],
  "details": {
    "instagram": {
      "productType": "reel",
      "audio": {
        "id": "1234567890123456",
        "title": "Original audio",
        "artist": "example_user",
        "isOriginal": true
      },
      "paidPartnership": false,
      "coauthors": [
        "example_partner"
      ],
      "taggedUsers": [
        "example_friend"
      ],
      "accountFollowers": 104352921
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "username": "nasa",
    "maxItems": 30
  }
}
```

#### Posts and reels by link

Paste a link for each public Instagram post or reel you want to collect. In `post-get` mode, fill in **Post or reel links** (up to 100 entries). You get one post per entry. Each post appears in its own row and counts as one **Posts and reels by link** charge.

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "instagram",
  "id": "Dfc1mYxFevS",
  "url": "https://www.instagram.com/p/Dfc1mYxFevS/",
  "author": {
    "id": "528817151",
    "username": "nasa",
    "displayName": "NASA",
    "verified": true
  },
  "text": "Apply to become an astronaut!\n\nWe've opened applications to join NASA's astronaut corps, who will expand the frontiers of discovery in low Earth orbit, on the Moon, and beyond. Check our link in bio for the details.\n\n#NASA #Astronaut #JobSearch",
  "language": null,
  "createdAt": "2026-11-07T18:35:41Z",
  "hashtags": [
    "NASA",
    "Astronaut",
    "JobSearch"
  ],
  "mentions": [],
  "metrics": {
    "likes": 84429,
    "comments": 1096,
    "views": 3468496
  },
  "media": [
    {
      "kind": "video",
      "url": "https://scontent.cdninstagram.com/v/t51/example.mp4",
      "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51/example.jpg",
      "durationSec": 63,
      "width": null,
      "height": null
    }
  ],
  "details": {
    "instagram": {
      "productType": "reel",
      "audio": {
        "id": "1234567890123456",
        "title": "Original audio",
        "artist": "example_user",
        "isOriginal": true
      },
      "paidPartnership": false
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "url": "https://www.instagram.com/p/Dfc1mYxFevS/",
    "maxItems": 1
  }
}
```

#### Profile reels

Collect the latest public reels from each Instagram profile you enter. In `profile-reels` mode, fill in **Usernames or profile links** (up to 100 entries), and **Posts from** (optional), **Posts before** (optional). Use **Result limit per target** to set how many posts the Actor can collect per entry. The default is 100 and the highest setting is 1000. Each post appears in its own row and counts as one **Profile reels** charge.

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "instagram",
  "id": "DfhyUf-vhkA",
  "url": "https://www.instagram.com/p/DfhyUf-vhkA/",
  "author": {
    "id": "528817151",
    "username": "nasa",
    "displayName": "NASA",
    "verified": true
  },
  "text": "The weekend ends. The mission keeps going.\n\nThis is what American ambition looks like. 🇺🇸🚀",
  "language": null,
  "createdAt": "2026-11-09T16:47:12Z",
  "metrics": {
    "likes": 31433,
    "comments": 376,
    "shares": null,
    "views": 2438354
  },
  "hashtags": [],
  "mentions": [],
  "media": [
    {
      "kind": "video",
      "url": "https://scontent.cdninstagram.com/v/t51/example.mp4",
      "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51/example.jpg",
      "durationSec": 87,
      "width": 1280,
      "height": 720
    }
  ],
  "details": {
    "instagram": {
      "productType": "reel",
      "audio": {
        "id": "1234567890123456",
        "title": "Original audio",
        "artist": "example_user",
        "isOriginal": true
      },
      "paidPartnership": false,
      "sponsors": [
        "example_brand"
      ],
      "coauthors": [
        "example_partner"
      ],
      "taggedUsers": [
        "example_friend"
      ],
      "accountFollowers": 104352921
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "username": "nasa",
    "maxItems": 30
  }
}
```

#### Tagged posts

Get the public posts in which each Instagram profile you enter is tagged. In `profile-tagged` mode, fill in **Usernames or profile links** (up to 100 entries). Use **Result limit per target** to set how many posts the Actor can collect per entry. The default is 100 and the highest setting is 1000. Each post appears in its own row and counts as one **Tagged posts** charge.

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "instagram",
  "id": "CxAmPlE1234",
  "url": "https://www.instagram.com/p/CxAmPlE1234/",
  "author": {
    "id": "1234567890",
    "username": "example_user"
  },
  "text": "A short example sentence for illustration. #coffee",
  "hashtags": [
    "coffee"
  ],
  "mentions": [],
  "language": null,
  "createdAt": "2026-11-04T09:12:00Z",
  "metrics": {
    "likes": 351,
    "comments": 14,
    "shares": null,
    "views": null
  },
  "media": [
    {
      "kind": "video",
      "url": "https://scontent.cdninstagram.com/v/t51/example.mp4",
      "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51/example.jpg",
      "width": null,
      "height": null
    }
  ],
  "details": {
    "instagram": {
      "productType": "reel",
      "sponsors": [
        "example_brand"
      ],
      "coauthors": [
        "example_partner"
      ],
      "taggedUsers": [
        "example_friend"
      ],
      "accountFollowers": 104352921
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "username": "nasa",
    "maxItems": 30
  }
}
```

#### Profile stories

Collect public stories that are still live on each Instagram profile you enter. In `profile-stories` mode, fill in **Usernames or profile links** (up to 100 entries). You get up to 100 posts per entry with **Result limit per target** at its default setting, which is also the highest setting. Each post appears in its own row and counts as one **Profile stories** charge.

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "instagram",
  "id": "4027505175539163034",
  "url": "https://www.instagram.com/stories/nasa/4027505175539163034/",
  "author": {
    "id": "528817151",
    "username": "nasa"
  },
  "createdAt": "2026-11-10T18:40:51Z",
  "metrics": {},
  "media": [
    {
      "kind": "video",
      "url": "https://scontent.cdninstagram.com/v/t51/example.mp4",
      "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51/example.jpg"
    }
  ],
  "details": {
    "instagram": {
      "expiresAt": null
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "username": "nasa",
    "maxItems": 30
  }
}
```

#### Profile highlights

List the public highlight albums on each Instagram profile you enter. In `profile-highlights` mode, fill in **Usernames or profile links** (up to 100 entries). You get up to 100 posts per entry with **Result limit per target** at its default setting, which is also the highest setting. Each post appears in its own row and counts as one **Profile highlights** charge.

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "instagram",
  "id": "18145966027591735",
  "url": "https://www.instagram.com/stories/highlights/18145966027591735/",
  "author": {
    "id": "528817151",
    "username": "nasa"
  },
  "text": "MAX POWER",
  "metrics": {},
  "media": [
    {
      "kind": "image",
      "url": "https://scontent.cdninstagram.com/v/t51/example.jpg"
    }
  ],
  "details": {
    "instagram": {
      "framesCount": 6
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "username": "nasa",
    "maxItems": 30
  }
}
```

#### Highlight frames by ID

Enter a public Instagram highlight's ID to get the individual stories (frames) inside it. In `highlight-get` mode, fill in **Highlight IDs** (up to 100 entries). You get up to 100 posts per entry with **Result limit per target** at its default setting, which is also the highest setting. Each post appears in its own row and counts as one **Highlight frames by ID** charge.

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "instagram",
  "id": "3914477988573951523",
  "url": "https://www.instagram.com/stories/nasa/3914477988573951523/",
  "author": {
    "id": "528817151",
    "username": "nasa",
    "verified": true
  },
  "createdAt": "2026-06-07T19:56:27Z",
  "metrics": {},
  "media": [
    {
      "kind": "video",
      "url": "https://scontent.cdninstagram.com/v/t51/example.mp4",
      "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51/example.jpg",
      "durationSec": 45,
      "width": null,
      "height": null
    }
  ],
  "details": {
    "instagram": {
      "expiresAt": null
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "highlightId": "18201653992314974",
    "maxItems": 30
  }
}
```

### Ways to use the data

- Review your brand's posts and reels alongside posts that tag your brand.
- Compare what competing brands post and how often, then see how many likes and comments their posts get.
- Keep a record of posts, stories, and highlights while they're still public.
- Build a campaign recap from the posts and stories your brand shared during the campaign.
- Plan your next posts based on which formats and captions drew the most likes and comments.

### What to enter

| Field key | Name on the form | What to enter |
| --- | --- | --- |
| `mode` | What to collect | Choose one type of result per run, then fill in the fields for that choice. |
| `usernames` | Usernames or profile links | Enter Instagram usernames without the @ sign, such as nasa, or paste profile links. |
| `postedAfter` | Posts from | Enter a UTC date, such as 2026-11-01, to include posts from that day onward. Leave blank for no start date. If the tool filters by date after reading posts, you may get fewer results than your limit. The run stops early after three pages in a row with no matches. |
| `postedBefore` | Posts before | Enter a UTC date, such as 2026-11-15, to include only posts before that day. Leave blank for no cutoff. If the tool filters by date after reading posts, you may get fewer results than your limit. The run stops early after three pages in a row with no matches. |
| `postUrls` | Post or reel links | Paste links to public Instagram posts or reels, such as https://www.instagram.com/p/Dfc1mYxFevS/. |
| `highlightIds` | Highlight IDs | Paste the number from each Instagram highlight link, such as 18201653992314974. Copy only the number where `<id>` appears in `https://www.instagram.com/stories/highlights/<id>/`. |
| `maxItems` | Result limit per target | Set the most results to collect from each target, up to the mode's maximum. Leave this blank to use the mode's default limit. The limit you set doesn't apply to these modes, which return one result per target: Posts and reels by link. |
| `freshness` | Data freshness | Standard can return results faster when recently collected data is available. Choose Live to collect fresh data on every run. |

Example input:

```json
{
  "mode": "profile-posts",
  "usernames": [
    "natgeo",
    "nasa"
  ],
  "maxItems": 20,
  "freshness": "standard"
}
```

### Your results

Each mode has its own view of the results table. See **Collection modes** for what each mode returns.

Every row has a `status` field. For each entry that fails, the Actor returns one row with `status: "error"`. The `error` field has a `code` and a `message`. If a required field for your mode is blank, the run returns one error row and collects no data.

### Pricing

You pay per result. Prices for each Apify plan are in USD per 1,000 results.

| What you pay for | Free | Bronze | Silver | Gold | Platinum | Diamond |
| --- | --- | --- | --- | --- | --- | --- |
| Highlight frames by ID | $2.599 | $2.300 | $1.940 | $1.533 | $1.533 | $1.533 |
| Posts and reels by link | $2.599 | $2.300 | $1.940 | $1.533 | $1.533 | $1.533 |
| Profile highlights | $2.599 | $2.300 | $1.940 | $1.533 | $1.533 | $1.533 |
| Profile posts | $2.599 | $2.300 | $1.940 | $1.533 | $1.533 | $1.533 |
| Profile reels | $2.599 | $2.300 | $1.940 | $1.533 | $1.533 | $1.533 |
| Profile stories | $2.599 | $2.300 | $1.940 | $1.533 | $1.533 | $1.533 |
| Tagged posts | $2.599 | $2.300 | $1.940 | $1.533 | $1.533 | $1.533 |

You don't pay for errors or empty results. The run stops when it reaches your spending limit.

On the free plan, you can collect up to 10 results per run and make up to 20 runs per day.

### Common questions

#### Which mode should I choose?

Choose Profile posts for feed posts, Profile reels for reels, or Tagged posts to see posts that tag the profile. Use Posts and reels by link to get one post or reel per link. Profile stories collects current stories, while Profile highlights lists highlight albums. To get the individual stories in an album, choose Highlight frames by ID.

#### Where do I find the number to enter in Highlight IDs?

Copy the number after /highlights/ in the link. In https://www.instagram.com/stories/highlights/18201653992314974/, the ID is 18201653992314974.

#### Why did Profile stories return no results?

Stories expire after 24 hours. If the profile has no public stories still live, the run returns nothing and you pay nothing.

#### Can I see audio, tags, and paid partnership details?

When available, results show which audio a reel uses and whether a post has a paid partnership label. You can also see who co-authored a post, which accounts are tagged in the photo or video, and the follower count for the profile you collected from. Reels and tagged posts may list sponsors. Some rows leave these fields blank.

#### Can I collect posts or reels from a specific date range?

Yes. In Profile posts or Profile reels, set the date range with Posts from and Posts before. Both fields use UTC, so check the time difference if you're using local dates. Tagged posts has no date filter. If the tool checks dates after reading the results, it may return fewer than your limit. It stops early after three pages in a row with no matches.

#### Do I need an Instagram login to collect posts?

No. You don't need to sign in or share browser cookies. The tool collects only public content and can't access posts from private accounts.

#### How many results can I collect, and what do I pay for?

Set Result limit per target to choose the maximum for each profile, link, or highlight ID. The free plan allows up to 10 items per run and 20 runs per day. You pay only for the results you get. Errors and empty runs cost nothing, and a run stops if it reaches your spending limit.

#### Is this tool affiliated with Instagram?

No. This is an independent tool. Instagram and Meta are not affiliated with it, do not endorse it, and do not sponsor it. The tool collects only what's publicly visible on Instagram.

### Disclaimer

This Actor is not affiliated with, endorsed by, or sponsored by Instagram. All trademarks belong to their owners.

# Actor input Schema

## `mode` (type: `string`):

Choose one type of result per run, then fill in the fields for that choice.

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

Enter Instagram usernames without the @ sign, such as nasa, or paste profile links.

## `postedAfter` (type: `string`):

Enter a UTC date, such as 2026-11-01, to include posts from that day onward. Leave blank for no start date. If the tool filters by date after reading posts, you may get fewer results than your limit. The run stops early after three pages in a row with no matches.

## `postedBefore` (type: `string`):

Enter a UTC date, such as 2026-11-15, to include only posts before that day. Leave blank for no cutoff. If the tool filters by date after reading posts, you may get fewer results than your limit. The run stops early after three pages in a row with no matches.

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

Paste links to public Instagram posts or reels, such as https://www.instagram.com/p/Dfc1mYxFevS/.

## `highlightIds` (type: `array`):

Paste the number from each Instagram highlight link, such as 18201653992314974. Copy only the number where `<id>` appears in `https://www.instagram.com/stories/highlights/<id>/`.

## `maxItems` (type: `integer`):

Set the most results to collect from each target, up to the mode's maximum. Leave this blank to use the mode's default limit. The limit you set doesn't apply to these modes, which return one result per target: Posts and reels by link.

## `freshness` (type: `string`):

Standard can return results faster when recently collected data is available. Choose Live to collect fresh data on every run.

## Actor input object example

```json
{
  "mode": "profile-posts",
  "usernames": [
    "natgeo",
    "nasa"
  ],
  "postUrls": [
    "https://www.instagram.com/p/Dfc1mYxFevS/"
  ],
  "highlightIds": [
    "18201653992314974"
  ],
  "maxItems": 20,
  "freshness": "standard"
}
```

# Actor output Schema

## `results` (type: `string`):

See everything this run collected in one table.

# 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 = {
    "mode": "profile-posts",
    "usernames": [
        "natgeo",
        "nasa"
    ],
    "postUrls": [
        "https://www.instagram.com/p/Dfc1mYxFevS/"
    ],
    "highlightIds": [
        "18201653992314974"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("icoe-man/instagram-posts-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 = {
    "mode": "profile-posts",
    "usernames": [
        "natgeo",
        "nasa",
    ],
    "postUrls": ["https://www.instagram.com/p/Dfc1mYxFevS/"],
    "highlightIds": ["18201653992314974"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("icoe-man/instagram-posts-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 '{
  "mode": "profile-posts",
  "usernames": [
    "natgeo",
    "nasa"
  ],
  "postUrls": [
    "https://www.instagram.com/p/Dfc1mYxFevS/"
  ],
  "highlightIds": [
    "18201653992314974"
  ],
  "maxItems": 20
}' |
apify call icoe-man/instagram-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,icoe-man/instagram-posts-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/6DvpWl0GIDdVuVzkK/builds/NHdXotm6TtQQKES7R/openapi.json
