# Instagram Posts Scraper - Captions, Likes & Media (`benthepythondev/instagram-posts-scraper`) Actor

Scrape the posts of any public Instagram account without login: caption, date, likes, comments, hashtags, mentions, tagged users, location, pictures and video links. Date window included.

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

## Pricing

from $1.20 / 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 - Captions, Likes & Media

Export the posts of any public Instagram account, newest first: caption, date, likes, comment count, hashtags, mentions, tagged users, collaborators, location, pictures, carousel slides and video links. A date window keeps a daily run small. No login, no cookies, no API key. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 🔎 What is the Instagram Posts Scraper?

It is an Apify Actor that asks Instagram for the same data its own website loads for a visitor who is not logged in. It opens no browser. An account's posts arrive 33 at a time, each one complete.

In our tests 600 posts of National Geographic took 29 seconds, all 86 posts it published in September 2026 took 8 seconds, and 4,894 posts from three accounts took three minutes.

Posts and reels both appear, in the order of the account's grid. `record_type` is `post` or `reel`, and `media_type` is `image`, `video` or `carousel`.

#### What data does it extract?

- **Post:** `id`, `code`, `url`, `caption`, `posted_at`, `media_type`, `is_edited`, `is_pinned`, `is_paid_partnership`
- **Engagement:** `likes`, `comments`, `likes_hidden`
- **Author:** `username`, `full_name`, `author_id`, `is_verified`, `from_profile` (the account whose grid the post is on)
- **People and places:** `mentions[]`, `tagged_users[]`, `coauthors[]`, `location_name`, `location_id`
- **Content:** `hashtags[]`, `image_url`, `video_url`, `slide_urls[]`
- **Audio (reels):** `music_title`, `music_artist`

### ⬇️ Input

| Field | Type | What it does |
|---|---|---|
| `usernames` | array | Usernames, @handles or profile links |
| `maxResults` | integer | Posts per account, newest first. 20 by default, up to 100,000 |
| `postedAfter` | string | Only posts from this UTC date on (YYYY-MM-DD). Reading stops at older posts |
| `postedBefore` | string | Only posts up to this UTC date |

#### Example input

Everything two accounts posted in September 2026:

```json
{
  "usernames": ["natgeo", "nasa"],
  "maxResults": 1000,
  "postedAfter": "2026-09-01",
  "postedBefore": "2026-09-30"
}
```

### ⬆️ Output

A real carousel post (media links shortened, two of twelve slide links shown):

```json
{
  "record_type": "post",
  "id": "3868552181066538345",
  "code": "DWv27ZTiJ1p",
  "url": "https://www.instagram.com/p/DWv27ZTiJ1p/",
  "username": "natgeo",
  "full_name": "National Geographic",
  "author_id": "787132",
  "is_verified": true,
  "caption": "There’s a tiny little friend for every bee-son 🐝\n\n#SecretsOfTheBees is now streaming on @DisneyPlus and @hulu",
  "posted_at": "2026-04-05T11:09:38+00:00",
  "likes": 31835,
  "comments": 108,
  "plays": null,
  "media_type": "carousel",
  "image_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/660238139_1864...",
  "video_url": null,
  "slide_urls": [
    "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/660238139_1864...",
    "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/660082933_1864..."
  ],
  "hashtags": [
    "SecretsOfTheBees"
  ],
  "mentions": [
    "DisneyPlus",
    "hulu"
  ],
  "tagged_users": [
    "natgeoanimals"
  ],
  "coauthors": [
    "natgeoanimals"
  ],
  "location_name": null,
  "location_id": null,
  "music_title": null,
  "music_artist": null,
  "alt_text": null,
  "is_edited": false,
  "likes_hidden": false,
  "is_pinned": false,
  "is_paid_partnership": false,
  "scraped_at": "2026-10-03T08:31:18.125509+00:00"
}
```

Media links are signed by Instagram and stop working after some hours, so download the files soon after the run if you need them.

### 💰 How much does it cost?

