# Instagram Tagged Posts Scraper With Post Detail Data (`scrapapi/instagram-tagged-posts-scraper`) Actor

Instagram Tagged Posts Scraper: Extract tagged posts with captions, usernames, timestamps, media URLs, likes, comments, tagged accounts, and post details. Analyze brand mentions, user-generated content, engagement, and creator activity for social media research and competitor analysis.

- **URL**: https://apify.com/scrapapi/instagram-tagged-posts-scraper.md
- **Developed by:** [ScrapAPI](https://apify.com/scrapapi) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 23 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

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

### 🤔 What does Instagram Tagged Posts Scraper With Post Detail Data do?

This Actor is an **Instagram tagged posts scraper**: give it one or more Instagram usernames (or profile URLs) and it collects every post where that account has been **tagged** by someone else — the classic "Tagged" tab on a profile. For each tagged post you get the full media object (image/video/carousel URLs, caption, like/comment counts, owner info) **plus, optionally, a second enrichment fetch per post** that pulls real data the tagged-posts feed itself doesn't return: the actual post date, video duration, an audio-present flag, and a richer accessibility caption pulled straight from the post's own page.

No login, no session cookies, and no Instagram API credentials required — this Instagram tag scraper runs entirely against public, logged-out endpoints using browser-signature impersonation.

### 📦 What can I extract?

| Data Type 🧩 | Description 📘 | Example Fields 🔎 |
| --- | --- | --- |
| Post Identity | Core identifiers & shortcode | `pk`, `code`, `id`, `media_type`, `product_type` |
| Owner / Tagged Account | Who posted it, who is tagged | `user.username`, `user.id`, `owner.id` |
| Caption & Accessibility | Text content | `caption.text`, `accessibility_caption` |
| Media | Image/video/carousel URLs & dimensions | `image_versions2.candidates[]`, `carousel_media[]`, `carousel_media_count`, `display_uri`, `original_width`, `original_height` |
| Engagement | Raw counts as returned by Instagram | `like_count`, `comment_count`, `view_count`, `comments_disabled`, `like_and_view_counts_disabled` |
| **Post Detail Data** ⭐ | Second-fetch enrichment, per post | `detailFetched`, `postDetail.takenAt` (ISO date), `postDetail.takenAtTimestamp`, `postDetail.videoDurationSeconds`, `postDetail.hasAudio`, `postDetail.isPaidPartnership`, `postDetail.accessibilityCaption`, `postDetail.postUrl` |

#### 🔑 Key Features

- **Instagram tagged posts discovery** — pass any public username or profile URL and get every post it's tagged in, paginated automatically (cursor-based, no duplicates).
- **Post detail enrichment (this variant's core feature)** — toggle `includePostDetails` to run a second, per-post fetch that adds the real post date, video duration, an audio flag, and a richer accessibility caption that the tagged-posts feed alone cannot provide.
- **Honest partial-coverage reporting** — every row carries a `detailFetched` boolean, so you always know exactly which rows got the extra enrichment and which fell back to base tagged-feed data only (Instagram doesn't expose a paid-partnership/timestamp field for every post type, and this is disclosed per row, never faked).
- **Bounded extra-request cost** — `maxDetailFetchesPerProfile` caps how many detail fetches run per account, so a large `maxItems` run doesn't silently multiply your request volume.
- **Carousel-aware** — full `carousel_media`/`carousel_media_count` for multi-image/video tagged posts.
- **Real-time streaming output** — every page of results is pushed to the dataset the moment it's collected, not buffered to the end of the run.
- **Your proxy, actually used** — the `proxy_configuration` you set is honored end-to-end for every request (profile lookup, tagged-feed page, and detail-page fetches).

### 🛠️ How to use

1. Log in to Apify — create a free account or sign in.
2. Select this Instagram tagged posts scraper from the Apify Store.
3. Add one or more usernames, `@handles`, or profile URLs under **Target Accounts**.
4. Set **Maximum Tagged Posts Per Account** (`0` = unlimited).
5. Leave **Enrich Posts With Detail-Page Data** on (default) for real dates/video duration/audio flags, or turn it off for tagged-feed data only and a faster run.
6. Set **Max Detail Fetches Per Account** to bound the extra-request cost.
7. Optionally configure **Proxy Settings** (residential recommended).
8. Click **Start**. Rows stream to the dataset live; export as JSON/CSV/Excel or read via the Apify API.

### 🎯 Use Cases

- **UGC & brand-mention monitoring** — find every post a brand or creator account is tagged in, with real post dates for chronological reporting.
- **Influencer/creator research** — see who tags a target account, how often, and what format (image/video/carousel) those tagged posts are.
- **Campaign & collaboration tracking** — pull real post timestamps and video duration for tagged content around a launch window.
- **Content archiving & compliance review** — collect tagged-post media URLs and captions for a documented record.
- **Social listening pipelines** — feed the accessibility captions and raw engagement counts into downstream analysis.

### 🔧 Input Parameters

#### 📥 JSON Example

```json
{
  "usernames": ["mrbeast", "https://instagram.com/cristiano"],
  "maxItems": 10,
  "includePostDetails": true,
  "maxDetailFetchesPerProfile": 10,
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `usernames` | array | Instagram usernames, `@handles`, or profile URLs to collect tagged posts from |
| `maxItems` | integer | Max tagged posts to collect per account (`0` = unlimited) |
| `includePostDetails` | boolean | Run a second per-post fetch for real date/video/caption enrichment (default `true`) |
| `maxDetailFetchesPerProfile` | integer | Caps extra detail fetches per account (`0` = enrich every collected post) (default `10`) |
| `proxy_configuration` | object | Standard Apify proxy configuration; residential recommended |

### 📤 Output Format

Each result row is a tagged post with the fields above. Example (trimmed):

```json
{
  "pk": "3964104634460874768",
  "media_type": 2,
  "code": "DcDVCmNhSgQ",
  "product_type": "clips",
  "user": { "pk": "2278169415", "username": "mrbeast", "id": "2278169415" },
  "owner": { "id": "2278169415" },
  "caption": { "pk": "", "text": "..." },
  "accessibility_caption": null,
  "like_count": 4210,
  "comment_count": 88,
  "view_count": null,
  "comments_disabled": false,
  "carousel_media_count": null,
  "display_uri": "https://instagram.fxxx.fna.fbcdn.net/...",
  "detailFetched": true,
  "postDetail": {
    "takenAt": "2026-08-15T02:39:55+00:00",
    "takenAtTimestamp": 1786778395,
    "videoDurationSeconds": 5,
    "hasAudio": true,
    "isPaidPartnership": null,
    "accessibilityCaption": "Video by Shudhneeldhara on August 15, 2026. May be an image of magazine, banner, calendar, flag, poster, plant and text.",
    "postUrl": "https://www.instagram.com/p/DcDVCmNhSgQ/"
  }
}
```

**Note on `postDetail.isPaidPartnership`:** Instagram's public, logged-out post page does not expose a paid-partnership/sponsor flag on this surface — this field is kept in every row for schema consistency but is genuinely `null` (never faked) until that data becomes publicly extractable. `postDetail.videoDurationSeconds` is a best-effort value derived from the video file's own delivery metadata and is `null` for image/carousel posts or when the source doesn't embed it.

### ❓ FAQ

**Do I need to log in to Instagram?**
No. This Actor runs entirely against public, logged-out Instagram endpoints.

**What's the difference between `accessibility_caption` and `postDetail.accessibilityCaption`?**
`accessibility_caption` comes from the tagged-posts feed itself and is usually empty on that surface. `postDetail.accessibilityCaption` comes from the post's own detail page (only fetched when `includePostDetails` is on) and is populated far more often.

**Why is `postDetail` sometimes `null`?**
Either `includePostDetails` is off, the per-account `maxDetailFetchesPerProfile` cap was reached, or the detail-page fetch for that specific post didn't succeed. Check `detailFetched` on each row to know which case applies.

**Can I scrape private accounts?**
No — only public accounts' tagged posts are accessible without login, consistent with Instagram's own public access rules.

# Actor input Schema

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

Instagram usernames, full profile URLs, or `@handles` to collect tagged posts from.

Example: `mrbeast` or `https://instagram.com/cristiano`.

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

How many tagged posts to collect per target account. Enter `0` to collect ALL available tagged posts. Default is 10.

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

When ON, each tagged post gets a SECOND fetch (its own post page) to add: real post date (`takenAt`), video duration in seconds, an audio-present flag, a paid-partnership flag (when the platform exposes it), and a richer accessibility caption. Every row gets a `detailFetched` flag so you can see exactly which rows were enriched vs. base-only. Adds one extra request per post — use `maxDetailFetchesPerProfile` to bound the cost.

## `maxDetailFetchesPerProfile` (type: `integer`):

Caps how many extra per-post detail fetches run per target account (bounds the extra-request cost of `includePostDetails`). Enter `0` to enrich every collected post (up to `maxItems`). Default is 10.

## `proxy_configuration` (type: `object`):

Proxy configuration used for every request (profile lookup, tagged-posts feed, and post-detail fetches). Residential proxies are recommended for stable, low-block extraction. Your selection here is honored end-to-end.

## Actor input object example

```json
{
  "usernames": [
    "ronaldo",
    "https://www.instagram.com/cristiano/",
    "@leomessi"
  ],
  "maxItems": 100,
  "includePostDetails": true,
  "maxDetailFetchesPerProfile": 10,
  "proxy_configuration": {
    "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 = {
    "usernames": [
        "mrbeast",
        "cristiano"
    ],
    "proxy_configuration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapapi/instagram-tagged-posts-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": [
        "mrbeast",
        "cristiano",
    ],
    "proxy_configuration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapapi/instagram-tagged-posts-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": [
    "mrbeast",
    "cristiano"
  ],
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scrapapi/instagram-tagged-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapapi/instagram-tagged-posts-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/GRyfbNBMdXRdTDyOu/builds/79OpUR8fScfGhjmot/openapi.json
