# Instagram Posts Scraper: Likes, Comments & Dates (`luzivanlt/instagram-posts-scraper`) Actor

A public Instagram profile's posts, newest first, each with its like count, comment count and exact date. $2 per 1,000 posts. Caption, media, tags, collaborators. No login.

- **URL**: https://apify.com/luzivanlt/instagram-posts-scraper.md
- **Developed by:** [Luzi](https://apify.com/luzivanlt) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 posts

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: Likes, Comments & Dates

Get the posts of a public Instagram profile, newest first, each with its like
count, comment count and exact date and time, plus the caption, hashtags,
mentions, images, videos, tagged accounts, collaborators, place and the first
comments, with the profile's followers and bio on every row. Paste profile
links or just usernames. No Instagram account needed.

Tested daily. Latest check: 80 posts from two profiles in under 3 minutes,
every one with its exact date and comment count.

### What does this Actor do?

You give it Instagram profiles. For each one it reads the profile's grid
from the newest post back, and saves one row per post until it reaches your
limit, your date, or the profile's first post.

Each post comes with:

- its link, caption and exact date, and whether the caption was edited
- its like count and comment count (or a flag when the author hid the likes)
- whether it is an image, a video or a carousel, with the image and video
  links, each slide of a carousel, and the image description
- the hashtags and accounts named in its caption
- the accounts tagged in it, its collaborators and its place
- the sound on a reel, and Instagram's related topics
- the first comments shown under it, with their likes and authors
- the author's username, name, id, picture and verified badge
- the profile's followers, following, post count, bio, links and highlights

### Why use it?

- **Counts on every post.** Every row has the post's like and comment count
  and its exact time, not just the day.
- **Collaboration posts included.** Posts another account made together with
  the profile appear on its grid, and come with their real author and every
  collaborator.
- **Track a brand, a creator or a competitor.** See what they post, how each
  post does, and how many followers they have.
- **Monitor new posts.** Run it daily with **Only posts newer than** set to
  `1 day`.
- **Use the data anywhere.** Download as JSON, CSV or Excel, or send it to
  your own tools through Apify's API and integrations.

### How to use it

1. Paste one or more profiles into **Profile links or usernames**:
   `https://www.instagram.com/nasa/`, `instagram.com/nasa`, `@nasa` or `nasa`
   all work.
2. Optionally, set **Only posts newer than** and **Max posts per profile**.
3. Click **Start**. When the run ends, open the **Output** tab to view the
   posts or download them.

A link to a single post, a reel, a hashtag or a place is not supported: paste
the profile's link or username instead. Put one profile on each line of the
list.

Run it with no input to see a sample: up to 20 posts from NASA's profile,
charged as usual.

### Input

| Field                                            | What it does                                                                                                  | Default |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ------- |
| **Profile links or usernames** (`startUrls`)     | The profiles to read. Required.                                                                               | —       |
| **Only posts newer than** (`onlyPostsNewerThan`) | A date (`YYYY-MM-DD`, UTC) or a period (`7 days`, `2 weeks`, `3 months`, `1 year`). Empty = the whole history | empty   |
| **Max posts per profile** (`maxPostsPerProfile`) | Stop reading a profile after this many posts, from 1 to 10,000                                                | `50`    |

Example input:

```json
{
  "startUrls": ["https://www.instagram.com/nasa/", "natgeo"],
  "onlyPostsNewerThan": "30 days",
  "maxPostsPerProfile": 200
}
```

### Output

One row per post. An example, with made-up values:

```json
{
  "post_id": "3700000000000000001",
  "post_code": "DAbCdEfGhIj",
  "url": "https://www.instagram.com/p/DAbCdEfGhIj/",
  "caption": "Our new launch is live today 🚀 #launch #design with @example.partner",
  "caption_is_edited": false,
  "posted_at": "2026-10-13T18:28:06.000Z",
  "like_count": 4176,
  "comment_count": 89,
  "like_counts_hidden": false,
  "media_type": "carousel",
  "product_type": "carousel_container",
  "hashtags": ["launch", "design"],
  "mentions": ["example.partner"],
  "image_url": "https://…/1.jpg",
  "image_width": null,
  "image_height": null,
  "video_url": null,
  "video_duration": null,
  "audio_url": null,
  "has_audio": null,
  "width": 1080,
  "height": 1350,
  "alt_text": "Photo by Example Brand on October 13, 2026. May be an image of a shoe.",
  "carousel_media_count": 2,
  "carousel_media": [
    {
      "media_id": "3700000000000000002",
      "media_type": "image",
      "image_url": "https://…/1.jpg",
      "image_width": null,
      "image_height": null,
      "video_url": null,
      "video_duration": null,
      "audio_url": null,
      "has_audio": null,
      "width": 1080,
      "height": 1350,
      "alt_text": "A shoe",
      "tagged_users": []
    },
    {
      "media_id": "3700000000000000003",
      "media_type": "video",
      "image_url": "https://…/2.jpg",
      "image_width": 720,
      "image_height": 1280,
      "video_url": "https://…/2.mp4",
      "video_duration": 9.5,
      "audio_url": "https://…/2-audio.mp4",
      "has_audio": true,
      "width": 1080,
      "height": 1920,
      "alt_text": null,
      "tagged_users": []
    }
  ],
  "tagged_users": [
    {
      "username": "example.partner",
      "full_name": "Example Partner",
      "id": "70000000002",
      "is_verified": true,
      "profile_pic_url": "https://…/p.jpg",
      "x": 0.25,
      "y": 0.75
    }
  ],
  "coauthors": [
    {
      "username": "example.partner",
      "full_name": "Example Partner",
      "id": "70000000002",
      "is_verified": true,
      "profile_pic_url": "https://…/p.jpg"
    }
  ],
  "location_name": "Example Store",
  "location_id": "213000001",
  "location_lat": 40.7,
  "location_lng": -74.0,
  "audio_id": null,
  "audio_title": null,
  "audio_artist_username": null,
  "audio_artist_id": null,
  "audio_is_explicit": null,
  "audio_is_trending": null,
  "audio_is_muted": null,
  "audio_muted_reason": null,
  "uses_original_audio": null,
  "related_topics": ["Sneakers"],
  "first_comments": [
    {
      "comment_id": "17900000000000001",
      "text": "Love it",
      "gif_url": null,
      "posted_at": "2026-10-13T18:40:00.000Z",
      "like_count": 3,
      "username": "a.fan",
      "user_id": "70000000003",
      "user_is_verified": false,
      "user_profile_pic_url": "https://…/f.jpg"
    }
  ],
  "author_username": "example.brand",
  "author_full_name": "Example Brand",
  "author_id": "70000000001",
  "author_graph_id": "17841400000000001",
  "author_is_verified": true,
  "author_profile_pic_url": "https://…/avatar.jpg",
  "profile_username": "example.brand",
  "profile_id": "70000000001",
  "profile_graph_id": "17841400000000001",
  "profile_full_name": "Example Brand",
  "profile_biography": "Making things people like.",
  "profile_bio_links": [{ "url": "https://example.com", "title": "Shop", "type": "external" }],
  "profile_follower_count": 48210,
  "profile_following_count": 120,
  "profile_post_count": 312,
  "profile_is_verified": true,
  "profile_is_memorialized": false,
  "profile_latest_story_at": "2026-10-13T09:00:00.000Z",
  "profile_pic_url": "https://…/avatar.jpg",
  "profile_threads_badge": "example.brand",
  "profile_highlights": [
    { "id": "18000000000000001", "title": "New in", "cover_url": "https://…/h.jpg" }
  ],
  "source_url": "https://www.instagram.com/example.brand/"
}
```

| Field                                               | What it holds                                                                                                                                                                            |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `post_id`                                           | Instagram's id for the post                                                                                                                                                              |
| `post_code`                                         | The short code in the post's link                                                                                                                                                        |
| `url`                                               | The post's page                                                                                                                                                                          |
| `caption`                                           | The caption. `null` for a post without one                                                                                                                                               |
| `caption_is_edited`                                 | `true` when the author edited the caption                                                                                                                                                |
| `posted_at`                                         | When it was posted (UTC, ISO 8601)                                                                                                                                                       |
| `like_count`                                        | Likes. `null` when the author hid them                                                                                                                                                   |
| `comment_count`                                     | Comments                                                                                                                                                                                 |
| `like_counts_hidden`                                | `true` when the author hid the post's like count                                                                                                                                         |
| `media_type`                                        | `image`, `video` or `carousel`                                                                                                                                                           |
| `product_type`                                      | Instagram's kind of post: `feed`, `clips` (a reel) or `carousel_container`                                                                                                               |
| `hashtags`                                          | The hashtags in the caption, without `#`                                                                                                                                                 |
| `mentions`                                          | The accounts named in the caption, without `@`                                                                                                                                           |
| `image_url`                                         | The post's image at its largest size (a video's cover image)                                                                                                                             |
| `image_width`, `image_height`                       | For a video, the size of `image_url` in pixels (Instagram gives no size for a photo's image)                                                                                             |
| `video_url`                                         | The post's video, when it is one                                                                                                                                                         |
| `video_duration`                                    | For a video, its length in seconds                                                                                                                                                       |
| `audio_url`                                         | For a video with sound, its sound as a separate audio file                                                                                                                               |
| `has_audio`                                         | For a video, whether it has sound                                                                                                                                                        |
| `width`, `height`                                   | The size the post's image or video was uploaded at, in pixels                                                                                                                            |
| `alt_text`                                          | The image description Instagram gives the post                                                                                                                                           |
| `carousel_media_count`                              | How many slides a carousel has                                                                                                                                                           |
| `carousel_media`                                    | Each slide: `media_id`, `media_type`, `image_url`, `image_width`, `image_height`, `video_url`, `video_duration`, `audio_url`, `has_audio`, `width`, `height`, `alt_text`, `tagged_users` |
| `tagged_users`                                      | The accounts tagged in the image: `username`, `full_name`, `id`, `is_verified`, `profile_pic_url`, and where (`x`, `y`)                                                                  |
| `coauthors`                                         | The post's collaborators: `username`, `full_name`, `id`, `is_verified`, `profile_pic_url`                                                                                                |
| `location_name`, `location_id`                      | The place tagged on the post                                                                                                                                                             |
| `location_lat`, `location_lng`                      | That place's coordinates                                                                                                                                                                 |
| `audio_id`, `audio_title`, `audio_artist_username`  | A reel's original sound                                                                                                                                                                  |
| `audio_artist_id`                                   | Instagram's id for the account whose sound it is                                                                                                                                         |
| `audio_is_explicit`, `audio_is_trending`            | Instagram's flags on that sound                                                                                                                                                          |
| `audio_is_muted`, `audio_muted_reason`              | For a reel, whether Instagram mutes its sound, and the reason it gives                                                                                                                   |
| `uses_original_audio`                               | For a reel, `true` when its sound is its own, `false` when it is set to a song from Instagram's music library                                                                            |
| `related_topics`                                    | The related topics Instagram shows under the post                                                                                                                                        |
| `first_comments`                                    | The comments Instagram shows first under the post, each with its text or GIF, date, likes and author                                                                                     |
| `author_username`, `author_full_name`               | The author's username and display name                                                                                                                                                   |
| `author_id`                                         | Instagram's id for the author                                                                                                                                                            |
| `author_graph_id`                                   | Instagram's other id for the author (the one its Graph API uses)                                                                                                                         |
| `author_is_verified`                                | `true` when the author has the verified badge                                                                                                                                            |
| `author_profile_pic_url`                            | The author's profile picture                                                                                                                                                             |
| `profile_username`, `profile_id`                    | The profile this post was read from (the author, unless it is a collaboration)                                                                                                           |
| `profile_graph_id`                                  | Instagram's other id for that profile                                                                                                                                                    |
| `profile_full_name`, `profile_biography`            | That profile's name and bio                                                                                                                                                              |
| `profile_bio_links`                                 | The links on the profile: `url`, `title` and `type` for each                                                                                                                             |
| `profile_follower_count`, `profile_following_count` | The profile's followers and following when it was read                                                                                                                                   |
| `profile_post_count`                                | The post count the profile shows; `null` when Instagram shows it rounded or not in English                                                                                               |
| `profile_is_verified`                               | `true` when the profile has the verified badge                                                                                                                                           |
| `profile_is_memorialized`                           | `true` for a memorialized account                                                                                                                                                        |
| `profile_latest_story_at`                           | When the profile last posted a story, if it has one up                                                                                                                                   |
| `profile_pic_url`                                   | The profile's picture                                                                                                                                                                    |
| `profile_threads_badge`                             | The profile's Threads username, when it shows one                                                                                                                                        |
| `profile_highlights`                                | The profile's story highlights: `id`, `title` and `cover_url`                                                                                                                            |
| `source_url`                                        | The profile link this post was read from                                                                                                                                                 |

Not included: view and play counts, whether a post is pinned, the rest of a
post's comments, stories, and the contents of highlights.

### How much does it cost?

No surcharges and no paid options; an item that fails is not charged.

You pay for what you get:

- **$2 per 1,000 posts** ($0.002 a post). Each post is charged once per run.
- No start fee, and nothing per profile.

So 100 posts from each of 5 profiles cost $1. If you set a maximum cost for a run, the Actor stops when it reaches it and keeps every post saved so far.

### How long does a run take?

About 30 posts a minute: 80 posts from two profiles took under 3 minutes.

### Good to know

- **Pinned posts come first.** A profile's pinned posts open its grid
  whatever their date. With **Only posts newer than** set, an older pinned
  post is left out.
- **Collaborations are on the grid.** A post another account made together
  with the profile is part of the profile's grid, so it is a row: its
  `author_username` is that account, and `profile_username` is the profile
  you asked for.
- **Hidden likes are not a count.** When an author hides a post's likes,
  `like_count` is `null` and `like_counts_hidden` is `true`.
- **Check your input first.** A link that is not an Instagram profile stops
  the run before anything is read, and the message names it.
- **One profile that cannot be read does not stop the run.** A profile that
  does not exist ends with a message, the others carry on, and the run's
  status lists the profiles that could not be read. Such a profile is tried a
  few times before it is given up, which can add a minute or two to the run.
  A private profile shows no posts and ends with none.
- **Some posts are skipped.** A post Instagram shows only to signed-in
  visitors, and a post deleted while the run reads the profile, give no row.
- **Counts move.** Likes, comments and followers are the numbers at the
  moment the post was read.

### More Actors from us

- [AliExpress Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/aliexpress-products-scraper): Every product of an AliExpress search to its last page, with exact sold counts and ratings.
- [Amazon Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/amazon-products-scraper): Every product on Amazon's search pages to the last page, sponsored marked, with monthly sales.
- [App Store Reviews Scraper: All Reviews, Not 500](https://apify.com/luzivanlt/app-store-reviews-scraper): Every written App Store review of an app, not just the newest 500.
- [Facebook Ads Library Scraper: Meta Ads by Keyword or Page](https://apify.com/luzivanlt/facebook-ads-library-scraper): Meta Ad Library ads by keyword, Page or Ad Library link, with text, images, videos and dates.
- [Facebook Comments Scraper: With Replies](https://apify.com/luzivanlt/facebook-comments-scraper): Comments and replies from public Facebook posts, reels and videos, with reactions by type.
- [Facebook Pages Scraper: Contacts, Followers & Ratings](https://apify.com/luzivanlt/facebook-pages-scraper): Facebook Page details from links: exact follower count, phone, email, address, websites.

### Use it from an AI agent or the API

One call starts a run and returns its items (Apify waits up to 300 seconds; for a
longer run, start it with `POST /v2/acts/…/runs` and read its dataset):

```text
POST https://api.apify.com/v2/acts/luzivanlt~instagram-posts-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
```

With the sample input as its JSON body:

```json
{
  "startUrls": ["https://www.instagram.com/nasa/"],
  "maxPostsPerProfile": 20
}
```

Its inputs, in the order of the input form:

| Input                                        | What it takes                                                                                                                                                                                      | Default |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `startUrls` (Profile links or usernames)     | Public Instagram profiles to read: links such as https://www.instagram.com/nasa/ (instagram.com/nasa, m.instagram.com and a profile's /reels/ tab work too), or just the username (nasa or @nasa). | —       |
| `onlyPostsNewerThan` (Only posts newer than) | Keep only posts from this date on: a date (YYYY-MM-DD, UTC) or a period such as "7 days", "2 weeks", "3 months" or "1 year".                                                                       | —       |
| `maxPostsPerProfile` (Max posts per profile) | Stop reading a profile after this many posts.                                                                                                                                                      | `50`    |

Apify's MCP server, `https://mcp.apify.com`, lists it as `luzivanlt/instagram-posts-scraper`. To give an
AI agent this Actor as a tool, add the server to the agent's MCP config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=luzivanlt/instagram-posts-scraper"
    }
  }
}
```

The client signs in with OAuth, or add `"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }`.

Charged per post delivered; the sample input above costs at most $0.04.

### FAQ

**Do I need an Instagram account?**
No. The Actor reads what anyone can see on a public Instagram profile.

**Can it read private profiles?**
No, only public ones.

**Can I search Instagram by hashtag or place?**
Not yet: this Actor reads profiles.

**Can I run it from my own code, on a schedule, or with other apps?**
Yes. Like any Apify Actor, you can start it through the Apify API, run it on a
schedule, and connect it to other apps with Apify's integrations and webhooks.

### Is it legal to scrape Instagram?

This Actor reads only public posts that anyone can see. Posts, comments and
profiles hold personal data, such as names, ids and pictures: check Meta's
terms and the laws that apply to you (such as the GDPR) before you use the
data. If you are unsure, ask a lawyer.

### Support

Found a problem or missing a feature? Open an issue on the **Issues** tab and
include the run's link.

***

This Actor is not affiliated with, endorsed by or sponsored by Instagram or
Meta.

# Changelog

This Actor's version history is a separate document: https://apify.com/luzivanlt/instagram-posts-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

Public Instagram profiles to read: links such as https://www.instagram.com/nasa/ (instagram.com/nasa, m.instagram.com and a profile's /reels/ tab work too), or just the username (nasa or @nasa). Each profile gives you its posts, newest first. A single post, reel, hashtag or place link is not supported. Example: https://www.instagram.com/nasa/

## `onlyPostsNewerThan` (type: `string`):

Keep only posts from this date on: a date (YYYY-MM-DD, UTC) or a period such as "7 days", "2 weeks", "3 months" or "1 year". Leave empty for the whole history. A date in the future is refused, and an older pinned post is left out. Example: 30 days

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

Stop reading a profile after this many posts. From 1 to 10,000; 50 if left empty. You pay $0.002 a post saved, so this caps each profile's cost: 50 posts cost at most $0.10.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.instagram.com/nasa/"
  ],
  "maxPostsPerProfile": 20
}
```

# Actor output Schema

## `posts` (type: `string`):

Every post the run saved, one row per post.

## `allFields` (type: `string`):

The same rows with every field.

# 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 = {
    "startUrls": [
        "https://www.instagram.com/nasa/"
    ],
    "maxPostsPerProfile": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("luzivanlt/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 = {
    "startUrls": ["https://www.instagram.com/nasa/"],
    "maxPostsPerProfile": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("luzivanlt/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 '{
  "startUrls": [
    "https://www.instagram.com/nasa/"
  ],
  "maxPostsPerProfile": 20
}' |
apify call luzivanlt/instagram-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,luzivanlt/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/P5X9LmGNGjX8hjuRm/builds/iXB7DF7iksbxCy0qN/openapi.json
