# Instagram Tagged Posts Scraper: Videos, Carousels & Reels Info (`simpleapi/instagram-tagged-posts-scraper`) Actor

Instagram Tagged Posts Scraper extracts posts where a profile is tagged, capturing captions, media URLs, timestamps, hashtags, and engagement metrics. Perfect for brand monitoring, UGC tracking, influencer research, and automating structured Instagram tagged-content insights.

- **URL**: https://apify.com/simpleapi/instagram-tagged-posts-scraper.md
- **Developed by:** [SimpleAPI](https://apify.com/simpleapi) (community)
- **Categories:** Lead generation, Social media, Videos
- **Stats:** 36 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$19.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## 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 — Reels, Carousels and Video URLs

This Apify Actor scrapes Instagram's **Tagged** tab for any public profile and returns every post where that account was tagged by someone else, as structured JSON. Each row carries a direct `videoUrl`, `videoDuration` and `playCount` for every Reel, a normalized `carouselChildren` breakdown for every multi-slide post, plus `musicInfo`, `like_count`, `comment_count` and `permalink`. Brand/UGC managers, social monitoring agencies, and trend researchers use it to pull tagged content without hand-parsing Instagram's raw JSON. No login is required, and results are ready to feed straight into a reporting or media pipeline.

### What is Instagram Tagged Posts Scraper: Videos, Carousels & Reels Info?

It is an Apify Actor that scrapes the public **Tagged** tab of one or more Instagram profiles — the posts where someone else tagged that account, not the account's own feed — and returns each post as a normalized JSON record. No Instagram login, session cookie, or API key is required: it runs fully logged-out using browser-signature (TLS) impersonation, with an automatic Apify RESIDENTIAL proxy fallback since Instagram blocks Apify's datacenter IP ranges.

- Discovers posts by target profile: enter usernames, `@handles`, or full profile URLs, one or many per run (`targetProfiles`)
- Returns identity and engagement fields for every post: `pk`, `code`, `permalink`, `like_count`, `comment_count`, `view_count`
- Resolves video/Reel-specific data per post: a direct playable `videoUrl`, `videoDuration`, and `playCount`
- Normalizes carousel posts into a clean `carouselChildren[]` array (id, code, url, dimensions, display image, per-slide play count) instead of raw unparsed JSON
- Extracts Reels music/original-audio identification (`musicInfo`) when Instagram's payload carries it
- Filters results down to one physical format — video, carousel, or photo — via `mediaTypeFilter`, and exports through Apify's standard dataset (JSON, CSV, Excel, etc.)

### What data can I extract with Instagram Tagged Posts Scraper?

Every tagged post is returned as one flat JSON row combining post identity, engagement, media URLs, and (when applicable) video/carousel/music detail:

| Field | Example Value | Use Case |
| --- | --- | --- |
| `pk` | `"3701234567890123456"` | Unique post ID for deduplication across runs |
| `id` | `"3701234567890123456_9876543210"` | Instagram's compound media ID |
| `code` | `"DAbCdEfGhIj"` | Shortcode used to build the post's URL |
| `media_type` | `2` | Numeric physical type: `1`=photo, `2`=video/Reel, `8`=carousel |
| `product_type` | `"clips"` | Distinguishes Reels (`clips`) from ordinary feed video/photo (`feed`) |
| `queriedUsername` | `"cristiano"` | Which target profile this tagged post belongs to (keeps multi-profile runs from mixing) |
| `permalink` / `postUrl` | `"https://www.instagram.com/p/DAbCdEfGhIj/"` | Direct, clickable link to the post |
| `postedAt` / `takenAt` | `"2026-06-01T14:22:03.000Z"` | When the post was actually published |
| `scrapedAt` | `"2026-07-25T09:10:00.000Z"` | When this row was collected |
| `user` | `{"pk":"123","username":"someposter"}` | Who tagged the target (the poster, not the target profile) |
| `owner` | `{"id":"123"}` | Post owner's numeric ID |
| `caption` | `{"text":"Amazing day! @cristiano"}` | Caption text for keyword/content analysis |
| `accessibility_caption` | `"Photo by someposter"` | Instagram's auto-generated alt text |
| `like_count` | `92345` | Engagement volume |
| `comment_count` | `1120` | Engagement volume |
| `view_count` | `184203` | Raw view count from the listing payload (also the `playCount` fallback source) |
| `display_uri` / `thumbnailUrl` / `thumbnails` | full-size / smallest / mid-size CDN URLs | Real image URLs computed from `image_versions2.candidates` — never a hardcoded null |
| `image_versions2` | `{"candidates":[...]}` | Raw image candidate list, largest-first |
| `original_height` / `original_width` | `1350` / `1080` | Media pixel dimensions |

#### Video, carousel and Reels media fields

Every Reel/video post (`media_type == 2`) additionally carries `videoUrl` (a direct, playable CDN link), `videoDuration` (seconds, parsed from the post's own DASH manifest), and `playCount` (falls back to the listing's `view_count` when Instagram's anonymous detail page doesn't expose a play count). Every carousel post (`media_type == 8`) carries `carousel_media_count` and a normalized `carouselChildren[]` array — one object per slide with `id`, `code`, `url`, `dimensions`, `displayUrl`, and `videoPlayCount` — alongside the original unparsed `carousel_media` field for compatibility. Reels also carry `musicInfo` (`audioCanonicalId`, `audioType`, `originalSoundInfo`) when the post's payload includes original-audio or licensed-track metadata; it is `null` on plain photos and posts with no detectable audio track.

#### Profile and media-type targeting fields

Three fields drive how you scope a run: `queriedUsername` tells you which target profile a row came from once results from several profiles land in one dataset; `media_type` (numeric) and `product_type` (`"feed"`/`"clips"`) tell you exactly which physical format and sub-format a row is, which matters once you've set `mediaTypeFilter` to narrow the run to one format at collection time rather than filtering after the fact.

### How does Instagram Tagged Posts Scraper differ from the official Instagram API?

The Instagram Graph API's `/{ig-user-id}/tags` edge returns media where an account was tagged — but only for the Instagram Business or Creator account that owns the access token, not for any arbitrary public profile you don't manage ([Meta for Developers, IG User reference](https://developers.facebook.com/docs/instagram-platform/instagram-graph-api/reference/ig-user/media/)).

| Feature | Instagram Graph API | Instagram Tagged Posts Scraper |
| --- | --- | --- |
| Account requirement | Target must be converted to a Business/Creator account, linked to a Facebook Page, and pass Meta app review | Works on any public profile — nothing to own or convert |
| Tagged-post access | `/tags` edge only returns tags for the token-owning account | Returns tagged posts for any public username you enter |
| Authentication | OAuth access token + `ads_management`/`business_management` scope | No login, session, or API key |
| Video/Reel media | Returned per the app's approved review scope | Direct `videoUrl`, `videoDuration`, `playCount` per Reel |
| Carousel media | Raw children edge, unparsed | Normalized `carouselChildren[]` per slide |
| Setup time | App creation, Page linking, review submission | Paste usernames and run |

#### Can I pull tagged posts for someone else's Instagram account with the official API?

No. The Graph API's tagging surface is scoped to the account that owns the access token — there is no official endpoint for fetching the tagged posts of a competitor, influencer, or any account you don't administer. That restriction exists because Meta ties the Graph API to accounts you can prove ownership/management of via a linked Facebook Page and app review, not to arbitrary public browsing. This Actor covers that gap by reading the same **Tagged** tab a logged-out browser sees for any public profile, resolving video/carousel/music detail per post via each post's own detail page.

Use the Graph API when you manage the account yourself and need an officially supported, ToS-compliant channel for your own data (e.g., publishing or moderating your own tags). Use this Actor when you need tagged-post data for public profiles you don't administer, without an app review process.

### How to use data extracted from Instagram?

#### Content research and repurposing

UGC and content teams run this Actor against their own or a partner's profile with `mediaTypeFilter` set to `video`, then sort the results by `playCount` to shortlist the best-performing Reels people tagged them in. `videoUrl` gives a direct link for review or download, `videoDuration` flags clip length for repurposing into shorter cuts, and `musicInfo` surfaces which audio track is driving a trend worth reusing.

#### Brand monitoring agencies

Agencies managing several client accounts run one job per reporting cycle across all client `targetProfiles`, and use `queriedUsername` to split results back out per client without mixing runs. Comparing `carouselChildren[].videoPlayCount` and `like_count`/`comment_count` across clients turns into a recurring tagged-content benchmark they can hand to each account team.

#### Market and trend research

Researchers pull tagged posts for a set of brand or niche profiles and aggregate `playCount`, `like_count`, and `musicInfo.audioCanonicalId` across the results to see which audio tracks and creators recur across a niche's tagged content, spotting emerging trends before they peak.

#### AI agents and automated pipelines

Agent frameworks call this Actor as a tool to fetch tagged-post context — caption text, engagement counts, and `permalink` — for a target brand, feeding it into a RAG pipeline or an automated brand-monitoring agent that needs fresh, structured Instagram context on demand rather than a manual export.

### 🔼 Input sample

All four inputs are optional — the Actor ships with working defaults for every field.

| Parameter | Required | Type | Description | Example Value |
| --- | --- | --- | --- | --- |
| `targetProfiles` | No | array | Instagram usernames, full profile URLs, or `@handles` to fetch tagged posts for. Multiple profiles are processed in one run. (Also accepts the base actor's `usernames` key.) | `["mrbeast", "https://www.instagram.com/cristiano/", "@leomessi"]` |
| `maxPostsPerProfile` | No | integer (0–10000) | Max tagged posts to collect per profile. `0` = collect all available. Default `10`. (Also accepts `maxItems`.) | `100` |
| `mediaTypeFilter` | No | string (enum: `all`, `video`, `carousel`, `photo`) | Restrict results to one media type. `all` keeps every post (default). | `"video"` |
| `proxyConfiguration` | No | object | Apify proxy settings. Left empty, the scraper falls back to a fresh Apify RESIDENTIAL proxy automatically — no hardcoded credentials. (Also accepts `proxy_configuration`.) | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` |

```json
{
  "targetProfiles": ["mrbeast", "https://www.instagram.com/cristiano/"],
  "maxPostsPerProfile": 20,
  "mediaTypeFilter": "all"
}
```

**Common pitfall:** `maxPostsPerProfile: 0` means "collect everything available," but it is not literally unbounded — the Actor's own pagination stops after 100 pages of 12 posts each (roughly 1,200 posts per profile), whichever comes first against Instagram's tagged feed running out. On a high-volume profile, don't assume `0` returns the entire historical tagged feed.

### 🔽 Output sample

Every row is typed, normalized JSON on a consistent schema, and is available through Apify's standard dataset export formats (JSON, CSV, Excel, XML, RSS). Below is a full record for a tagged Reel/video post.

```json
{
  "pk": "3701234567890123456",
  "media_type": 2,
  "code": "DAbCdEfGhIj",
  "id": "3701234567890123456_9876543210",
  "owner": { "id": "1234567" },
  "accessibility_caption": "Photo by someposter, standing on a beach",
  "caption": { "pk": "18123456789012345", "text": "Amazing day with @cristiano! #throwback" },
  "carousel_media_count": null,
  "display_uri": "https://scontent.cdninstagram.com/v/display.jpg",
  "carousel_media": null,
  "image_versions2": { "candidates": [{ "url": "https://scontent.cdninstagram.com/v/display.jpg", "width": 1080, "height": 1350 }] },
  "product_type": "clips",
  "thumbnailUrl": "https://scontent.cdninstagram.com/v/thumb.jpg",
  "thumbnails": [],
  "user": { "pk": "1234567", "username": "someposter", "id": "1234567" },
  "like_count": 92345,
  "like_and_view_counts_disabled": false,
  "comment_count": 1120,
  "comments_disabled": false,
  "view_count": 184203,
  "original_height": 1920,
  "original_width": 1080,
  "__typename": "XDTMediaDict",
  "postedAt": "2026-06-01T14:22:03.000Z",
  "takenAt": "2026-06-01T14:22:03Z",
  "scrapedAt": "2026-07-25T09:10:00.000Z",
  "queriedUsername": "cristiano",
  "permalink": "https://www.instagram.com/p/DAbCdEfGhIj/",
  "postUrl": "https://www.instagram.com/p/DAbCdEfGhIj/",
  "videoUrl": "https://scontent.cdninstagram.com/v/video.mp4",
  "videoDuration": 14.2,
  "playCount": 184203,
  "carouselChildren": [],
  "musicInfo": {
    "audioCanonicalId": "182736451920",
    "audioType": "original_sound",
    "originalSoundInfo": { "original_audio_title": "original audio" }
  }
}
```

Every returned row is billed as one charged `row_result` event — there is no separate uncharged error/accounting row to filter out, since the Actor only pushes data once it has successfully converted a post.

### How do you filter and target specific posts?

This Actor exposes three real controls, and each changes what lands in your dataset rather than just how it's labeled after the fact. **Query precision** comes from `targetProfiles`: it accepts a raw username, an `@handle`, or a full profile URL, so you don't need to normalize input format yourself, and you can list several profiles in one run — every row is stamped with `queriedUsername` so a multi-profile run never mixes one client's or brand's results into another's. **Media-type narrowing** comes from `mediaTypeFilter`, applied during collection rather than as a post-hoc filter you'd otherwise have to run yourself on the raw dataset: setting it to `video` keeps only Reels/video posts (populating `videoUrl`/`videoDuration`/`playCount`/`musicInfo`), `carousel` keeps only multi-slide posts (populating `carouselChildren[]`), and `photo` keeps single images only — useful when you only want, say, downloadable Reel links and don't want carousel or photo rows diluting the same dataset. **Volume control** comes from `maxPostsPerProfile`: it caps how deep the run goes per profile, and setting it to `0` collects everything available up to the Actor's own internal pagination ceiling of roughly 1,200 posts per profile (100 pages of 12 posts each), rather than being truly unlimited on very high-volume accounts. There are no quality thresholds on this Actor — no minimum-likes or minimum-play-count filter exists in the schema. Targeting here is entirely about which profile, which media format, and how many posts — combine all three to keep a run tightly scoped instead of pulling everything and filtering downstream yourself.

```json
{ "targetProfiles": ["mrbeast"], "mediaTypeFilter": "video", "maxPostsPerProfile": 50 }
```

```json
{ "targetProfiles": ["nike", "adidas"], "mediaTypeFilter": "carousel", "maxPostsPerProfile": 0 }
```

```json
{ "targetProfiles": ["brand1", "brand2", "brand3"], "mediaTypeFilter": "all", "maxPostsPerProfile": 10 }
```

### ▶️ Want to try other Instagram scrapers?

| Scraper Name | What it extracts |
| --- | --- |
| Instagram Tagged & Mentions Posts Scraper By Hashtag & Related Profiles | Tagged/mentioned posts plus optional hashtag/campaign discovery (authenticated) and real related-profile network expansion — broader discovery, no video/carousel-specific enrichment |
| Instagram Mentions Scraper: Sentiment Analysis | Inbound @-mentions with keyless caption sentiment scoring, topic/hashtag extraction, and optional AI enrichment |
| Instagram Single Reels Scraper | Full detail for individual Reel URLs — caption, engagement, video/thumbnail URLs, music metadata, and comments |
| Instagram Reels Scraper With Engagement Analytics | A creator's own Reels feed with co-author/sponsor detection and derived engagement-rate, velocity, and views-per-follower analytics |
| Instagram Hashtag Scraper: Content Planner | Turns a hashtag into a best-time-to-post histogram plus recurring caption keywords/themes (authenticated) |

### How to extract Instagram data programmatically

This Actor runs as a standard Apify Actor call — one REST request with your API token, JSON input, and a JSON dataset back.

#### Python example

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_API_TOKEN>")

run_input = {
    "targetProfiles": ["cristiano"],
    "mediaTypeFilter": "video",
    "maxPostsPerProfile": 20,
}
run = client.actor("<YOUR_USERNAME>/instagram-tagged-posts-scraper-videos-carousels-and-reels-info").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["permalink"], item["videoUrl"], item["playCount"])
```

#### MCP for AI agents

This Actor is reachable through Apify's own hosted MCP server. Connect an MCP client to `https://mcp.apify.com` (OAuth or an `Authorization: Bearer <APIFY_TOKEN>` header), or run it locally with `npx @apify/actors-mcp-server` (with `APIFY_TOKEN` set), preloading this Actor by its store ID (`<your-username>/instagram-tagged-posts-scraper-videos-carousels-and-reels-info`). A brand-monitoring agent can call it as a tool to pull a client's latest tagged Reels and carousels on demand. Compatible with Claude, Claude Code, and other MCP-aware agent frameworks.

#### Export to spreadsheets or CRM

Apify's dataset view exports directly to CSV or Excel from the Console, or via the API's `?format=csv` parameter. Map `queriedUsername`, `permalink`, `like_count`, `comment_count`, `videoUrl`, and `playCount` straight into spreadsheet columns, or into custom fields on a CRM/reporting tool that ingests CSV imports.

### Is it legal to scrape Instagram tagged posts?

Yes — scraping publicly visible Instagram posts, including the public Tagged tab, is generally lawful, since this Actor only reads what a logged-out browser can already see. That said, tagged posts routinely contain **personal data**: usernames, captions, and identifiable content tied to the tagged individual and the poster. If you store or process this data in the EU/UK or about EU/UK or California residents, GDPR and CCPA govern your lawful basis for collecting, storing, and using it — public availability does not by itself exempt you from those obligations. Keep collection proportionate to your stated purpose and avoid retaining data longer than needed. Consult legal counsel for commercial applications involving bulk storage of personal data.

### ❓ FAQ

**What happens if a tagged post is later deleted or un-tagged?** The Actor reflects Instagram's live Tagged tab at the moment you run it — a deleted post or a removed tag simply won't appear in your next run. There is no explicit "removed" flag; the Actor doesn't diff between runs itself.

**Can I get engagement metrics alongside the tagged posts?** Yes — `like_count`, `comment_count`, and `view_count`/`playCount` are returned on the same row as every post, at no extra pagination cost; there's no separate metrics-only endpoint to call.

**How accurate is the video URL and play count data?** It reflects Instagram's own public payload at scrape time. `playCount` specifically falls back to the listing's `view_count` when the anonymous post-detail page doesn't expose a dedicated play count for that post — the Actor never fabricates a number when Instagram's own surface doesn't provide one.

**How many tagged posts can I get per run?** Up to `maxPostsPerProfile` (max `10000`) per profile, or `0` for "all available" — bounded internally by the Actor's own pagination ceiling of 100 pages of 12 posts each (roughly 1,200 posts per profile).

**How do I get only Reels/video or only carousel posts?** Set `mediaTypeFilter` to `"video"` or `"carousel"`. It's applied during collection, not as a post-hoc filter, so the media-type breakdown of your dataset matches your setting exactly.

**Is scraping Instagram's public data itself legally settled?** Courts have generally distinguished scraping publicly accessible web data from unauthorized-access claims — most notably *hiQ Labs v. LinkedIn* (9th Cir. 2019, on remand after the Supreme Court's 2021 *Van Buren* decision, appeal resolved 2022), which found scraping public profile data does not violate the U.S. Computer Fraud and Abuse Act. This doesn't override a platform's own Terms of Service, which is a separate, contractual question.

**Does this work with Claude, ChatGPT, and AI agent frameworks?** Yes — it's reachable through Apify's hosted MCP server (`https://mcp.apify.com`) for MCP-aware clients like Claude, and callable as a plain HTTP/REST endpoint by any agent framework via the Apify API.

**How does this compare to other Instagram tagged-post scrapers?** Its source-level differentiator is resolving video/Reel/music fields via a per-post detail-page fallback (since the tagged-feed listing itself omits `taken_at`, `video_versions`, and music metadata) and normalizing carousel children into a stable shape, rather than leaving that data null or as raw unparsed JSON. No third-party competitor pricing or speed claims are made here, since none were independently verified at the time of writing.

**Can I use this without an Instagram API key or developer account?** Yes — no Instagram login, session cookie, or API key is required. You only need an Apify account to run the Actor itself.

### Conclusion

Instagram Tagged Posts Scraper: Videos, Carousels & Reels Info turns any public profile's Tagged tab into structured JSON — with the direct video URLs, normalized carousel breakdowns, and music info that a plain tagged-posts feed leaves null or unparsed. It's built for UGC/content teams, brand-monitoring agencies, and trend researchers who need tagged-post data for accounts they don't administer, without an Instagram login or Graph API app review. Set your target profiles and media-type filter, and run it directly from the Actor's page on Apify.

# Actor input Schema

## `targetProfiles` (type: `array`):

Instagram usernames, full profile URLs, or @handles to fetch TAGGED posts for.

Examples:
• mrbeast
• https://www.instagram.com/cristiano/
• @leomessi

Add multiple profiles to process them all in one run. (Also accepts the base actor's original 'usernames' key.)

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

Maximum number of tagged posts to collect per profile. Enter 0 to collect ALL available tagged posts.

Default: 10. (Also accepts the base actor's original 'maxItems' key.)

## `mediaTypeFilter` (type: `string`):

Optionally restrict results to one media type:
• all - keep every post (default)
• video - Reels/video posts only (populates videoUrl/videoDuration/playCount/musicInfo)
• carousel - multi-image/video carousel posts only (populates carouselChildren)
• photo - single-image posts only

## `proxyConfiguration` (type: `object`):

Configure Apify proxy settings. If left empty/disabled, the scraper automatically falls back to a fresh Apify RESIDENTIAL proxy (Instagram blocks Apify's datacenter IP ranges) — no hardcoded credentials are ever used. (Also accepts the base actor's original 'proxy\_configuration' key.)

## Actor input object example

```json
{
  "targetProfiles": [
    "ronaldo",
    "https://www.instagram.com/cristiano/",
    "@leomessi"
  ],
  "maxPostsPerProfile": 100,
  "mediaTypeFilter": "all",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items in the Actor's default dataset.

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

A single key-value-store record written at the end of the run: scrape timestamp, total result count, queried usernames, and the full results array.

# 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 = {
    "targetProfiles": [
        "mrbeast",
        "cristiano"
    ],
    "maxPostsPerProfile": 10,
    "mediaTypeFilter": "all",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("simpleapi/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 = {
    "targetProfiles": [
        "mrbeast",
        "cristiano",
    ],
    "maxPostsPerProfile": 10,
    "mediaTypeFilter": "all",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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