# Instagram Profile Posts API - Real-Time, No Login (`topapi/instagram-profile-posts-api`) Actor

Get a public Instagram profile and its latest posts in one HTTP request: followers, bio, links, plus each post's caption, date, likes, comments, reel plays, engagement rate, media URLs, music, tags and location. Date, type and likes filters, cursor paging. From code, n8n, Make and AI agents (MCP).

- **URL**: https://apify.com/topapi/instagram-profile-posts-api.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 1 monthly users, 71.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 post scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 📸 Instagram Profile Posts API - Real-Time, No Login

**Instagram Profile Posts API** returns a public Instagram profile and its latest posts in **one HTTP request**: no run
to start, no dataset to fetch. It is an Apify **Server Actor**, so it also works as a **tool for AI agents (MCP)** and as
one **HTTP Request** step in n8n, Make or Zapier.

Send a username (or a profile URL) and get back the profile summary (followers, following, bio, bio links, verified and
business flags, category, HD avatar) followed by up to 50 posts, newest first: caption, hashtags, mentions, date, likes,
comments, reel plays, engagement rate, image / video / audio URLs, carousel items, music, tagged users, co-authors and
location. **You pay per post and per profile summary returned**; a profile that does not exist costs nothing.

### ✨ What you get

- 👤 **Profile summary**: username, full name, bio, external URL and every bio link, followers, following, verified,
  private, business / professional flags, category, business address (when shown), avatar and HD avatar
- 📝 **Posts**: caption, hashtags, mentions, alt text, publish time, edited flag
- ❤️ **Engagement**: likes, comments, likes + comments, engagement rate against the owner's followers
- ▶️ **Reels**: play count on every reel, plays per follower, duration; video view counts on request
- 🖼️ **Media**: largest image, every image size, video URL, audio-only URL, carousel items with their own media
- 🎵 **Music** on reels, 🏷️ tagged users, co-authors, sponsors and paid-partnership flag, 📍 location
- 📌 Pinned posts flagged (or skipped with `skipPinnedPosts`)
- 💬 Latest comments per post on request
- 🧭 **Filters**: date window, post type (images, videos, carousels, reels), minimum likes, skip pinned
- 📄 **Paging**: `meta.nextCursor` returns the next posts of the same profile, with no gap and no repeat
- 🔑 No Instagram account, no cookies, no API key of yours (only your Apify token)

### 🚀 How to call it

Every request needs your **Apify API token** in the `Authorization` header.

#### GET

```bash
curl "https://topapi--instagram-profile-posts-api.apify.actor/profile?username=nasa&maxPosts=12" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>"
```

#### POST

```bash
curl -X POST "https://topapi--instagram-profile-posts-api.apify.actor/profile" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" -H "Content-Type: application/json" \
  -d '{"username": "https://www.instagram.com/natgeo/", "postType": "reel", "onlyPostsNewerThan": "30 days", "maxPosts": 20}'
```

#### Python

```python
import requests

URL = "https://topapi--instagram-profile-posts-api.apify.actor/profile"
HEADERS = {"Authorization": "Bearer <YOUR_APIFY_TOKEN>"}
params = {"username": "nasa", "maxPosts": 50}
profile, posts = None, []
for _ in range(3):                       # up to 150 posts
    r = requests.get(URL, params=params, headers=HEADERS, timeout=180)
    data = r.json()
    if r.status_code != 200:
        print(r.status_code, data["error"]["type"]); break
    for item in data["items"]:
        if item["type"] == "Profile":
            profile = item
        else:
            posts.append(item)
    if not data["meta"]["nextCursor"]:
        break
    params.update(cursor=data["meta"]["nextCursor"], includeProfile="false")
print(profile["followersCount"] if profile else None, len(posts), "posts")
```

#### JavaScript

```javascript
const res = await fetch(
    'https://topapi--instagram-profile-posts-api.apify.actor/profile?username=nasa&maxPosts=12',
    { headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}` } },
);
const { items, meta } = await res.json();
const [profile, ...posts] = items;          // the profile summary comes first
console.log(profile.followersCount, posts.length, meta.nextCursor);
```

#### n8n, Make, Zapier

One **HTTP Request** step: method `GET`, URL `https://topapi--instagram-profile-posts-api.apify.actor/profile`, query
parameters `username` and `maxPosts`, header `Authorization` = `Bearer <YOUR_APIFY_TOKEN>`. The profile and the posts
are `items` (the profile is the item with `type` = `Profile`).

