# Instagram Tagged Posts Scraper (`automation-lab/instagram-mentions-tagged-posts-scraper`) Actor

Export public Instagram posts and Reels that tag monitored profiles, including media, author, caption, timestamps, and engagement.

- **URL**: https://apify.com/automation-lab/instagram-mentions-tagged-posts-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/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

Export public Instagram posts and Reels that tag monitored profiles. Instagram Tagged Posts Scraper returns creator details, captions, media links, publishing timestamps, engagement, and the profiles tagged in each result.

Use it for one-time creator research or schedule recurring runs for brand, campaign, and partnership monitoring. Results are structured in the default Apify dataset for spreadsheets, APIs, webhooks, and data pipelines.

### What does Instagram Tagged Posts Scraper do?

The Actor reads the tagged-media feed for each public profile in your input and saves normalized records. It supports:

- one or many Instagram usernames;
- full Instagram profile URLs;
- posts, Reels, and carousel posts;
- bounded pagination up to `maxItems`;
- an optional ISO date cutoff;
- duplicate removal across monitored profiles;
- encrypted secret input for the required Instagram session cookie.

This Actor extracts the profile's **tagged feed**. It also reports whether the monitored username appears in each returned caption. It does not search all of Instagram for caption-only mentions that are absent from the tagged feed.

### Who is it for?

- **Brand teams** tracking earned content and creator tags.
- **Creator managers** reviewing posts that tag represented talent.
- **Partnership teams** collecting campaign evidence and engagement.
- **Researchers** exporting public tagged-media datasets.
- **Data teams** feeding tagged posts into BI, CRM, or moderation workflows.

### Why use this Actor?

Instagram's logged-out tagged pages commonly redirect to login. This Actor uses an authenticated mobile data route with a coherent US residential proxy session, then returns integration-ready records instead of page HTML.

It fails clearly when a session expires, a profile is private, or Instagram rejects a request. It does not hide an upstream authentication failure behind an empty successful dataset.

### What Instagram tagged-post data is extracted?

| Field | Meaning |
| --- | --- |
| `monitoredUsername` | Public profile whose tagged feed produced the result |
| `ownerUsername` | Author of the post or Reel |
| `url`, `shortCode` | Canonical Instagram media link and shortcode |
| `mediaType`, `productType` | Image, Video/Reel, or Carousel metadata |
| `caption` | Caption text, or `null` |
| `hashtags`, `mentions` | Parsed caption hashtags and usernames |
| `taggedUsers` | Usernames tagged on the media |
| `matchTypes` | `tag`, plus `captionMention` when applicable |
| `timestamp` | Instagram publishing time in ISO 8601 |
| `likesCount`, `commentsCount` | Current public engagement counters |
| `videoViewCount`, `videoPlayCount` | Video counters when Instagram supplies them |
| `displayUrl`, `images`, `videoUrl` | Public media URLs returned by Instagram |
| `locationName` | Attached location when available |
| `isPaidPartnership` | Instagram paid-partnership flag |
| `scrapedAt` | Time this record was normalized |

Media URLs can expire. Download assets promptly if your workflow needs durable files.

### How to scrape Instagram tagged posts

1. Open the Actor in Apify Console.
2. Enter one or more public usernames or profile URLs.
3. Optionally add your own Instagram `sessionid` in the secret **Instagram session cookie** field to override the managed session.
4. Choose a `maxItems` limit and optional date cutoff.
5. Click **Start**.
6. Open the Dataset tab to preview, export, or integrate the records.

Start with a small limit. Confirm the output before scheduling a larger recurring run.

### Input parameters

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `usernames` | string array | None (prefill: `['nike']`) | Public usernames, with or without `@` |
| `profileUrls` | string array | — | Full `instagram.com/<username>/` URLs |
| `sessionCookie` | secret string | — | Optional Instagram `sessionid` override; the default managed session requires no secret input |
| `maxItems` | integer | `50` | Total records across all profiles, from 1 to 5,000 |
| `onlyPostsNewerThan` | string | — | ISO 8601 date/date-time cutoff |

