# Instagram User Posts Scraper (`spider_studio/instagram-user-posts`) Actor

Collect paginated public Instagram posts for one or many usernames with normalized media metadata.

- **URL**: https://apify.com/spider\_studio/instagram-user-posts.md
- **Developed by:** [NewLai](https://apify.com/spider_studio) (community)
- **Categories:**
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

### What does Instagram User Posts Scraper API do?

Instagram User Posts Scraper API collects paginated public posts for one or more usernames on [Instagram](https://www.instagram.com/). Every successful Dataset item represents one post with its shortcode, creator, caption, engagement counters, preview, media type, and downloadable asset URLs. This focused **Instagram user feed API alternative** runs with Apify scheduling, API access, proxy rotation, retries, monitoring, and common data integrations.

No Instagram account, password, or authenticated session cookie is required. The Actor accesses public user feeds only.

The Actor produces post rows only. Profile metadata, keyword discovery, post-detail resolution, and binary downloads remain separate Actors so each service has one clear output type.

### Why scrape Instagram user posts?

- Monitor public content published by creators, brands, or competitors.
- Build post inventories before resolving full media details.
- Analyze captions, formats, and visible engagement over time.
- Send normalized rows to BigQuery, Google Sheets, webhooks, or custom APIs.
- Control cost with page and concurrency limits per run.

### How to scrape an Instagram user's posts

1. Add public `usernames` in the Actor's **Input** tab.
2. Set `maxPages`; start with one page for testing.
3. Keep the default GB residential proxy with automatic DE fallback and use moderate concurrency.
4. Click **Start**, then inspect or export the Dataset.

### Input

See the **Input** tab for all options. Usernames may include `@`. Duplicate usernames and overlapping posts returned by Instagram pagination are ignored. Each successful page normally contains about 12 posts, although Instagram controls the actual size. Authentication fields and Instagram session cookies are not part of the input.

Actor input example:

```json
{"usernames":["instagram","natgeo"],"maxPages":2,"includeRaw":false}
```

### Output

You can download the Dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{"success":true,"ownerUsername":"natgeo","page":1,"postCode":"ABC","postUrl":"https://www.instagram.com/p/ABC/","username":"natgeo","caption":"Example","isVideo":false,"assets":[{"position":1,"type":"image","url":"https://scontent.cdninstagram.com/file.jpg"}],"error":null}
```

### What Instagram post data is extracted?

| Field | Type | Description |
| --- | --- | --- |
| `ownerUsername`, `page` | string, integer | Requested feed and page. |
| `postCode`, `postUrl` | string | Stable public post identifiers. |
| `caption`, `username` | string | Public content and creator. |
| `isVideo`, `hasAudio` | boolean | Media flags. |
| `likeCount`, `commentCount` | integer | Visible engagement counters. |
| `assets` | array | Image or video URLs and dimensions. |

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

This Actor uses pay-per-event pricing with platform usage included. At the default 512 MB memory, the Actor start costs $0.002; higher user-selected memory can add start units at $0.002 per GB. Only successfully scraped posts are charged. Failure rows and upstream error reports are not charged.

| Apify discount tier | Price per post | Price per 1,000 posts |
| --- | ---: | ---: |
| Free | $0.0015 | $1.50 |
| Bronze | $0.0013 | $1.30 |
| Silver | $0.0011 | $1.10 |
| Gold, Platinum, Diamond | $0.0009 | $0.90 |

A request is made for each page, with bounded retries on transient failures. Start with `maxPages: 1`, measure output, and increase only when needed. Set a maximum charge per run in Apify when you need a hard spending limit.

### Tips and limitations

Residential proxies and conservative concurrency improve reliability. With the default proxy setting, the first attempt uses GB; after a failure the run switches to DE and keeps DE active. Failures are limited to two retries (three total attempts). A user-selected non-GB country or custom proxy URL is respected and does not trigger the automatic fallback. Private feeds cannot be accessed. The first page uses Instagram's public profile response; later pages use logged-out GraphQL pagination and may be more rate-limited. Instagram may change public response shapes or GraphQL document identifiers, so monitor failure rows after deployments. Raw output is useful for debugging but increases storage.

### Legal use, privacy, and support

The Actor accesses public content only. Public posts may contain personal or copyrighted material. Ensure a legitimate purpose, honor platform terms and rate limits, and comply with privacy and intellectual-property law. Use the **Issues** tab for support and the **API** tab for integration examples.

# Actor input Schema

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

Public usernames whose posts should be collected.

## `maxPages` (type: `integer`):

Each page contains up to approximately 12 posts.

## `includeRaw` (type: `boolean`):

Attach the original per-post object.

## `maxConcurrency` (type: `integer`):

Maximum simultaneous Instagram requests.

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

Uses GB residential proxies by default and switches to DE after a failed attempt.

## Actor input object example

```json
{
  "usernames": [
    "instagram"
  ],
  "maxPages": 1,
  "includeRaw": false,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  }
}
```

# Actor output Schema

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

// Run the Actor and wait for it to finish
const run = await client.actor("spider_studio/instagram-user-posts").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": ["instagram"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spider_studio/instagram-user-posts"
        }
    }
}

```

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/YG9bhVqD87BfPtmjU/builds/f5gVcaVrN82cb0tUP/openapi.json
