# Instagram Post Scraper (`herus13/instagram-post-scraper`) Actor

Scrape Instagram posts anonymously — by username (the profile's recent posts) or by direct post/reel URL. Returns shortcode, permalink, type, caption, likes, comments, timestamp, media URLs, and owner. No login required.

- **URL**: https://apify.com/herus13/instagram-post-scraper.md
- **Developed by:** [bootforge](https://apify.com/herus13) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 post scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Instagram Post Scraper — By Username or Post URL, No Login

The Instagram Post Scraper is an [Apify](https://apify.com) actor that extracts **public** Instagram post data — no login, no account, no cookies. Give it a username (returns the profile's recent posts) or a direct post / reel URL (returns that single post), and get one structured record per post: shortcode, permalink, type, caption, likes, comments, timestamp, thumbnail / display / video URLs, and the owner.

Use it to build a content dataset, track a competitor's posting cadence, feed engagement models, or archive reels — exported to JSON, CSV, or Excel.

### Table of contents

- [What the Instagram post scraper does](#what-the-instagram-post-scraper-does)
- [Use cases](#use-cases)
- [How to scrape Instagram posts](#how-to-scrape-instagram-posts)
- [Instagram post scraper input](#instagram-post-scraper-input)
- [Instagram post data output](#instagram-post-data-output)
- [How much it costs](#how-much-it-costs)
- [Recommended proxies for Instagram](#recommended-proxies-for-instagram)
- [Why this Instagram post scraper](#why-this-instagram-post-scraper)
- [FAQ](#faq)
- [Rate this actor](#rate-this-actor-)
- [Related actors](#related-actors)

### What the Instagram post scraper does

- 🕵️ **Anonymous, no login** — HTTP-only extraction; no Instagram account, password, or session cookie.
- 👤 **By username** — pass a handle to collect the profile's recent posts (best-effort cap via `max_posts`).
- 🔗 **By post / reel URL** — pass a direct `instagram.com/p/…` or `/reel/…` URL to scrape that single post.
- 📝 **Full post fields** — caption, likes, comments, timestamp, post type, and media URLs (thumbnail, display, video).
- 🖼️ **Media links** — direct display and video URLs for images and reels, ready to download or embed.
- 💵 **Pay per post** — $0.002 per post delivered, nothing else.

### Use cases

**Content datasets and archives** — One structured record per post — shortcode, permalink, type, caption, likes, comments, timestamp, and thumbnail/display/video URLs — makes a durable archive of an account's output, including reels that are otherwise awkward to keep.

**Posting-cadence and competitor tracking** — Timestamps across a profile's recent posts show how often a competitor publishes and at what times, and the engagement counts show which of those choices actually worked.

**Engagement modelling** — Likes and comments alongside post type and caption give the feature set for a model of what performs on an account, built from that account's own history rather than generic benchmarks.

**Influencer vetting** — Pull a creator's recent posts before a partnership and check whether engagement is consistent with follower count, and whether their actual content matches the media kit. No login, account, or cookies required.

### How to scrape Instagram posts

1. Click **Try for free** and open the actor.
2. Add one or more `targets` — usernames (e.g. `nike`) or direct post/reel URLs.
3. Optional: set `max_posts` to cap posts per username (ignored for direct post URLs).
4. Leave **Proxy provider** on **Default** — a residential proxy is included.
5. Click **Start** and watch results stream into the dataset.
6. Export as **JSON, CSV, or Excel**, or pull from the [Apify API](https://docs.apify.com/api/v2).

```json
{
  "targets": ["nike", "https://www.instagram.com/p/Dbdo4gTupuE/"],
  "max_posts": 12,
  "proxyProvider": "default"
}
```

### Instagram post scraper input

| Field | Description |
|---|---|
| `targets` | Usernames (returns the profile's recent posts) or direct post/reel URLs (returns that single post). Examples: `nike`, `https://instagram.com/p/ABC123/`. |
| `max_posts` | Best-effort cap on posts returned per username. Default `12`, min `1`, max `500`. Ignored for direct post URLs (always one post). |
| `proxyProvider` | `default` (residential proxy **included**), `dataimpulse`, `apify`, `custom` (uses `proxyUrls`), or `disabled`. |
| `proxyUrls` | Your own gateway URLs, one per entry. Only read when `proxyProvider` is `custom`. |
| `proxy` | Apify Proxy group + country, read when `proxyProvider` is `apify`. Its country also sets the exit country for the built-in providers. |

### Instagram post data output

Each post is one dataset row. Sample:

```json
{
  "owner_username": "nike",
  "owner_full_name": "Nike",
  "post": {
    "shortcode": "Dbdo4gTupuE",
    "url": "https://www.instagram.com/p/Dbdo4gTupuE/",
    "typename": "GraphVideo",
    "is_video": true,
    "caption": "The game looks different from here.",
    "likes": 175374,
    "comments": 1148,
    "taken_at": "2026-07-31T16:00:05+00:00",
    "thumbnail_url": "https://instagram.fbaq6-1.fna.fbcdn.net/v/...",
    "display_url": "https://instagram.fbaq6-1.fna.fbcdn.net/v/...",
    "video_url": "https://instagram.fbaq6-1.fna.fbcdn.net/o1/v/..."
  },
  "source": "timeline",
  "scraped_at": "2026-06-19T08:30:00+00:00",
  "error": null
}
```

The dataset's table view flattens this to one flat row per post (CSV-friendly).

| Field | Description |
|---|---|
| `owner_username`, `owner_full_name` | The post owner's handle and display name. |
| `post.shortcode` | Instagram shortcode (stable post ID). |
| `post.url` | Canonical permalink. |
| `post.typename` | Post type (image, sidecar/carousel, or video/reel). |
| `post.is_video` | `true` for reels/videos. |
| `post.caption` | Post caption text. |
| `post.likes`, `post.comments` | Engagement counts. |
| `post.taken_at` | Publish timestamp (ISO 8601). |
| `post.thumbnail_url`, `post.display_url`, `post.video_url` | Media URLs (`video_url` populated only for videos/reels). |
| `source` | `timeline` (from a username) or `embed` (from a direct post URL). |
| `scraped_at` | When the row was captured. |
| `error` | Set if a target failed; the row is not charged. |

### How much it costs

This actor uses **pay-per-event** pricing — you pay for what you scrape, not for time.

| Event | USD |
|---|---|
| Actor start (per GB memory) | $0.005 |
| Post scraped | $0.002 |

At the default 1 GB memory, actor start is ~$0.005 per run.

| Typical run (default 1 GB) | Cost |
|---|---|
| 1 post via direct URL | ~$0.007 |
| 100 posts (e.g. ~8 usernames × 12) | ~$0.21 |
| 1,000 posts | ~$2.01 |

You only pay for posts actually delivered. Targets that error (not-found, blocked) are **not** charged.

### Recommended proxies for Instagram

A residential proxy is **included** — leave **Proxy provider** on **Default**. Pick **Custom** and paste your own gateway URLs.

👉 **[Get DataImpulse residential proxies](https://dataimpulse.com/?aff=404588\&utm_source=apify)** (referral link)

### Why this Instagram post scraper

- **No login, no cookies** — anonymous HTTP extraction; no risk to an Instagram account.
- **Two ways in** — scrape a profile's recent posts by username, or a specific post/reel by URL, in one input list.
- **Fast and cheap** — HTTP-only (no browser), billed per post delivered.
- **Validated output** — every row is a Pydantic-validated record with a stable field set, safe for spreadsheets and pipelines.
- **Open source** — the underlying `instagram-scraper` Python package ships a Typer CLI and a FastAPI server; the Apify wrapper is a thin layer.

### FAQ

**Do I need an Instagram account or login?** No. The actor extracts only publicly visible post data anonymously over HTTP — no account, password, or session cookie. It cannot access private accounts or private content.

**Do I need a proxy?** No — a residential proxy is included by default. To use your own, pick **Custom**; we use [DataImpulse](https://dataimpulse.com/?aff=404588\&utm_source=apify) (referral link).

**Can I scrape a specific post or reel?** Yes. Put the direct post or reel URL (e.g. `https://instagram.com/p/ABC123/`) in `targets` and the actor returns that single post. `max_posts` is ignored for direct URLs.

**How many posts can I get per username?** Set `max_posts` up to 500. Pagination is best-effort under anonymous access, so very large back-catalogs may return fewer than requested.

**Am I charged for posts that fail?** No. Targets that error — not-found or blocked — are never charged. You only pay for posts actually delivered.

**Is scraping Instagram legal?** This actor collects only publicly available post data. You are responsible for complying with Instagram's terms and applicable laws. Do not collect personal data without a lawful basis.

### Rate this actor ⭐

If the Instagram Post Scraper saved you time, please **leave a review on its Apify Store page** — ratings help other people find it and tell us what to build next. Hit a bug or missing field? Open an issue through the actor's **Issues** tab and we'll fix it fast — recency and reliability are what keep this actor ranking.

### Related actors

Building a broader social pipeline? These actors use the same proxy config format and Pydantic-validated output — all open source.

- **[Instagram Profile Scraper](https://apify.com/herus13/instagram-profile-scraper)** — scrape public Instagram profiles: bio, follower/following counts, verified/business flags, and recent posts. No login.
- **[TikTok Profile Scraper](https://apify.com/herus13/tiktok-profile-scraper)** — scrape public TikTok profiles by handle: stats, bio, and metadata.

# Actor input Schema

## `targets` (type: `array`):

<p>Usernames (returns the profile's recent posts) or direct post/reel URLs (returns that single post). Examples: <code>nike</code>, <code>https://instagram.com/p/ABC123/</code>.</p>
## `max_posts` (type: `integer`):

<p>Best-effort cap on posts returned per username input. Ignored for direct post URLs (always one post).</p>
## `proxyProvider` (type: `string`):

<b>Default</b> routes the run through DataImpulse residential IPs (falling back to Apify Proxy) and is <b>included in the price of the run</b> — leave it alone unless you have a reason. <b>Custom</b> uses the proxy URLs you enter below; <b>Apify Proxy</b> uses the proxy configuration below; <b>No proxy</b> is refused on this actor, because the site blocks direct connections. Leave this empty to keep the behaviour this actor already had.

## `proxyUrls` (type: `array`):

Only read when <b>Proxy provider</b> is <b>Custom</b>. One gateway URL per entry, e.g. <code>http://user:pass@host:port</code> — works with any provider that issues URLs (BrightData, Oxylabs, SmartProxy, your own). Leave empty for any other Proxy provider.

## `proxy` (type: `object`):

<p>Read when <b>Proxy provider</b> is <b>Apify Proxy</b> (group + country). Its country also sets the exit country for the built-in providers.</p>

## Actor input object example

```json
{
  "targets": [
    "https://www.instagram.com/p/Dbdo4gTupuE/"
  ],
  "max_posts": 12,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Instagram posts with caption, likes, comments, media URLs, and owner

# 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 = {
    "targets": [
        "https://www.instagram.com/p/Dbdo4gTupuE/"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("herus13/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 = {
    "targets": ["https://www.instagram.com/p/Dbdo4gTupuE/"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("herus13/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 '{
  "targets": [
    "https://www.instagram.com/p/Dbdo4gTupuE/"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call herus13/instagram-post-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GBgFH6maVkRv3IpiP/builds/4mQ41IJeXT0ppGM6w/openapi.json
