# Instagram Tagged Posts Scraper – UGC Where a Profile Is Tagged (`khadinakbar/instagram-tagged-posts-scraper`) Actor

Scrape public Instagram posts where a profile is tagged. Use for brand UGC, influencer deliverable checks, and mention monitoring. Returns one row per tagged post with URL, caption, owner, tagged users, and engagement. $0.005/post plus $0.00005 start.

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

## Pricing

from $5.00 / 1,000 tagged post scrapeds

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/platform/actors/running/actors-in-store#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 Tagged Posts Scraper

Scrape **public Instagram posts where a profile is tagged**. Each dataset row is one tagged post with the post URL, caption, owner, tagged users, likes, comments, media URLs, and a `RUN_SUMMARY` outcome so agents can tell complete results from empty or unavailable feeds.

### Best Fit

Choose this actor when the starting point is a public Instagram handle and the job is **UGC and photo-tags**, not the profile's own grid. It works well for brand mention monitoring, influencer campaign deliverable checks, and competitor UGC libraries. Pair it with the [Instagram Profile Scraper](https://apify.com/khadinakbar/instagram-profile-scraper) when you also need follower counts and bio context for the same accounts, then continue with the [Instagram Posts Scraper](https://apify.com/khadinakbar/instagram-posts-scraper) if you need that profile's own timeline instead of tagged-by-others posts.

This actor is designed as a focused standalone workflow for the `/tagged/` feed.

### How To Use

Open the Input tab and enter one or more usernames or profile URLs. Set `maxPostsPerProfile` (use 3 for a cheap test, 20 for a typical export). Start the actor, then download JSON, CSV, or Excel from the dataset when it finishes.

### Input

```json
{
  "usernames": ["nike"],
  "maxPostsPerProfile": 3,
  "includeRecentComments": false
}
```

| Input | Default | Notes |
| --- | --- | --- |
| `usernames` | `["nike"]` | Handles, @handles, or profile URLs |
| `maxPostsPerProfile` | `20` | 1–200 tagged posts per profile |
| `onlyPostsNewerThan` | none | `YYYY-MM-DD` or `7 days` |
| `includeRecentComments` | `false` | Up to five preview comments when present |

### Output

You can download the dataset as JSON, HTML, CSV, or Excel. One row per tagged post:

| Field | Description |
| --- | --- |
| `shortcode` / `url` | Post identity and canonical URL |
| `input_username` | Target profile whose tagged tab was scraped |
| `owner_username` | Account that published the post |
| `caption` | Caption text with parsed `hashtags` and `mentions` |
| `tagged_users` | Users photo-tagged on the media |
| `is_target_profile_tagged` | Whether the target handle appears in tags/mentions |
| `like_count` / `comment_count` | Engagement, when Instagram exposes it |
| `timestamp` | ISO 8601 publish time |
| `source` | `native` extraction path |

```json
{
  "id": "3482602799815487662",
  "shortcode": "DBUsMt4yHCu",
  "url": "https://www.instagram.com/p/DBUsMt4yHCu/",
  "post_type": "REEL",
  "caption": "Campaign UGC tagging the brand",
  "hashtags": ["ugc"],
  "mentions": ["nike"],
  "like_count": 626,
  "comment_count": 7,
  "owner_username": "ronaldotv",
  "tagged_users": ["nike"],
  "input_username": "nike",
  "input_profile_url": "https://www.instagram.com/nike/",
  "tagged_page_url": "https://www.instagram.com/nike/tagged/",
  "is_target_profile_tagged": true,
  "position": 1,
  "source": "native",
  "timestamp": "2024-10-19T12:00:00.000Z",
  "scraped_at": "2026-08-18T00:00:00.000Z",
  "source_url": "https://www.instagram.com/nike/tagged/"
}
```

```json
{
  "outcome": "COMPLETE",
  "message": "Saved 3 tagged Instagram post(s) across 1 profile(s).",
  "itemsPushed": 3,
  "profilesTotal": 1,
  "estimatedPpeCostUsd": 0.0151,
  "startedAt": "2026-08-18T00:00:00.000Z",
  "finishedAt": "2026-08-18T00:01:12.000Z"
}
```

### Workflow Story

A typical workflow starts with a brand handle such as `nike`. The marketing team runs this actor with `maxPostsPerProfile: 50`, then exports tagged posts to compare creator deliverables against a paid campaign list. Next they schedule a weekly run and diff `RUN_SUMMARY.itemsPushed` to see whether UGC volume dropped. When they also need the brand's own grid, they pass the same handle into the posts scraper after this tagged export.

