# Instagram Reposts Scraper - Collabs & Credits (`khadinakbar/instagram-reposts-scraper`) Actor

Scrape public Instagram collabs and caption-credited reposts from profile pages or post URLs. Returns coauthors, credited handles, captions, and media URLs. No login. MCP-ready. $0.004 per row.

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

## Pricing

from $4.00 / 1,000 repost or collab rows

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Instagram Reposts Scraper

Scan public Instagram profiles or post URLs and return collab posts plus caption-credited shares as one dataset row each. You get coauthors, credited handles, captions, like/comment counts, and canonical post URLs without Instagram login, cookies, or a browser. The actor is provider-backed (ScrapeCreators first, SociaVault fallback) and MCP-ready.

### Best fit for this Actor

- You already have public handles or post URLs and need collab coauthors or caption-credit signals, not a login-gated Reposts tab.
- Default mode saves only matching collabs and credited posts; turn on `includeNonReposts` when you need every inspected post tagged with `isRepost`.
- For profile bios, follower counts, reels-only feeds, or story highlights, route to the matching Instagram sibling actors below.

### Find collab partners on a brand profile

A partnership manager tracking National Geographic wants every recent collab. They pass `usernames: ["natgeo"]` with `maxPostsPerProfile: 12`. The actor inspects recent public posts, keeps rows where Instagram lists another `coauthor_producers` username (Disney, Hulu, Nat Geo Animals) or where the caption says `repost` / `via @user` / `credit`, and returns `postUrl`, `coauthorUsernames`, `matchedSignals`, and `takenAt`. They then feed those coauthor handles into the [Instagram Profile Scraper](https://apify.com/khadinakbar/instagram-profile-scraper) for follower counts before outreach.

### Quick start input

```json
{
  "usernames": ["natgeo"],
  "maxPostsPerProfile": 12,
  "maxTotalItems": 50,
  "includeNonReposts": false,
  "providerOrder": "scrapecreators-first"
}
```

This scans the latest public posts on `@natgeo`, saves collab and caption-credited rows only, and stops at 12 matches or 50 total rows. Direct post URLs work the same way:

```json
{
  "postUrls": ["https://www.instagram.com/p/DLDXI0fylTC/"],
  "includeNonReposts": true
}
```

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `usernames` | array | Handles, @handles, or profile URLs. Prefill `["natgeo"]`. Empty if you only pass `postUrls`. |
| `postUrls` | array | Direct `/p/` or `/reel/` URLs or bare shortcodes. Combine with usernames or use alone. |
| `maxPostsPerProfile` | integer | Matching rows saved per username after filtering. Default 12, range 1–100. |
| `maxTotalItems` | integer | Run-wide row cap and spend guard. Default 500, range 1–100000. |
| `includeNonReposts` | boolean | Default false keeps only collabs and caption credits. True saves every inspected post, still billed per row. |
| `providerOrder` | string | `scrapecreators-first` (default), `sociavault-first`, or a `-only` pin. You never supply an API key. |
| `includeRawData` | boolean | Attach the raw provider item under `raw`. Default false. |

### What data you receive

One dataset item is one public post that matched (or, with `includeNonReposts`, one inspected post). Null fields are omitted.

```json
{
  "sourceProfile": "natgeo",
  "sourceProfileUrl": "https://www.instagram.com/natgeo/",
  "postId": "3650123456789012345",
  "shortcode": "DLDXI0fylTC",
  "postUrl": "https://www.instagram.com/p/DLDXI0fylTC/",
  "caption": "A collab film with our partners.",
  "isRepost": true,
  "isCollab": true,
  "isCaptionCredit": false,
  "matchedSignals": ["collab"],
  "creditedUsernames": [],
  "coauthorUsernames": ["hulu"],
  "ownerUsername": "natgeo",
  "likeCount": 12000,
  "commentCount": 340,
  "isVideo": false,
  "takenAt": "2026-08-01T12:00:00.000Z",
  "provider": "scrapecreators",
  "scrapedAt": "2026-08-18T12:00:00.000Z",
  "sourceUrl": "https://www.instagram.com/natgeo/"
}
```

`takenAt` and `scrapedAt` are ISO 8601 timestamps. Instagram does not expose a public no-login Reposts tab; this actor flags **collabs** (`coauthor_producers`) and **caption-credit language**, which is the public-visible equivalent.

### Use through the API

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('khadinakbar/instagram-reposts-scraper').call({
  usernames: ['natgeo'],
  maxPostsPerProfile: 12,
  maxTotalItems: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Equivalent curl:

```bash
curl "https://api.apify.com/v2/acts/khadinakbar~instagram-reposts-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"usernames":["natgeo"],"maxPostsPerProfile":12,"maxTotalItems":50}'
```

### Use with AI agents through Apify MCP

> Scrape public Instagram collabs and caption-credited posts for one or more handles or post URLs. Use it when you need coauthors, credited @handles, captions, and post URLs from public posts; route to a sibling actor for profiles, reels, highlights, or comments. Return one row per matching post plus RUN\_SUMMARY. Cap with maxPostsPerProfile and maxTotalItems. Costs $0.004 per saved row plus a $0.00005 start, plus platform usage.

Inspect the terminal `outcome` (`COMPLETE`, `PARTIAL`, `VALID_EMPTY`, `INVALID_INPUT`, `UPSTREAM_FAILED`, `CONFIG_ERROR`), read the default dataset, keep `postUrl` as provenance, and respect the caps. Current MCP setup: <https://mcp.apify.com>.

### Connect the workflow

- Feed `sourceProfile` or `coauthorUsernames` into the [Instagram Profile Scraper](https://apify.com/khadinakbar/instagram-profile-scraper) when you need follower counts and bios for the same accounts.
- Use the [Instagram Posts Scraper](https://apify.com/khadinakbar/instagram-posts-scraper) when you need a full recent-post feed rather than collab/credit filtering.
- Use the [Instagram Reels Scraper](https://apify.com/khadinakbar/instagram-reels-scraper) when the starting point is reels-only media.
- Use the [Instagram Highlights Scraper](https://apify.com/khadinakbar/instagram-highlights-scraper) when the starting point is story highlight trays rather than feed posts.

### Pricing

This Actor uses Pay per event plus Apify platform usage. Open the live Pricing tab for current event details, and use Apify's run cost controls to keep the workflow aligned with your budget.

| Event | Price |
| --- | ---: |
| Actor start | `$0.00005` |
| Saved row (`repost-found`) | `$0.004` |

Every persisted row is billed, including original posts when `includeNonReposts` is true. Empty matches (`VALID_EMPTY`) and invalid input (`INVALID_INPUT`) leave the per-row event uncharged. The opening status message shows the approximate maximum event cost from your input caps; platform usage (compute) is additional.

### Best results

- Pass exact public handles or `/p/` or `/reel/` URLs; hashtag and highlight URLs are out of scope.
- Keep `includeNonReposts` false unless you truly need a full recent-post scan — that mode bills every inspected row.
- Cap spend with `maxTotalItems`; start with 3–12 posts per profile while you confirm yield on a handle.
- Treat a profile with no collabs or caption credits as a valid empty result: confirm `RUN_SUMMARY.outcome` is `VALID_EMPTY` before retrying.
- Instagram CDN thumbnails expire; copy them promptly if you need the files.

### Builder's note

I built this actor because Instagram's consumer app has a Reposts tab, while public HTML and the no-login provider APIs surface collabs and caption credits instead. I found National Geographic posts carrying `coauthor_producers` (Hulu, Disney, Nat Geo Animals) on ScrapeCreators `/v1/instagram/user/posts` and SociaVault `/v1/scrape/instagram/posts`, with caption-only credit language (`via @user`, `repost`) on other accounts. In my testing SociaVault sometimes returns `items` as an object map rather than an array, so the normalizer always runs `Object.values` before scoring signals. The public-visible product is therefore **collabs + caption credits**.

### Responsible use

Use this actor only for public Instagram content you are allowed to access and process. You are responsible for complying with Instagram's Terms of Service, privacy laws, data protection rules, and any platform or jurisdiction-specific requirements. This actor does not access private accounts, login-gated Reposts tabs, or cookie-based sessions.

# Actor input Schema

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

Public Instagram usernames whose recent posts should be scanned for collabs and caption credits. Accepts handles (e.g. "natgeo"), @handles, or profile URLs (e.g. "https://www.instagram.com/natgeo/"). Leave empty if you only pass postUrls. NOT a post, reel, or hashtag URL.

## `postUrls` (type: `array`):

Direct Instagram post or reel URLs (or bare shortcodes) to inspect for collab coauthors and caption-credit signals without listing a profile first. Combine with usernames or use alone. NOT a profile, highlight, or hashtag URL.

## `maxPostsPerProfile` (type: `integer`):

Upper bound on matching rows saved per username after collab/credit filtering. Accepts 1-100; defaults to 12. The actor may inspect more raw posts to fill this cap. NOT a global spend guard — use maxTotalItems for that.

## `maxTotalItems` (type: `integer`):

Hard global cap on saved rows across all targets; the run stops gracefully when reached. Accepts 1-100000; defaults to 500. Works as a spend guard together with the $0.004 per-row event. NOT a per-profile limit.

## `includeNonReposts` (type: `boolean`):

When false (default), only collab posts and caption-credited posts are saved and billed. When true, every inspected public post is saved with isRepost marked, still billed per saved row. Use this for a full recent-post scan, not for cheap discovery.

## `providerOrder` (type: `string`):

Order in which the backing data providers are tried for every request. Defaults to scrapecreators-first; the fallback provider is used automatically when the primary fails. Use sociavault-first to invert the order or a -only value to pin one provider. Providers are owner-configured secrets; you never need an API key.

## `includeRawData` (type: `boolean`):

When true, each row also carries the unmodified provider item under a "raw" key for debugging. Defaults to false because raw payloads roughly triple row size. NOT needed for normal scraping — every normalized field is already extracted.

## Actor input object example

```json
{
  "usernames": [
    "natgeo",
    "@nasa"
  ],
  "postUrls": [
    "https://www.instagram.com/p/DLDXI0fylTC/"
  ],
  "maxPostsPerProfile": 3,
  "maxTotalItems": 50,
  "includeNonReposts": false,
  "providerOrder": "scrapecreators-first",
  "includeRawData": false
}
```

# Actor output Schema

## `repostItems` (type: `string`):

One row per matching public post, with coauthors, caption-credit signals, caption, media URL, and provenance.

## `runSummary` (type: `string`):

Run diagnostics, provider telemetry, counts, stop reason, and estimated PPE cost.

## `output` (type: `string`):

Same summary under the OUTPUT key for stable agent and readback evidence.

# 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": [
        "natgeo"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/instagram-reposts-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 = { "usernames": ["natgeo"] }

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/instagram-reposts-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 '{
  "usernames": [
    "natgeo"
  ]
}' |
apify call khadinakbar/instagram-reposts-scraper --silent --output-dataset

```

## MCP server setup

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