Usernames and profile URLs can be combined. Duplicates are normalized and removed.

#### Example input

```json
{
  "usernames": ["nike", "adidas"],
  "maxItems": 25,
  "onlyPostsNewerThan": "2023-01-01"
}
```

Never paste a session cookie into source code, public tasks, logs, or dataset records.

### Output example

A dataset item from the current output contract looks like this (media URLs shortened):

```json
{
  "type": "taggedPost",
  "recordId": "1234567890",
  "shortCode": "CrYolT-xkI5",
  "url": "https://www.instagram.com/reel/CrYolT-xkI5/",
  "mediaType": "Video",
  "productType": "clips",
  "caption": "Campaign caption",
  "hashtags": ["running"],
  "mentions": ["nike"],
  "taggedUsers": ["nike"],
  "matchTypes": ["tag", "captionMention"],
  "monitoredUsername": "nike",
  "ownerUsername": "creator",
  "timestamp": "2023-04-23T16:13:48.000Z",
  "likesCount": 1250,
  "commentsCount": 42,
  "displayUrl": "https://...",
  "videoUrl": "https://...",
  "scrapedAt": "2026-08-01T12:00:00.000Z"
}
```

Nullable fields remain `null` when Instagram does not return them.

### How much does it cost to export Instagram tagged posts?

Pricing has two parts: a small one-time **Start** event and one **Tagged post** event for every saved dataset record. The per-record rate decreases by Apify pricing tier. Apify proxy and compute use are covered by the Actor's pricing; you do not configure a separate proxy input.

The exact active rates appear in the Pricing tab before you start a run. Your estimate is:

`start price + (saved records × your tier's tagged-post price)`

A filtered or naturally exhausted feed can cost less because only saved records trigger the item event. Authentication failures do not produce charged result records.

### Monitoring and automation workflows

#### Recurring brand monitoring

Create an Apify Schedule, run daily or weekly, and pass a moving `onlyPostsNewerThan` value from your automation. Store media IDs downstream to identify newly discovered posts.

#### Spreadsheet export

Use the dataset's CSV or Excel export. Columns such as creator, caption, timestamp, likes, comments, and post URL are ready for review.

#### Webhooks and data pipelines

Attach an Actor-run webhook, then fetch the default dataset when the run succeeds. Send records to Slack, Airtable, BigQuery, a CRM, or a moderation queue.

### Tips for reliable runs

- The managed session supports normal public-profile runs without a cookie input.
- If you provide a `sessionCookie` override, use a dedicated Instagram account permitted for your monitoring workflow.
- Keep override sessions secret and rotate them if they are ever exposed.
- Begin with `maxItems` between 10 and 50.
- Use ISO timestamps with a timezone for precise cutoffs.
- Schedule conservatively to avoid unnecessary account and source load.
- Expect engagement values to change between runs.

### Limitations and failure behavior

- Only public profiles are supported.
- Instagram requires a valid session. The Actor maintains a managed default session, while optional user-provided overrides expire independently.
- Results come from Instagram's tagged feed, not a complete caption-only mention search.
- Instagram controls feed ordering, availability, and historical depth.
- Removed or restricted media cannot be returned.
- The date cutoff assumes the feed is ordered newest first.
- Instagram may rate-limit or challenge sessions and residential IPs.
- Media CDN links are not permanent archives.

Malformed input, private profiles, invalid sessions, and rejected upstream requests fail the run with a diagnostic message rather than returning misleading empty output.

### Use Instagram Tagged Posts Scraper with the API