### Pricing

This actor uses **Pay per event (PPE)** with **platform usage** passed through.

| Event | Price |
| --- | ---: |
| Actor start | `$0.00005` |
| Tagged post saved | `$0.005` |

Example: 20 tagged posts cost about `$0.10005` in events, plus compute/proxy platform usage. See the **Pricing tab** on this actor's page for the live price table.

### API Example

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('khadinakbar/instagram-tagged-posts-scraper').call({
  usernames: ['nike'],
  maxPostsPerProfile: 3
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

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

### MCP And AI Agents

Exposed through Apify MCP as `khadinakbar/instagram-tagged-posts-scraper`. Agent prompt card:

> Scrape public Instagram posts where a profile is tagged. Use this when the user wants UGC, photo-tags, or campaign deliverables for a handle. For that profile's own posts, hashtags, or reels, route to the matching sibling actor. Returns one dataset row per tagged post plus a RUN\_SUMMARY with outcome, row count, provenance (`source`, `source_url`, `scraped_at`), and estimated cost. Charged $0.005 per saved post plus $0.00005 start. Cap spend with maxPostsPerProfile.

### Best Results Guidance

- Provide exact public handles. Profile URLs are accepted.
- Start with `maxPostsPerProfile: 3` to validate the tagged tab, then raise the cap.
- Confirm `RUN_SUMMARY.outcome` before retrying: `VALID_EMPTY` means the profile has no public tagged posts.
- Schedule weekly tagged exports and validate `itemsPushed` against last week's summary.
- Keep runs focused on a small username list so residential proxy time stays predictable.

### Builder's Note

I built this because tagged UGC is a different dataset from a profile grid. Live probes showed ScrapeCreators and SociaVault expose profile and post routes, while the tagged tab is served by Instagram's public `usertags/{user_id}/feed` after the handle is resolved, with the `/tagged/` page as intercept fallback. A login-wall HTML page is recorded as `UPSTREAM_FAILED` so batch jobs stay honest when the public feed is unavailable.

### Related Actors

- Use the [Instagram Posts Scraper](https://apify.com/khadinakbar/instagram-posts-scraper) when you need the profile's own posts instead of tagged UGC.
- Use the [Instagram Reels Scraper](https://apify.com/khadinakbar/instagram-reels-scraper) for Reel-only feeds after you have a handle from this tagged export.
- Use the [Instagram Hashtag Scraper](https://apify.com/khadinakbar/instagram-hashtag-scraper) to discover posts by hashtag rather than by who is tagged.

### Legal

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, and data-protection rules. This actor does not access private accounts or login-gated content.

# Actor input Schema

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

Instagram usernames whose public tagged-posts tab should be scraped. Accepts plain handles (e.g. "nike"), @handles (e.g. "@nike"), or full profile URLs (e.g. "https://www.instagram.com/nike/"). This is the tagged-by-others feed, not the profile's own posts. NOT a post, reel, hashtag, or location URL.

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

Upper bound on tagged posts saved per username, newest first. Accepts 1-200; defaults to 20. Quality tests should use 3. NOT a global run cap.

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

Optional date filter. Accepts YYYY-MM-DD or relative windows such as "7 days" or "2 months". Posts older than this timestamp are skipped. Leave empty to keep every tagged post within maxPostsPerProfile.

## `includeRecentComments` (type: `boolean`):

When true, each row may include up to five preview comments when Instagram exposes them. Defaults to false because comments increase payload size and are not required for UGC monitoring.

## Actor input object example

```json
{
  "usernames": [
    "nike",
    "https://www.instagram.com/adidas/"
  ],
  "maxPostsPerProfile": 3,
  "includeRecentComments": false
}
```

# Actor output Schema

## `taggedPosts` (type: `string`):

One row per public Instagram post where the target profile is tagged.

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

Terminal outcome, row counts, and spend estimate.

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

Same summary under the OUTPUT key for agent readback.

# 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": [
        "nike"
    ],
    "maxPostsPerProfile": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/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": ["nike"],
    "maxPostsPerProfile": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/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": [
    "nike"
  ],
  "maxPostsPerProfile": 3
}' |
apify call khadinakbar/instagram-tagged-posts-scraper --silent --output-dataset

```

## MCP server setup

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