#### AI agents (MCP)

MCP server URL: `https://topapi--instagram-profile-posts-api.apify.actor/mcp` (Streamable HTTP, header
`Authorization: Bearer <YOUR_APIFY_TOKEN>`). Tool: `get_profile_posts`, same parameters as the HTTP endpoint. Use
`compact: true` to give the model only the core post fields.

### ⚙️ Parameters

| Parameter | Type | Default | What it does |
|---|---|---|---|
| `username` | string | required | A username (`nasa`, `@nasa`) or a profile URL (`https://www.instagram.com/nasa/`). Also accepted as `user`, `profile`, `profileUrl`, `url`, `handle`. |
| `maxPosts` | integer | `12` | Posts to return, 0-50, newest first after the pinned posts. `0` = the profile summary only. |
| `includeProfile` | boolean | `true` | Return the profile summary as the first item. |
| `postType` | `all` | `image` | `video` | `carousel` | `reel` | `all` | One kind of post. `reel` reads the profile's Reels tab (every reel, plays on each); `video` = videos and reels. |
| `onlyPostsNewerThan` | string | | Only posts published on or after: `2026-09-01`, an ISO time, `7 days`, `2 months`, `today` or a day count. Also `since`. |
| `onlyPostsOlderThan` | string | | Only posts published before this time (same formats). Also `until`. |
| `minLikes` | integer | `0` | Only posts with at least this many likes (posts whose owner hides likes are kept). |
| `skipPinnedPosts` | boolean | `false` | Leave out the posts pinned to the top of the profile. |
| `includeVideoViewCount` | boolean | `false` | Add `videoViewCount` on videos and reels (one extra page per video, slower). Reel plays are always included. |
| `includeLatestComments` | boolean | `false` | Add up to 12 latest comments per post (`latestComments`, `firstComment`). They come with each post's own answer. |
| `compact` | boolean | `false` | Core post fields only, for AI agents. |
| `cursor` | string | | The previous response's `meta.nextCursor`, with the same `username` and `postType`, to read further. |

`GET /` lists the endpoints; the **Server** tab in Console shows the OpenAPI description.

### 📦 Response

A real answer to `GET /profile?username=nasa&maxPosts=3` (2026-11-18), trimmed: the profile summary, then the first
of the three posts (a pinned reel).

```json
{
  "ok": true,
  "count": 4,
  "items": [
    {
      "type": "Profile",
      "id": "528817151",
      "username": "nasa",
      "url": "https://www.instagram.com/nasa/",
      "fullName": "NASA",
      "biography": "Making the seemingly impossible, possible. ✨",
      "externalUrl": "https://www.nasa.gov",
      "bioLinks": [{ "title": "NASA.gov Homepage", "url": "https://www.nasa.gov", "linkType": "external", "isPinned": false }],
      "followersCount": 104327346,
      "followsCount": 91,
      "postsCount": null,
      "isPrivate": false,
      "isVerified": true,
      "isBusinessAccount": false,
      "isProfessionalAccount": true,
      "profilePicUrlHD": "https://scontent-atl3-1.cdninstagram.com/v/t51.2885-19/29090066_159271...",
      "hasActiveStory": true,
      "highlightReelCount": 6,
      "hasClips": true
    },
    {
      "id": "4025327901360909266",
      "type": "Video",
      "shortCode": "Dfc1mYxFevS",
      "url": "https://www.instagram.com/reel/Dfc1mYxFevS/",
      "caption": "Apply to become an astronaut!\n\nWe've opened applications to join NASA'...",
      "hashtags": ["nasa", "astronaut", "jobsearch"],
      "timestamp": "2026-11-07T18:35:41.000Z",
      "likesCount": 102238,
      "commentsCount": 1516,
      "engagementCount": 103754,
      "engagementRate": 0.099,
      "videoPlayCount": 4221508,
      "playsPerFollower": 0.0405,
      "displayUrl": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-15/892262107_1866...",
      "videoUrl": "https://scontent-atl3-2.cdninstagram.com/o1/v/t2/f2/m86/AQOaFZSzCK2cDi...",
      "audioUrl": "https://scontent-atl3-1.cdninstagram.com/o1/v/t2/f2/m78/AQNz9NHMV_haV1...",
      "videoDuration": 63.467,
      "productType": "clips",
      "isPinned": true,
      "musicInfo": { "audioType": "original_sounds", "songName": "Original audio" },
      "ownerUsername": "nasa",
      "ownerFollowersCount": 104327346,
      "searchSource": "profile"
    }
  ],
  "meta": {
    "username": "nasa", "followers": 104327346, "private": false, "posts": 3, "profileIncluded": true,
    "pages": 1, "read": 12, "detailCalls": 3, "filtered": {}, "unavailable": 0, "stopReason": "max_posts",
    "nextCursor": "eyJ2IjoxLCJ1IjoibmFzYSIsInMiOiJnIiwiYSI6bnVsbCwibyI6M30",
    "charged": { "profile-summary": 1, "post-scraped": 3 }, "ms": 1882
  }
}
```

