# Instagram Posts & Reels Scraper: Views, Likes, Video URL (`data-for-agents/instagram-posts-reels-scraper`) Actor

Instagram posts and reels by username, post or place link, no login. Up to 500 per account. One row per post: plays, views, likes, comments, caption, date, video URL, image URL, followers, bio. Optional comments, tagged users, profile pictures. $1.60 per 1,000 posts, no start fee.

- **URL**: https://apify.com/data-for-agents/instagram-posts-reels-scraper.md
- **Developed by:** [Data for Agents](https://apify.com/data-for-agents) (community)
- **Features:** Limited permissions
- **Stats:** 7 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 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.

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 & Reels Scraper: Views, Likes, Video URL

Give Instagram usernames or post links. Get one row per post or reel with plays, views, likes, comments,
caption, date, video and image URLs, a pinned flag and the account's follower count. No login, no cookies.
Failures are free rows that say what went wrong.

### Price

**$1.60 per 1,000 posts**, no start fee. Error rows are free. Add-ons, only when switched on: post details
(`includePostDetails`) $0.50 per 1,000 posts, profile pictures (`downloadProfilePictures`) $0.50 per 1,000 pictures.

### Input

```json
{ "username": ["natgeo", "https://www.instagram.com/reel/DfAWxdIFmVB/"], "resultsLimit": 12, "skipPinnedPosts": true, "onlyPostsNewerThan": "7 days" }
```

- `username`: usernames (`natgeo`, `@natgeo`, a profile link), post and reel links, or place links
  (`https://www.instagram.com/explore/locations/212988663/new-york-new-york/`), up to 500.

- `resultsLimit`: newest posts per username (default 12, up to 500).

- `onlyPostsNewerThan`: `2026-11-01`, an ISO time, or `7 days` / `2 weeks` / `1 month`.

- `skipPinnedPosts`: leave out pinned posts.

- `maxRunSeconds`: finish within this many seconds and end the run as succeeded; an account that has not answered gets a free `run_timeout` row (15 for a quick check, 45 for a full scan).

- `downloadProfilePictures`: save each account's profile picture (150 x 150) once and add a lasting link,
  `ownerProfilePicStoredUrl`. Off by default; every row has `ownerProfilePicUrl` (Instagram's link, expires).
  The stored link is in your run's key-value store: open it with your Apify token
  (`?token=...` or an `Authorization: Bearer` header).

- `includePostDetails`: also read each post's page for tagged users, collaborators, location and the latest comments
  (about a dozen per post: author, text, time, likes, reply count). Off by default; an add-on per post.

What every row of a profile also carries: bio, website links, followers, following, verified badge, profile picture.
Place links add the place's category, post count, address, city, phone and coordinates.

### Output (one post)

```json
{
  "status": "ok", "error_code": null, "error": null, "inputUrl": "natgeo",
  "id": "4017311023166285121", "shortCode": "DfAWxdIFmVB", "type": "Video", "productType": "clips",
  "url": "https://www.instagram.com/reel/DfAWxdIFmVB/", "ownerUsername": "natgeo", "ownerFollowersCount": 268110466,
  "caption": "…", "hashtags": [], "mentions": [], "timestamp": "2026-10-27T17:06:54.000Z",
  "videoPlayCount": 1178728, "videoViewCount": 598085, "likesCount": 46840, "commentsCount": 281,
  "videoUrl": "https://scontent…mp4", "displayUrl": "https://scontent…jpg", "videoDuration": 68.33, "isPinned": true,
  "ownerProfilePicUrl": "https://scontent…jpg", "ownerProfilePicStoredUrl": null
}
```

- `videoPlayCount` is the play count Instagram shows on the Reels tab; `videoViewCount` is the older view count.
- `timestamp` is read from the media id: the time the post was created, within about an hour of the time shown.
- Video and image links are signed by Instagram and expire after a day or a few days. Download them soon.

### Limits

- Up to 500 posts per username: older posts and reels are paged in as needed.
- Only public accounts and posts. Private accounts give a free `access_restricted` row. So do profiles Instagram shows to logged-in users only (for example an age limit): the row quotes Instagram's own notice.
- Not available without a login, so not offered: hashtag pages, a profile's Tagged tab, search, comment replies
  (each comment carries its reply count), more than the first page of comments.

### Errors (all free)

| error_code | Meaning | Retry helps |
|---|---|---|
| `missing_input`, `invalid_input` | No usable username or link | Fix the input |
| `not_found` | No such account or post | No |
| `access_restricted` | Private account or post, or a profile Instagram shows to logged-in users only (the row quotes Instagram's notice) | No |
| `no_data` | No public posts, or none after your filters | No |
| `blocked`, `rate_limited` | Instagram refused the request | Yes, later |
| `timeout`, `network_error`, `proxy_error` | The request did not get through | Yes |
| `site_changed` | Instagram changed its page | No, the Actor needs an update |
| `partial_result` | A post row with some fields missing (said in `error`) | Sometimes |
| `cost_limit` | Your maximum charge is reached | Raise it |
| `run_timeout` | The run stopped before its time limit | Give it more time |
| `internal_error` | A bug in this Actor | Maybe |

The run's `OUTPUT` record holds `status` (`ok`, `partial`, `failed`), the post count and the error counts.

### Is it legal?

It reads only what Instagram shows to anyone who is not logged in. Posts can hold personal data:
you are responsible for having a lawful reason to process it, and for following Instagram's terms.

# Changelog

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

# Actor input Schema

## `username` (type: `array`):

Instagram usernames (natgeo, @natgeo or a profile link), post and reel links (https://www.instagram.com/reel/DfAWxdIFmVB/), or place links (https://www.instagram.com/explore/locations/212988663/new-york-new-york/). Up to 500. A username gives its newest posts, a link that post, a place its top posts.

## `resultsLimit` (type: `integer`):

How many of the newest posts and reels to return per username (default 12, up to 500). Older posts are paged in as needed.

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

Return only posts after this date: a date like 2026-11-01, a time like 2026-11-01T12:00:00Z, or a span like '7 days', '2 weeks', '1 month'. Empty: no date filter.

## `skipPinnedPosts` (type: `boolean`):

Leave out posts pinned to the top of the profile or the Reels tab (usually old posts).

## `downloadProfilePictures` (type: `boolean`):

Save each account's profile picture (150 x 150, the size Instagram shows logged out) to the run's storage once and add a lasting link, ownerProfilePicStoredUrl. Off: rows still carry ownerProfilePicUrl, Instagram's link, which expires in a few days.

## `includePostDetails` (type: `boolean`):

Also read each post's own page: tagged users, collaborators, location and the latest comments (about a dozen, with author, time, likes and reply count). Add-on charged per post; slower.

## `maxRunSeconds` (type: `integer`):

Finish within this many seconds and end the run as succeeded with what was read. An account that has not answered by then gets one free run_timeout row instead of holding the run. Example: 15 for a quick check, 45 for a full scan. Empty: no limit, each account gets up to 3 minutes. Use this instead of aborting the run.

## Actor input object example

```json
{
  "username": [
    "natgeo"
  ],
  "resultsLimit": 6,
  "skipPinnedPosts": false,
  "downloadProfilePictures": false,
  "includePostDetails": false
}
```

# Actor output Schema

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

Every row: posts (status ok) and free notes (status error).

## `summary` (type: `string`):

status (ok, partial, failed), posts returned, error rows by error_code.

# 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 = {
    "username": [
        "natgeo"
    ],
    "resultsLimit": 6
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-for-agents/instagram-posts-reels-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 = {
    "username": ["natgeo"],
    "resultsLimit": 6,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-for-agents/instagram-posts-reels-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/OywMwr2X5ROkcoEAR/builds/kIfhhai6uaeMqrRuD/openapi.json
