# Instagram Post Scraper (`hello.datawizards/instagram-post-scraper`) Actor

Scrape public Instagram posts by username. Get captions, likes, comments, media URLs, timestamps, and more. Perfect for research, trend analysis, and media monitoring. Fast, reliable, and proxy-supported with structured JSON output.

- **URL**: https://apify.com/hello.datawizards/instagram-post-scraper.md
- **Developed by:** [datawizards](https://apify.com/hello.datawizards) (community)
- **Categories:** Social media
- **Stats:** 40 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 1.14 out of 5 stars

## Pricing

from $1.00 / 1,000 results

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 Post Scraper

Scrape Instagram posts by username — extract likes, captions, media URLs, timestamps, and more!

### 🌐 About Instagram

**Website:** <https://www.instagram.com>

Instagram is one of the world’s leading social media platforms, where users post photos, videos, and stories, interact via comments and likes, and follow accounts of interest — including celebrities, brands, and influencers.

***

### 🔍 What This Actor Does

The **Instagram Post Scraper** lets you scrape public posts from any Instagram profile by simply providing the username. This actor helps you:

- Retrieve up-to-date post data
- Get likes, comments, captions, and image URLs
- Download high-resolution images
- Analyze user behavior and trends

✅ Perfect for media monitoring, influencer research, competitive analysis, and social listening.

***

### 📦 Extracted Data Fields

Each post includes:

- `Url`: Direct link to the Instagram post
- `comments`: Number of comments
- `Caption`: Post caption
- `Image_urls`: List of all available image resolutions
- `likes`: Number of likes
- `accessibility_caption`: Alt-text or image description (if any)
- `is_video`: Boolean (whether the post is a video)
- `video_url`: Direct URL to the video (if any)
- `video_view_count`: Number of views (for video posts)
- `dimensions`: Height and width of media
- `coauthor_producers`: Tagged co-authors or contributors
- `taken_at_timestamp`: Post creation time (UNIX format)
- `owner`:
  - `id`: Internal user ID
  - `username`: Instagram handle of the post creator

***

### ⚙️ Input Parameters

| Field                | Type      | Description                                         |
|----------------------|-----------|-----------------------------------------------------|
| `proxyConfiguration` | `object`  | Use Apify residential proxy for stable access       |
| `Instragram_id`      | `string`  | Instagram handle of the user (e.g., `"neymarjr"`)   |
| `item_limit`         | `integer` | Number of posts to scrape (max depends on profile)  |

#### 💡 Example Input

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "Instragram_id": "neymarjr",
  "item_limit": 10
}
```

***

### ✅ Example Output

```json
{
  "Url": "https://www.instagram.com/DImjiBiAhgw",
  "comments": 25361,
  "Caption": "Every game is a chance to grow. Together, @alnassr!",
  "Image_urls": [
    "https://instagram...640x640.jpg",
    "https://instagram...750x750.jpg",
    "https://instagram...1080x1080.jpg"
  ],
  "likes": 6537719,
  "accessibility_caption": null,
  "is_video": false,
  "video_url": null,
  "video_view_count": 0,
  "dimensions": {
    "height": 1349,
    "width": 1080
  },
  "coauthor_producers": [],
  "taken_at_timestamp": 1745010448,
  "owner": {
    "id": "173560420",
    "username": "cristiano"
  }
}
```

***

### 💬 Notes

- Instagram data is dynamically rendered; scraping is powered by headless browser automation.
- We strongly recommend using **residential proxies** to prevent blocks.
- Login is not required for public profiles.
- If you receive empty results or encounter issues, please open an issue in the Apify Console.
- We are actively improving this actor, so your feedback is appreciated!

***

### 📣 Feedback & Support

Have questions, suggestions, or bugs to report?\
Go to the **Issues** tab of this actor in the Apify Console and let us know!

***

🚀 Thank You for Using **Instagram Post Scraper**!

# Actor input Schema

## `Instragram_id` (type: `string`):

Instagram Id is required

## `item_limit` (type: `integer`):

Maximum number of posts to scrape

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

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "Instragram_id": "sunny",
  "item_limit": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "Instragram_id": "sunny",
    "item_limit": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("hello.datawizards/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 = {
    "Instragram_id": "sunny",
    "item_limit": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("hello.datawizards/instagram-post-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 '{
  "Instragram_id": "sunny",
  "item_limit": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call hello.datawizards/instagram-post-scraper --silent --output-dataset

```

## MCP server setup

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