# Instagram Mentions Tagged Brand Monitor (`coregent/instagram-mentions-tagged-brand-monitor`) Actor

Track Instagram posts where a brand or account is tagged or mentioned. Export flat, analytics-ready data for brand monitoring, UGC discovery, influencer campaign tracking, and competitor research.

- **URL**: https://apify.com/coregent/instagram-mentions-tagged-brand-monitor.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Categories:** Social media, Automation, Lead generation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.60 / 1,000 matched 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Mentions / Tagged Brand Monitor

![Instagram Mentions / Tagged Brand Monitor](https://raw.githubusercontent.com/coregentdevspace/instagram-mentions-tagged-brand-monitor-assets/main/thumbnail-instagram-mentions-tagged-brand-monitor.jpg)

Track Instagram posts where a brand or account is tagged or mentioned. Export flat, analytics-ready data for brand monitoring, UGC discovery, influencer campaign tracking, and competitor research.

### What does this actor do?

**Instagram Mentions / Tagged Brand Monitor** is an Apify Actor built for brand monitoring workflows — not generic scraping. Point it at one or more Instagram handles, and it returns one flat row per matched post that tags or mentions the target, ready for CSVs, Google Sheets, SQL tables, and BI tools.

Unlike raw Instagram scrapers that dump every post of a profile, this actor is **monitoring-first**. It is designed to answer: *"Where does my brand / client / creator show up on Instagram, and what do those posts look like?"*

Each matched-post row includes:

- **Monitoring context** — `monitorTarget`, `matchedType` (tag / mention / both), `matchSource`, `isTagMatch`, `isMentionMatch`, `discoveryTimestamp`, `runId`
- **Post identity** — `postId`, `postShortcode`, `postUrl`, `postType`, `postCaption`, `postTimestamp`, `postDate`
- **Author** — `authorUsername`, `authorFullName`, `authorProfileUrl`, `authorIsVerified`, optional follower/following/posts counts, category
- **Engagement** — `likesCount`, `commentsCount`, `viewsCount`, `videoDurationSeconds`
- **Content analysis** — `hashtags`, `mentions`, `locationName`, `isSponsoredHint`, `isPotentialUGC`, `hasBrandKeywordHint`, `brandKeywordMatches`
- **Media** — `mediaCount`, `imageUrl`, `videoUrl`, `thumbnailUrl`
- **Attribution** — `coauthorUsernames`, `taggedUsernames`, `mentionedUsernames`, `sponsorLabel`
- **Reporting convenience** — `engagementTotal`, `engagementRateApprox`, `authorFollowerBucket`, `postAgeDays`

### Who this is for

- **Agencies** monitoring client mentions and campaign content
- **Brands / ecommerce teams** surfacing customer and influencer content featuring their account
- **Influencer campaign managers** verifying required tags and mentions
- **UGC sourcing teams** identifying posts worth repurposing or reviewing
- **Competitor analysts** tracking where competitor brands are referenced
- **Automation builders** sending mention events into Slack, Airtable, Sheets, Notion, or CRMs

### How it works

1. **Input** — One or more Instagram usernames to monitor (no `@`) plus your Instagram `sessionid` cookie.
2. **Authentication** — The actor installs your `sessionCookie` on the browser session so Instagram's tagged-feed endpoints stop login-walling requests (see **Authenticating** below).
3. **Resolution** — Each target is resolved to a userId and public profile.
4. **Discovery** — The actor calls Instagram's tagged-feed endpoint, pages through the results, and falls back to DOM scrolling if needed.
5. **Classification** — Each post is checked for tagged relationships, coauthor credits, and caption `@mentions` of the target.
6. **Filtering** — Date window, post type, ownership, and dedupe filters are applied.
7. **Output** — One flat row per matched post, billed as `matched-post`.

> Availability of fields like `viewsCount`, exact follower counts, and some media URLs depends on Instagram's public visibility at run time.

### Authenticating

Instagram requires an authenticated session to serve tagged-feed data reliably — both the REST endpoint (`/api/v1/feed/usertags/...`) and the SPA at `/<user>/tagged/` login-wall guest traffic, even from residential IPs. So the actor needs your own `sessionid` cookie to retrieve data. Runs without a `sessionCookie` will be rejected at input validation.

#### How to copy your `sessionid` cookie (30 seconds)

1. In your web browser, go to [instagram.com](https://www.instagram.com/) and sign in with the account you want to monitor with.
2. Open DevTools:
   - Chrome/Edge: `F12` or `Ctrl+Shift+I` (macOS: `⌘⌥I`)
   - Firefox: `F12` or `Ctrl+Shift+I`
3. Go to the **Application** tab (Chrome/Edge) or **Storage** tab (Firefox).
4. In the left sidebar, expand **Cookies** and select `https://www.instagram.com`.
5. Find the row named `sessionid` and copy its **Value**.
6. Paste the value into the **Instagram sessionid Cookie** input of this actor.
7. Leave the browser tab open — signing out or closing all Instagram tabs can rotate the sessionid and invalidate the one you just pasted.

#### Security

The cookie is used only for the current run. It is **not logged, not written to the dataset, and not persisted between runs**. Treat it like a password — anyone with it can act as you on Instagram.

#### Tips for a healthy session

- Use a secondary Instagram account rather than your main one.
- Avoid very high-volume scraping; the actor paces itself, but keep runs within realistic monitoring volumes.

#### Troubleshooting

| Log message | What it means | Fix |
|-------------|---------------|-----|
| `Missing Instagram sessionid cookie.` | The `sessionCookie` input was empty. | Paste a non-empty `sessionid` value and rerun. |
| `sessionid is likely expired or invalid` | Instagram served a login wall despite the cookie — usually because the sessionid was rotated or expired. | Log into instagram.com in a fresh browser session and paste a new `sessionid`. |
| `No csrftoken cookie` | The initial instagram.com page didn't set a `csrftoken`, often an IP-level rate limit. | Wait 10 minutes and rerun. If it persists, switch Instagram accounts. |
| `sessionid=NO` in cookie log | The `page.setCookie` call didn't install the value (empty or malformed). | Verify you copied the full `sessionid` value — it's typically 40+ characters and URL-encoded (`%3A`, etc.). |

### Sample input

#### Example 1 — Monitor one brand handle

```json
{
  "targets": ["nike"],
  "sessionCookie": "YOUR_INSTAGRAM_SESSIONID_COOKIE",
  "resultsLimit": 200,
  "includeTagged": true,
  "includeMentioned": true,
  "postTypes": ["all"],
  "dedupeByPostId": true
}
````

#### Example 2 — UGC discovery, exclude brand's own posts

```json
{
  "targets": ["glossier", "fentybeauty"],
  "sessionCookie": "YOUR_INSTAGRAM_SESSIONID_COOKIE",
  "resultsLimit": 300,
  "includeTagged": true,
  "includeMentioned": true,
  "excludeOwnPosts": true,
  "postTypes": ["post", "reel", "carousel"],
  "startDate": "2026-01-01",
  "brandKeywords": ["gift", "unboxing", "review"]
}
```

#### Example 3 — Scheduled campaign verification

```json
{
  "targets": ["mybrand"],
  "sessionCookie": "YOUR_INSTAGRAM_SESSIONID_COOKIE",
  "resultsLimit": 500,
  "includeTagged": true,
  "includeMentioned": true,
  "startDate": "2026-03-01",
  "endDate": "2026-03-31",
  "sortOrder": "newest",
  "includeAuthorDetails": true
}
```

### Input reference

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `targets` | string\[] | — | Instagram usernames to monitor (required, no leading `@`) |
| `sessionCookie` | string | — | **Required.** Your Instagram `sessionid` cookie — tagged-feed endpoints are login-walled. See **Authenticating** above. |
| `resultsLimit` | integer | `200` | Max matched posts per target |
| `maxTargets` | integer | `25` | Max targets processed in a single run |
| `includeTagged` | boolean | `true` | Include posts where the target is tagged |
| `includeMentioned` | boolean | `true` | Include posts that mention the target in the caption |
| `startDate` | string | — | Optional lower date bound (ISO 8601) |
| `endDate` | string | — | Optional upper date bound (ISO 8601) |
| `postTypes` | string\[] | `["all"]` | `all`, `post`, `reel`, `video`, `carousel` |
| `sortOrder` | string | `platform_default` | `platform_default`, `newest`, `oldest` |
| `includeAuthorDetails` | boolean | `true` | Include author verified / follower / category fields |
| `includeCaption` | boolean | `true` | Include the post caption |
| `includeRecentCommentsPreview` | boolean | `false` | Best-effort preview of recent comments |
| `brandKeywords` | string\[] | `[]` | Additional brand-related keywords to tag |
| `dedupeByPostId` | boolean | `true` | Return each post once across targets |
| `excludeOwnPosts` | boolean | `false` | Skip posts authored by the target |
| `requestTimeoutSecs` | integer | `300` | Per-target handler timeout |
| `maxConcurrency` | integer | `1` | Max targets processed in parallel |
| `debugMode` | boolean | `false` | Verbose logging |

### Output

The run produces a flat dataset of matched-post rows. Every row carries the full schema; the Apify Console exposes three pre-built **views** that each project a tailored column set on top of the same underlying rows. Filter or sort by the flag columns (`isPotentialUGC`, `isSponsoredHint`, `hasBrandKeywordHint`) inside each view to narrow further.

- **Matched Posts** — broad column set with match classification, author, engagement, and heuristic flags
- **Potential UGC** — trimmed column set focused on author, engagement, and UGC signals
- **Sponsored / Paid Partnership** — trimmed column set focused on author, engagement, and sponsorship signals

![Matched Posts — table view in the Apify Console](https://raw.githubusercontent.com/coregentdevspace/instagram-mentions-tagged-brand-monitor-assets/main/instagram-mentions-tagged-brand-monitor-output-matched-posts-table-view.png)

> The JSON examples below are real rows from a live `targets: ["nike"]` run (147 matched posts returned). Long caption text is preserved verbatim.

#### View 1 — Matched Posts

```json
{
  "monitorTarget": "nike",
  "matchedType": "both",
  "isTagMatch": true,
  "isMentionMatch": true,
  "matchSource": "tagged_relation+caption_mention",
  "postUrl": "https://www.instagram.com/reel/CrYolT-xkI5/",
  "postShortcode": "CrYolT-xkI5",
  "postType": "reel",
  "postCaption": "The @RTFKT X @nike Air Force 1 Forging Event kicks off on April 24th 👟⚒. We are merging digital and physical worlds, collaborating with RTFKT and @takashipom to redeem virtual sneakers for iconic physical pairs.\n\nOh, and If you're in Shinjuku City, Tokyo, between 4/23-4/30, make sure to look up to see some epic 3D billboards. 👀",
  "postTimestamp": "2023-04-23T16:13:48.000Z",
  "postDate": "2023-04-23",
  "authorUsername": "nike",
  "authorFullName": "Nike",
  "authorIsVerified": true,
  "authorFollowersCount": 297437580,
  "likesCount": 440889,
  "commentsCount": 2050,
  "viewsCount": 15244116,
  "hashtags": [],
  "mentionedUsernames": ["rtfkt", "nike", "takashipom"],
  "taggedUsernames": ["rkrkrk", "nike", "takashipom", "rtfkt"],
  "isSponsoredHint": false,
  "isPotentialUGC": false,
  "hasBrandKeywordHint": false,
  "brandKeywordMatches": [],
  "engagementTotal": 442939,
  "authorFollowerBucket": "10m+",
  "postAgeDays": 1096,
  "discoveryTimestamp": "2026-04-24T13:10:39.269Z"
}
```

#### View 2 — Potential UGC

Third-party creator tagged Nike in a post they authored (`isPotentialUGC: true`):

```json
{
  "monitorTarget": "nike",
  "postUrl": "https://www.instagram.com/p/BrGNoZIld83/",
  "postType": "image",
  "postCaption": "At the gate outside, when they pull up, they get me loose",
  "postTimestamp": "2018-12-07T19:00:45.000Z",
  "authorUsername": "iamelvii_",
  "authorFullName": "Elvi Nuhu",
  "authorFollowersCount": 16196,
  "authorIsVerified": false,
  "isPotentialUGC": true,
  "isSponsoredHint": false,
  "hashtags": [],
  "mentionedUsernames": [],
  "taggedUsernames": ["jumpman23", "nike", "zaramen__", "doskulens"],
  "likesCount": 16722,
  "commentsCount": 711,
  "viewsCount": null,
  "engagementTotal": 17433
}
```

#### View 3 — Sponsored / Paid Partnership

> The 147-row live Nike run produced zero rows where the sponsored heuristic fired, so `isSponsoredHint` is `false` for every record in that dataset. The example below is an **illustrative** row showing what the Sponsored view columns look like when a match does include paid-partnership signals (e.g. `#ad`, `#paidpartnership`, branded-content labels):

```json
{
  "monitorTarget": "nike",
  "postUrl": "https://www.instagram.com/p/illustrative-shortcode/",
  "postType": "reel",
  "postCaption": "So excited to partner with @nike on this drop — #ad #paidpartnership",
  "postTimestamp": "2026-04-10T14:22:00.000Z",
  "authorUsername": "creator_example",
  "authorFollowersCount": 82400,
  "isSponsoredHint": true,
  "sponsorLabel": "Paid partnership with Nike",
  "hashtags": ["ad", "paidpartnership"],
  "mentionedUsernames": ["nike"],
  "taggedUsernames": ["nike"],
  "likesCount": 12480,
  "commentsCount": 184,
  "viewsCount": 96300,
  "engagementTotal": 12664,
  "engagementRateApprox": 15.369
}
```

#### Full record (all fields)

Every row in the dataset also contains these fields that are hidden from the trimmed views: `runId`, `postId`, `postDate`, `authorProfileUrl`, `authorFollowingCount`, `authorPostsCount`, `authorCategoryName`, `videoDurationSeconds`, `mentions`, `locationName`, `mediaCount`, `imageUrl`, `videoUrl`, `thumbnailUrl`, `coauthorUsernames`, `engagementRateApprox`. Here's the full Nike reel record (same row as View 1, with media URLs truncated for readability):

```json
{
  "monitorTarget": "nike",
  "matchedType": "both",
  "isTagMatch": true,
  "isMentionMatch": true,
  "matchSource": "tagged_relation+caption_mention",
  "discoveryTimestamp": "2026-04-24T13:10:39.269Z",
  "runId": "AP992me815g7o6zox",
  "postId": "3087396030497833529",
  "postShortcode": "CrYolT-xkI5",
  "postUrl": "https://www.instagram.com/reel/CrYolT-xkI5/",
  "postType": "reel",
  "postCaption": "The @RTFKT X @nike Air Force 1 Forging Event kicks off on April 24th 👟⚒...",
  "postTimestamp": "2023-04-23T16:13:48.000Z",
  "postDate": "2023-04-23",
  "authorUsername": "nike",
  "authorFullName": "Nike",
  "authorProfileUrl": "https://www.instagram.com/nike/",
  "authorIsVerified": true,
  "authorFollowersCount": 297437580,
  "authorFollowingCount": 240,
  "authorPostsCount": 1628,
  "authorCategoryName": null,
  "likesCount": 440889,
  "commentsCount": 2050,
  "viewsCount": 15244116,
  "videoDurationSeconds": 59.93,
  "hashtags": [],
  "mentions": ["rtfkt", "nike", "takashipom"],
  "locationName": null,
  "isSponsoredHint": false,
  "isPotentialUGC": false,
  "hasBrandKeywordHint": false,
  "brandKeywordMatches": [],
  "mediaCount": 1,
  "imageUrl": null,
  "videoUrl": "https://scontent-iad3-2.cdninstagram.com/o1/v/t2/f2/m82/...<truncated>",
  "thumbnailUrl": "https://scontent-iad6-1.cdninstagram.com/v/t51.71878-15/...<truncated>",
  "coauthorUsernames": ["rtfkt"],
  "taggedUsernames": ["rkrkrk", "nike", "takashipom", "rtfkt"],
  "mentionedUsernames": ["rtfkt", "nike", "takashipom"],
  "sponsorLabel": null,
  "engagementTotal": 442939,
  "engagementRateApprox": 0.0015,
  "authorFollowerBucket": "10m+",
  "postAgeDays": 1096
}
```

### Match logic

For each target handle the actor classifies every captured post:

| Field | Meaning |
|-------|---------|
| `isTagMatch` | Target appears in `usertags`, `tagged_users`, or coauthor producers |
| `isMentionMatch` | Target appears as `@target` in the caption |
| `matchedType` | `tag`, `mention`, `both`, or `none` |
| `matchSource` | `tagged_relation`, `caption_mention`, `coauthor`, or a `+`-joined combination |

#### Heuristic flags

- `isSponsoredHint` — `#ad`, `#sponsored`, `#paidpartnership`, paid partnership labels, gifting language
- `isPotentialUGC` — target is tagged/mentioned but is **not** the author
- `hasBrandKeywordHint` / `brandKeywordMatches` — optional `brandKeywords` appear in the caption/hashtags

These are documented as hints, not guaranteed truth.

### Pricing

Pay-per-event pricing:

- `matched-post` — one event per matched post row returned

The actor respects user spending limits and stops gracefully when the limit is reached.

### Tips for best results

- **Start small** — test with `resultsLimit: 25` to verify output quality.
- **Narrow the date window** — recurring runs with `startDate` keep results relevant and billing predictable.
- **Enable `excludeOwnPosts`** — for UGC-only monitoring.
- **Use `brandKeywords`** — to surface mentions that don't use an `@handle` form.

### Local development

```bash
cd actor
npm install
npm start      ## Run with INPUT.json
npm run dev    ## Run with local storage
```

# Actor input Schema

## `targets` (type: `array`):

Instagram usernames / handles to monitor. Provide without the leading @. Example: brandname

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

Required — paste your Instagram `sessionid` cookie here. Instagram login-walls the tagged-feed endpoints, so the actor authenticates as you to retrieve data.

**Get it in 30 seconds:** sign in at instagram.com → open DevTools (F12) → Application tab → Cookies → https://www.instagram.com → copy the `sessionid` value. Full walkthrough in the README.

The value is used only for this run — never logged, never written to the dataset. Treat it like a password. Tip: use a secondary Instagram account, not your main.

## `resultsLimit` (type: `integer`):

Maximum number of matched posts to return per target handle.

## `maxTargets` (type: `integer`):

Maximum number of target handles to process in a single run.

## `includeTagged` (type: `boolean`):

Include posts where the target is tagged (usertag / photo tag).

## `includeMentioned` (type: `boolean`):

Include posts that mention the target handle (e.g. @target) in the caption.

## `startDate` (type: `string`):

Optional lower date bound (ISO 8601, e.g. 2026-01-01). Posts older than this are excluded.

## `endDate` (type: `string`):

Optional upper date bound (ISO 8601, e.g. 2026-04-30). Posts newer than this are excluded.

## `postTypes` (type: `array`):

Filter by media type. Leave empty or include 'all' to accept every type.

## `sortOrder` (type: `string`):

Order matched posts. Default follows the platform's native order.

## `includeAuthorDetails` (type: `boolean`):

Include post author fields (verified, follower count when available, category) on each matched row.

## `includeCaption` (type: `boolean`):

Include the post caption text in the output.

## `includeRecentCommentsPreview` (type: `boolean`):

Include a short preview of recent comments on each matched post (best effort).

## `brandKeywords` (type: `array`):

Optional brand-related keywords to match against captions/hashtags. Matches surface in brandKeywordMatches and hasBrandKeywordHint.

## `dedupeByPostId` (type: `boolean`):

Return only one row per matched post even if a post matches multiple targets.

## `excludeOwnPosts` (type: `boolean`):

Exclude posts authored by the target handle itself (useful for UGC-only monitoring).

## `requestTimeoutSecs` (type: `integer`):

Maximum time in seconds for processing each target handle.

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

Maximum number of targets to process concurrently.

## `debugMode` (type: `boolean`):

Enable verbose logging for debugging.

## Actor input object example

```json
{
  "targets": [
    "nike"
  ],
  "sessionCookie": "12345678901%3AabcdefGHIJKLmnop%3A12%3AAYe...",
  "resultsLimit": 200,
  "maxTargets": 25,
  "includeTagged": true,
  "includeMentioned": true,
  "postTypes": [
    "all"
  ],
  "sortOrder": "platform_default",
  "includeAuthorDetails": true,
  "includeCaption": true,
  "includeRecentCommentsPreview": false,
  "brandKeywords": [],
  "dedupeByPostId": true,
  "excludeOwnPosts": false,
  "requestTimeoutSecs": 300,
  "maxConcurrency": 1,
  "debugMode": false
}
```

# Actor output Schema

## `matchedPosts` (type: `string`):

No description

## `ugc` (type: `string`):

No description

## `sponsored` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/instagram-mentions-tagged-brand-monitor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("coregent/instagram-mentions-tagged-brand-monitor").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 '{}' |
apify call coregent/instagram-mentions-tagged-brand-monitor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Mentions Tagged Brand Monitor",
        "description": "Track Instagram posts where a brand or account is tagged or mentioned. Export flat, analytics-ready data for brand monitoring, UGC discovery, influencer campaign tracking, and competitor research.",
        "version": "1.0",
        "x-build-id": "qus6myp5mIInYL4bf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/coregent~instagram-mentions-tagged-brand-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-coregent-instagram-mentions-tagged-brand-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/coregent~instagram-mentions-tagged-brand-monitor/runs": {
            "post": {
                "operationId": "runs-sync-coregent-instagram-mentions-tagged-brand-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/coregent~instagram-mentions-tagged-brand-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-coregent-instagram-mentions-tagged-brand-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "targets",
                    "sessionCookie"
                ],
                "properties": {
                    "targets": {
                        "title": "Target Handles",
                        "type": "array",
                        "description": "Instagram usernames / handles to monitor. Provide without the leading @. Example: brandname",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "nike"
                        ]
                    },
                    "sessionCookie": {
                        "title": "Instagram sessionid Cookie",
                        "type": "string",
                        "description": "Required — paste your Instagram `sessionid` cookie here. Instagram login-walls the tagged-feed endpoints, so the actor authenticates as you to retrieve data.\n\n**Get it in 30 seconds:** sign in at instagram.com → open DevTools (F12) → Application tab → Cookies → https://www.instagram.com → copy the `sessionid` value. Full walkthrough in the README.\n\nThe value is used only for this run — never logged, never written to the dataset. Treat it like a password. Tip: use a secondary Instagram account, not your main."
                    },
                    "resultsLimit": {
                        "title": "Results Limit (per target)",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of matched posts to return per target handle.",
                        "default": 200
                    },
                    "maxTargets": {
                        "title": "Max Targets to Process",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of target handles to process in a single run.",
                        "default": 25
                    },
                    "includeTagged": {
                        "title": "Include Tagged Posts",
                        "type": "boolean",
                        "description": "Include posts where the target is tagged (usertag / photo tag).",
                        "default": true
                    },
                    "includeMentioned": {
                        "title": "Include Mentioned Posts",
                        "type": "boolean",
                        "description": "Include posts that mention the target handle (e.g. @target) in the caption.",
                        "default": true
                    },
                    "startDate": {
                        "title": "Start Date",
                        "type": "string",
                        "description": "Optional lower date bound (ISO 8601, e.g. 2026-01-01). Posts older than this are excluded."
                    },
                    "endDate": {
                        "title": "End Date",
                        "type": "string",
                        "description": "Optional upper date bound (ISO 8601, e.g. 2026-04-30). Posts newer than this are excluded."
                    },
                    "postTypes": {
                        "title": "Post Types",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Filter by media type. Leave empty or include 'all' to accept every type.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "all",
                                "post",
                                "reel",
                                "video",
                                "carousel"
                            ],
                            "enumTitles": [
                                "All types",
                                "Image post",
                                "Reel",
                                "Video",
                                "Carousel"
                            ]
                        },
                        "default": [
                            "all"
                        ]
                    },
                    "sortOrder": {
                        "title": "Sort Order",
                        "enum": [
                            "platform_default",
                            "newest",
                            "oldest"
                        ],
                        "type": "string",
                        "description": "Order matched posts. Default follows the platform's native order.",
                        "default": "platform_default"
                    },
                    "includeAuthorDetails": {
                        "title": "Include Author Details",
                        "type": "boolean",
                        "description": "Include post author fields (verified, follower count when available, category) on each matched row.",
                        "default": true
                    },
                    "includeCaption": {
                        "title": "Include Caption",
                        "type": "boolean",
                        "description": "Include the post caption text in the output.",
                        "default": true
                    },
                    "includeRecentCommentsPreview": {
                        "title": "Include Recent Comments Preview",
                        "type": "boolean",
                        "description": "Include a short preview of recent comments on each matched post (best effort).",
                        "default": false
                    },
                    "brandKeywords": {
                        "title": "Brand Keywords",
                        "type": "array",
                        "description": "Optional brand-related keywords to match against captions/hashtags. Matches surface in brandKeywordMatches and hasBrandKeywordHint.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "dedupeByPostId": {
                        "title": "Deduplicate by Post ID",
                        "type": "boolean",
                        "description": "Return only one row per matched post even if a post matches multiple targets.",
                        "default": true
                    },
                    "excludeOwnPosts": {
                        "title": "Exclude Own Posts",
                        "type": "boolean",
                        "description": "Exclude posts authored by the target handle itself (useful for UGC-only monitoring).",
                        "default": false
                    },
                    "requestTimeoutSecs": {
                        "title": "Request Timeout (seconds)",
                        "minimum": 30,
                        "maximum": 900,
                        "type": "integer",
                        "description": "Maximum time in seconds for processing each target handle.",
                        "default": 300
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Maximum number of targets to process concurrently.",
                        "default": 1
                    },
                    "debugMode": {
                        "title": "Debug Mode",
                        "type": "boolean",
                        "description": "Enable verbose logging for debugging.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