| Field | Filled (141 posts and 11 profile reads from 7 public profiles, 2026-11-18) |
|---|---|
| `id`, `shortCode`, `url`, `type`, `timestamp`, `caption`, `likesCount`, `commentsCount`, `displayUrl`, `images`, `ownerUsername`, `ownerFullName`, `ownerProfilePicUrl` | 100% |
| `videoUrl`, `videoDuration`, `musicInfo` | 59% (every video and reel) |
| `audioUrl` | 57% |
| `videoPlayCount` | every reel of the profile's own (from its Reels tab) |
| `engagementRate` | every post of the profile's own (not on collab posts made from another account) |
| `hashtags`, `mentions` | 52%, 57% (posts that use them) |
| `taggedUsers`, `coauthorProducers` | 48%, 39% |
| `childPosts` | 21% (carousels) |
| `locationName` | 4% (posts tagged at a place) |
| `latestComments`, `videoViewCount` | with `includeLatestComments` / `includeVideoViewCount` (3 of 3 in the test) |
| Profile: `username`, `fullName`, `followersCount`, `followsCount`, `externalUrl`, `bioLinks`, `profilePicUrlHD`, `isVerified` | 100% |
| Profile: `biography` | 91% |
| Profile: `businessCategoryName`, `businessAddress` | when the account shows them (9% and 0% of this sample) |
| Profile: `postsCount` | never (Instagram hides it from signed-out visitors) |

### 🧾 Status codes (and what is charged)

| HTTP | `error.type` | Meaning | Charged |
|---|---|---|---|
| `200` | | Profile summary and / or posts returned | `profile-summary` per summary, `post-scraped` per post |
| `200` + `meta.private: true` | | A private account: its public summary only (with `includeProfile`) | `profile-summary` only |
| `400` | `invalid-input`, `invalid-cursor` | Bad parameter, date or cursor (a post link instead of a profile, `maxPosts` over 50...) | No |
| `404` | `profile-not-found` | No Instagram profile with this username | No |
| `404` | `private-account` | Private account and `includeProfile=false`: nothing public to return | No |
| `404` | `no-posts` | The profile has no public posts, or none passed your filters; `error.meta` shows what was read | No |
| `410` | `cursor-expired` | Instagram no longer accepts that cursor: start again without it | No |
| `429` | `too-many-requests` | More than 6 of your requests in flight at once | No |
| `503` | `blocked`, `timeout` | Instagram refused or did not answer; retry | No |

### 💰 Pricing

| Event | Price |
|---|---|
| Post returned (`post-scraped`) | **$0.0004** ($0.40 per 1,000) |
| Profile summary returned (`profile-summary`) | $0.001 |

A default call (profile + 12 posts) costs $0.0058. No start fee. Nothing is charged for `4xx` or `503` answers.

### 🗃️ Batch runs (input interface)

You can also start the actor as a normal run with lists of profiles, hashtags or post URLs: monitor mode (only new or
changed posts), keyword filters, Reels-tab mode and one dataset row per post, exactly like a batch scraper. Use the
HTTP endpoint for one profile at a time.

### ⏱️ Speed (measured on Apify, 2026-11-18)

- Profile summary only (`maxPosts=0`): 0.4-0.5 s on a warm server
- 1 post: 0.8-0.9 s; profile + 12 posts: 2-4.5 s; profile + 50 posts: 10-15 s
- First request after a quiet spell: add 2-5 s while the server starts and opens an Instagram session
- 8 requests at once (four of them 50 posts): all answered in full, 6-16 s each

### ⚠️ Limits