You pay per saved post, plus a tiny start fee per run.

| Apify plan | Price per 1,000 posts |
|---|---|
| Free | $1.50 |
| Starter | $1.40 |
| Scale | $1.30 |
| Business and above | $1.20 |

The default run (20 posts) costs 3 cents. Set **Maximum cost per run** in the run options and the Actor stops saving at that amount and says so in the status message.

### 💡 Use cases

- 📊 **Competitor and brand monitoring:** a daily run with `postedAfter` set to yesterday collects only the new posts of every account you watch.
- 🧪 **Content analysis:** compare likes and comments by format, hashtag, collaborator and posting time.
- 🤝 **Influencer vetting:** read real engagement on recent posts instead of trusting a follower count.
- 🧠 **Datasets for AI and research:** captions with dates, tags and alt text for classification, trend studies or RAG.

### ❓ FAQ

**Do I need an Instagram account or cookies?** No. The Actor never logs in.

**How far back does it go?** As far as `maxResults` allows. The grid is read page by page from the newest post.

**How fast is it?** About 20 posts per second: 600 posts in 29 seconds in our test. On long exports Instagram limits how much one address may read; the Actor then continues through another address without starting over.

**Does `maxResults` count per account or per run?** Per account. Three usernames with `maxResults: 100` can save up to 300 rows. To cap the whole run, set **Maximum cost per run**.

**What about pinned posts?** They come first, whatever their age, with `is_pinned: true`. The date window still applies to them.

**Why does a row show another username?** It is a collaboration post. It sits on the grid of the account you asked for, which is in `from_profile` and `coauthors`, while `username` is the account that published it.

**Why is `plays` empty?** Play counts are shown on the reels tab only. The [Instagram Reels Scraper](https://apify.com/benthepythondev/instagram-reels-scraper) returns them.

**What happens with private or missing accounts?** They are skipped and listed in the status message and the `SUMMARY` record. The run still succeeds with everything else. Instagram also hides a few public accounts from visitors who are not logged in; those are reported the same way.

**Can I get the comments?** Pass the post links to the [Instagram Comments Scraper](https://apify.com/benthepythondev/instagram-comments-scraper).

**Is it legal to scrape Instagram posts?** The Actor reads only what Instagram shows publicly to any visitor and does not log in. Posts contain personal data, so GDPR, CCPA and similar rules apply to how you store and use them, and Meta's terms apply to you as well. If in doubt, ask a lawyer.

**Something is missing or broken?** Open an issue on the Actor's Issues tab with the run ID. Issues are answered within one business day.

### 🔗 You might also like

- [Instagram Reels Scraper](https://apify.com/benthepythondev/instagram-reels-scraper)
- [Instagram Profile Scraper](https://apify.com/benthepythondev/instagram-profile-scraper)
- [Instagram Comments Scraper](https://apify.com/benthepythondev/instagram-comments-scraper)
- [Instagram Post Scraper by URL](https://apify.com/benthepythondev/instagram-post-details-scraper)
- [Threads User Posts Scraper](https://apify.com/benthepythondev/threads-user-posts-scraper)

**Keywords:** instagram posts scraper, instagram post scraper, scrape instagram posts, instagram profile posts, instagram captions export, instagram likes and comments data, instagram hashtags from posts, instagram api alternative, instagram without login, instagram to csv, instagram competitor monitoring, instagram content analysis, instagram carousel scraper, instagram data export, instagram scraper no cookies

# Actor input Schema

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

Usernames, @handles or profile links, for example natgeo, @nasa or https://www.instagram.com/nike/.

## `maxResults` (type: `integer`):

Posts to save for each account, newest first. Raise it to go further back.

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

Only rows from this UTC date on (YYYY-MM-DD). Reading stops once older posts are reached.

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

Only rows up to this UTC date (YYYY-MM-DD).

## Actor input object example

```json
{
  "usernames": [
    "natgeo"
  ],
  "maxResults": 20
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        "natgeo"
    ]
};

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

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

```

## MCP server setup

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