Replace `YOUR_TOKEN` and provide the secret value only from a secure environment variable or secret manager.

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~instagram-mentions-tagged-posts-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"usernames":["nike"],"maxItems":10,"sessionCookie":"YOUR_SESSIONID"}'
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/instagram-mentions-tagged-posts-scraper').call({
  usernames: ['nike'],
  maxItems: 10,
  sessionCookie: process.env.INSTAGRAM_SESSIONID,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/instagram-mentions-tagged-posts-scraper').call(run_input={
    'usernames': ['nike'],
    'maxItems': 10,
    'sessionCookie': os.environ['INSTAGRAM_SESSIONID'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with Apify MCP

Add this Actor to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/instagram-mentions-tagged-posts-scraper"
```

#### Claude Desktop, Cursor, and VS Code setup

Use the same HTTP MCP server configuration in Claude Desktop, Cursor, or VS Code:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/instagram-mentions-tagged-posts-scraper"
    }
  }
}
```

Example prompts:

- “Run Instagram Tagged Posts Scraper for nike and return the 10 newest tagged Reels.”
- “Export posts tagging nasa and summarize the creator and engagement columns.”
- “Run my saved tagged-post monitoring task and compare IDs with yesterday's dataset.”

Pass the Instagram session through an encrypted Actor input or secure saved task, never in a chat transcript.

### Responsible use and legality

Scrape only public data you are authorized to collect. Follow Instagram's terms, applicable privacy and database laws, and your organization's policies. Avoid collecting sensitive personal data, profiling individuals, or redistributing content without a lawful basis. Respect deletion requests and use reasonable retention periods.

This Actor is a technical tool, not legal advice. You are responsible for your inputs, account, schedule, and downstream use.

### Troubleshooting

#### The run says the session is invalid

Create a fresh `sessionid` from an Instagram session you control and update the secret input. Do not post it in a support issue. Repeated retries with an expired cookie will not help.

#### A public profile is reported as private or missing

Confirm the exact username in Instagram while signed in. Renames, age/region restrictions, and account removal can affect lookup results.

#### The dataset has fewer rows than `maxItems`

`maxItems` is a ceiling, not a guaranteed count. The tagged feed may be smaller, the cutoff may stop pagination, or duplicate media may tag multiple monitored profiles.

#### Why are some video counters null?

Instagram does not expose the same counters for every media type. Null means the source omitted the value; it is not converted to zero.

### Related Automation Lab Actors

For broader profile posts, comments, hashtag discovery, and direct post URLs, use [Instagram Scraper](https://apify.com/automation-lab/instagram-scraper). Choose this Actor when the central job is the tagged-media feed for monitored public profiles.

### FAQ

#### Does it find caption mentions without a media tag?

No. It extracts the profile's tagged feed and identifies caption mentions inside those results. It does not claim a global caption-only search.

#### Can I monitor several profiles in one run?

Yes. Combine usernames and profile URLs. `maxItems` applies across the whole run.

#### Does it download media files?

It returns media CDN URLs. Download or archive files in your own authorized downstream workflow.

#### Can I schedule it?

Yes. Use Apify Schedules and webhooks. Keep your saved task's `sessionCookie` secret and update it when Instagram expires the session.

# Actor input Schema

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

Public Instagram profiles to monitor, without passwords (for example nike or nasa).

## `profileUrls` (type: `array`):

Optional full profile URLs. You can combine these with usernames.

## `sessionCookie` (type: `string`):

Optional sessionid override for your own Instagram account. Stored as encrypted secret input and never included in output or logs.

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

Maximum total number of posts and Reels saved across all monitored profiles.

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

Optional ISO 8601 date or date-time cutoff, such as 2026-01-01.

## Actor input object example

```json
{
  "usernames": [
    "nike"
  ],
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Default dataset items with monitored profile, author, media, caption, timestamp, engagement, and match metadata.

# 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"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/instagram-mentions-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"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/instagram-mentions-tagged-posts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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"
  ],
  "maxItems": 10
}' |
apify call automation-lab/instagram-mentions-tagged-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/instagram-mentions-tagged-posts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Y8n64aM4KQDvcbfOn/builds/bs8nKtnvYX5oD9Gm3/openapi.json