- Public profiles only. A private account returns its public summary (`meta.private: true`) and no posts.
- Instagram does not show signed-out visitors the profile's total post count: `postsCount` is `null`. Share counts are
  signed-in only and are not returned.
- Posts come from the profile grid, newest first after up to three pinned posts. Pinned posts are recognised by date
  (a pinned post within 48 hours of the newest post cannot be told apart).
- Reel plays come from the profile's Reels tab; a collab reel posted from another account may have no play count.
- `engagementRate` is filled only for the profile's own posts (a collab post's follower base is the co-author's).
- Image and video URLs are signed Instagram CDN links that expire after a few days: download what you keep.
- At most 50 posts and 25 grid pages per request; continue with `meta.nextCursor`.

### ❓ FAQ

#### Do I need an Instagram account or cookies?

No. The actor reads what Instagram shows a signed-out visitor. You only need your Apify token.

#### What does a call cost?

$0.0004 per post returned plus $0.001 for the profile summary. The default call (12 posts + profile) is $0.0058.
`maxPosts=0` returns the profile summary alone for $0.001; `includeProfile=false` skips it.

#### How do I get more than 50 posts?

Repeat the request with `cursor` set to the previous response's `meta.nextCursor` (and `includeProfile=false` so the
summary is not bought twice). The cursor continues exactly where the last response stopped.

#### How do I get only reels?

`postType=reel` reads the profile's Reels tab: every reel with its play, like and comment counts, caption, date, video,
audio and music.

#### How do I get only this week's posts?

`onlyPostsNewerThan=7 days` (or a date such as `2026-11-01`). The profile is read newest first, so the request stops as
soon as it passes the start of the window.

#### Can I paste a profile link instead of a username?

Yes: `https://www.instagram.com/nasa/`, `instagram.com/nasa/reels/`, `@nasa` and `nasa` all work. A post or reel link
answers `400`: this endpoint takes profiles.

#### What happens with a private or missing account?

A missing username answers `404 profile-not-found` and is free. A private account answers its public summary with
`meta.private: true` (charged as one profile summary), or `404 private-account` when `includeProfile=false`.

#### Why is a post's `videoViewCount` empty?

Instagram's view counter comes from a separate page per video: add `includeVideoViewCount=true`. Reel plays
(`videoPlayCount`) are always included.

#### Can AI agents use it?

Yes, as the MCP tool `get_profile_posts` at `/mcp`. `compact=true` keeps the answer small.

#### Is this legal?

The actor reads only public data that Instagram shows to any signed-out visitor. Profiles and posts can contain
personal data: use it in line with the GDPR and other laws that apply to you, and for legitimate purposes.

# Actor input Schema

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

Instagram usernames or profile URLs, e.g. "nasa", "@natgeo", "https://www.instagram.com/instagram/". Newest posts first (pinned first). With Content = Reels, every reel from the profile's Reels tab.

## `hashtags` (type: `array`):

Hashtags, keywords or tag URLs, e.g. "travel", "#foodie", "instagram.com/explore/tags/travel/". Read from Instagram's signed-out keyword page (mostly reels, 12 per page); rows carry searchTerm.

## `postUrls` (type: `array`):

Post / reel URLs or bare shortcodes, e.g. "https://www.instagram.com/p/Dd9RyBWBVih/", "https://www.instagram.com/reel/Dd9RyBWBVih/", "Dd9RyBWBVih". One row per URL.

## `postType` (type: `string`):

Reels reads a profile's Reels tab (also reels not shown in the grid) with plays, likes and comments on every row; on hashtags and URLs it keeps reels only. Carousels come back as type "Sidecar".

## `dataDetailLevel` (type: `string`):

For reels from a profile's Reels tab and for hashtags. Basic skips the per-reel detail request: no caption, date or media URLs, about 30x less data. Profile timelines always come detailed.

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

