# Instagram Posts & Engagement Scraper (`reventadata/instagram-scraper`) Actor

Fast scraper for Instagram posts, reels, engagement metrics, likes, comments, captions, and CDN media. Clean pay-per-event dataset.

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

## Pricing

from $1.50 / 1,000 instagram posts

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 Posts & Engagement Scraper

> **Unofficial.** This Actor is not affiliated with, authorised by, endorsed by, or in any
> way officially connected to Instagram or Meta Platforms. "Instagram" is a trademark of its
> owner and is used here only to describe what this tool reads. It reads the same public
> pages a browser does, logged out.

Instagram Posts & Engagement Scraper saves public Instagram posts as rows: caption, like and comment counts, image, author and date.

### What does it do?

Give it post or reel URLs, or usernames. For a username it reads the public profile page and takes the
newest posts it lists (12 per profile when we checked on 2026-10-22; older posts are not reached). For each
post it saves one row. It does not read comments, followers or private accounts.

### Why use it?

- **What Instagram shows publicly, as rows:** post author, caption, like and comment counts, image and timestamp.

### How to use it

1. Put post or reel URLs in `directUrls`, public usernames in `usernames`, or both.
2. Set `maxItems` to cap the number of posts saved.
3. Run the Actor and download results as JSON, CSV, Excel, or NDJSON from the dataset.

#### Input

| Field | Type | Description |
|---|---|---|
| `directUrls` | array | Instagram post or reel URLs, e.g. `https://www.instagram.com/p/Ddwoj5kBk9X/`. |
| `usernames` | array | Public usernames; the newest posts on each profile page are saved. |
| `maxItems` | integer | Maximum number of posts to save in the run. |
| `proxyConfiguration` | object | Apify proxy settings; Unblocker is the default. |

#### Sample Input

```json
{
    "usernames": ["natgeo"],
    "maxItems": 2
}
```

#### Output

One row per post:

| Field | Type | Description |
|---|---|---|
| `id` | string | Post shortcode. |
| `url` | string | Post URL. |
| `caption` | string / null | Full caption text. |
| `likesCount` | integer / null | Likes, as Instagram rounds it (e.g. 53K is `53000`). |
| `commentsCount` | integer / null | Comments, rounded the same way. |
| `imageUrl` | string / null | Preview image link (Instagram CDN links expire). |
| `author` | string / null | Account display name, e.g. `National Geographic`. |
| `timestamp` | string / null | Post date as Instagram writes it, e.g. `October 15, 2026`. |
| `scrapedAt` | string | ISO timestamp of when the row was read. |

#### Sample Output

A row from a run on 2026-10-22, image link shortened:

```json
{
    "id": "DehZj9wggt0",
    "url": "https://www.instagram.com/p/DehZj9wggt0/",
    "caption": "Keeping up with a pack of hunting wolves is just another day at the office for @bertiegregory and his team.\n\n#WolvesUpClose with Bertie Gregory premieres Friday, November 6 at 8/7c on National Geographic. Streaming on @DisneyPlus and @hulu.",
    "likesCount": 53000,
    "commentsCount": 397,
    "imageUrl": "https://scontent-lga3-1.cdninstagram.com/v/t51.82787-15/849098148_18708313780019133_730867734770692515_n.jpg?stp=cmp1_dst-jpg_e35_s640x640_tt6&...",
    "author": "National Geographic",
    "timestamp": "October 15, 2026",
    "scrapedAt": "2026-10-22T01:40:02.766252+00:00"
}
```

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

Pay-per-event: **$0.0015 per post** saved to the dataset (**$1.50 per 1,000 posts**), plus **$0.00005** charged once when the run starts. No subscription. Only rows saved to the dataset are charged.

### Privacy & Compliance

This Actor reads only publicly accessible pages and returns the public data they show. It sends no login.

# Actor input Schema

## `directUrls` (type: `array`):

List of direct Instagram post, reel, or profile URLs to scrape.

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

List of public Instagram usernames to scrape latest posts from.

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

Maximum number of items to return.

## `proxyConfiguration` (type: `object`):

Apify proxy settings. Unblocker or Residential proxy recommended.

## Actor input object example

```json
{
  "directUrls": [
    "https://www.instagram.com/p/Ddwoj5kBk9X/"
  ],
  "usernames": [
    "instagram"
  ],
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Items scraped from the target website.

# 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 = {
    "directUrls": [
        "https://www.instagram.com/p/Ddwoj5kBk9X/"
    ],
    "usernames": [
        "instagram"
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("reventadata/instagram-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 = {
    "directUrls": ["https://www.instagram.com/p/Ddwoj5kBk9X/"],
    "usernames": ["instagram"],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("reventadata/instagram-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 '{
  "directUrls": [
    "https://www.instagram.com/p/Ddwoj5kBk9X/"
  ],
  "usernames": [
    "instagram"
  ],
  "maxItems": 5
}' |
apify call reventadata/instagram-scraper --silent --output-dataset

```

## MCP server setup

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