Absolute date (2026-09-01, 2026-09-01T12:00:00Z), relative (7 days, 3 weeks, 2 months) or a day count (1 = today's posts). Empty = no lower bound. Pinned posts are judged by their own date.

## `onlyPostsOlderThan` (type: `string`):

Absolute date or relative (e.g. 30 days). Combine with the field above for a window such as "2026-01-01" to "2026-06-30".

## `skipPinnedPosts` (type: `boolean`):

Leave out the posts and reels a profile pinned to the top of its grid or Reels tab (often old). They are counted in the run summary.

## `minLikes` (type: `integer`):

Keep only posts with at least this many likes, e.g. 10000 for hits only. 0 = no minimum. Posts whose owner hides like counts have likesCount null and are kept.

## `minPlays` (type: `integer`):

Keep only reels with at least this many plays, e.g. 100000 for viral reels. 0 = no minimum. Rows without a play count (photos, carousels) are dropped when this is set.

## `keywordFilter` (type: `string`):

Keep only posts whose caption, hashtags, tagged users, location, owner or song contain this word, case-insensitive, e.g. "giveaway" or "recipe, meal prep" (comma = any). Needs detailed data.

## `withLocationOnly` (type: `boolean`):

Keep only posts that carry a location tag (locationName, locationId, city). Useful for local lead lists and venue research. On a 30-post test sample 7% of posts had one.

## `includeVideoViewCount` (type: `boolean`):

Adds videoViewCount to every video and reel row: Instagram's view counter, separate from plays (views were a median 30% of plays on 100 test reels). Free. Skipped in Basic reel detail.

## `includeLatestComments` (type: `boolean`):

Adds latestComments (the newest 12-15 comments with author, time and likes) and firstComment to every row that has comments. Free; one extra request per row. Skipped in Basic reel detail.

## `includeProfileSummary` (type: `boolean`):

Adds one row of type "Profile" per scraped profile: followers, following, bio, links, verified / private / business flags, category, business address, HD avatar. Charged as profile-summary.

## `monitorMode` (type: `boolean`):

Remembers per profile / hashtag which posts were delivered (in the key-value store below). On a profile the run stops at the last run's newest post, so a daily check costs one page.

## `monitorDelivery` (type: `string`):

Changes re-reads the newest posts / reels of each profile (up to your per-target cap) and delivers those whose counts moved, with playCountDelta, likesDelta, commentsDelta. Profiles and URLs.

## `monitorStoreName` (type: `string`):

Key-value store that keeps the monitor memory. Give each separate feed (a client, a Slack channel) its own name so they do not hide posts from each other. Letters, digits, hyphens.

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

Cap per target after filters (your main cost control; you pay per delivered post). 0 = everything Instagram serves (10 posts per timeline page, 12 per reels or keyword page).

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

Hard cap for the whole run across all targets. 0 = no total cap (each target is still capped above).

## `compact` (type: `boolean`):

Core fields only (id, type, shortCode, url, caption, hashtags, timestamp, likes, comments, engagement, plays, views, media URL, duration, pinned, location, music, owner): sized for AI agents and MCP.

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

Apify datacenter proxies serve every request this actor makes (measured on profiles, reels tabs, keyword pages and single posts). A fresh proxy session is used when Instagram asks a session to wait.

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

How many per-post requests run at once (reel and keyword details, view counts, comments, post URLs). 4 is a safe default; raise to 8 for big URL lists.

## Actor input object example

```json
{
  "usernames": [
    "nasa"
  ],
  "hashtags": [],
  "postUrls": [],
  "postType": "all",
  "dataDetailLevel": "detailedData",
  "skipPinnedPosts": false,
  "minLikes": 0,
  "minPlays": 0,
  "keywordFilter": "",
  "withLocationOnly": false,
  "includeVideoViewCount": true,
  "includeLatestComments": false,
  "includeProfileSummary": false,
  "monitorMode": false,
  "monitorDelivery": "new",
  "monitorStoreName": "instagram-posts-monitor",
  "resultsLimit": 12,
  "maxItems": 0,
  "compact": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 4
}
```

# Actor output Schema

## `posts` (type: `string`):

The dataset of Instagram posts (one item per post, reel or carousel; profile summary rows have type Profile).

## `summary` (type: `string`):

Per-target counts (read, filtered, already delivered, delivered), requests made, sessions used and bytes transferred. Written for runs started in the Console, runs of 25 or more posts and runs where a target failed; the same counts are in every run's log.

# 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": [
        "nasa"
    ],
    "resultsLimit": 12
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/instagram-profile-posts-api").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": ["nasa"],
    "resultsLimit": 12,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/instagram-profile-posts-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "usernames": [
    "nasa"
  ],
  "resultsLimit": 12
}' |
apify call topapi/instagram-profile-posts-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/instagram-profile-posts-api"
        }
    }
}
```

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/P2ciMY37WWhPNq1uL/builds/eQL3fCHFVKeYMI8bn/openapi.json
