# Instagram Profile & Posts Scraper (`fetch_cat/instagram-profile-posts-scraper`) Actor

Export public Instagram profile details, recent posts and reels, captions, engagement counts and available media URLs from handles or direct URLs.

- **URL**: https://apify.com/fetch_cat/instagram-profile-posts-scraper.md
- **Developed by:** [Fetch Cat](https://apify.com/fetch_cat) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 265 total users, 36 monthly users, 95.1% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.03 / 1,000 item extracteds

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

Export public Instagram profile details and available post or reel metadata from handles, profile URLs, or direct media URLs. Get captions, engagement counts and exposed image/video URLs in structured rows for creator research, brand comparisons and content archives—without login or cookies.

Public access varies. This Actor does not download media files, bypass login requirements, or guarantee a complete account archive.

### Quick start

1. Open the Actor and enter a public handle in **Profile URLs or handles**, or paste a public post/reel URL in **Direct post or reel URLs**. Clear the other example field if you do not want both modes.
2. Start small: one profile and up to five posts, or one direct URL.
3. Start the run, inspect the dataset, then export JSON, CSV or Excel. Check the run summary for inputs that returned no usable records.

```json
{
  "profileUrlsOrHandles": [
    "nasa"
  ],
  "maxProfiles": 1,
  "includePosts": true,
  "maxPostsPerProfile": 5
}
```

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

https://youtu.be/1OW8gOqlZbY?t=25

### Ready-to-run examples

Choose a public example to see its settings before starting a run:

- [Download every image from an Instagram carousel post](https://apify.com/fetch_cat/instagram-profile-posts-scraper/examples/instagram-image-carousel-posts)
- [Scrape Instagram profile metadata only](https://apify.com/fetch_cat/instagram-profile-posts-scraper/examples/instagram-profile-metadata-only)
- [Compare National Geographic and NASA Instagram posts](https://apify.com/fetch_cat/instagram-profile-posts-scraper/examples/instagram-natgeo-nasa-posts-compare)

### What you get

- **Profile research:** public names, bios, links, follower/following/post counts, verification and available business metadata.
- **Content comparisons:** captions, hashtags, mentions, timestamps, like/comment counts and available video metrics.
- **Creative references:** exposed carousel assets, image URLs, video URLs, thumbnails and available audio attribution.

Fields depend on what Instagram exposes. Missing values remain null or empty. A visible count does not mean the Actor retrieves comment text or follower lists.

### Who is it for?

- **Creator-research teams** reviewing known public account details and available media.
- **Brand analysts** comparing their own profile and post exports.
- **Content librarians** retaining exposed media links and caption context rather than downloaded files.
- **Data and automation developers** routing different profile and media row types into their own systems.

### How you can use the data

- **Review one known public profile.** Use the existing nasa input with one profile and up to five media rows, clearing unwanted direct-URL prefills. Keep profile identity and type with each row because one profile can produce both a profile row and media rows.
- **Choose a profile-only snapshot.** Disable includePosts or set the per-profile post cap to zero for known profiles. Direct URL inputs are still processed independently, so clear them when only profiles are intended.
- **Inspect a known post's exposed assets.** Use the supplied DalfZ3Jn8yi direct post with a one-direct-URL cap. Keep available mediaAssets and flattened links, preserving carousel order when exposed. These are source URLs rather than downloaded image/video files or every possible rendition.
- **Compare your own dated samples.** Use the existing relative seven-day media cutoff where appropriate, then retain identifiers, dates, types and collection times in your own destination. Date filters affect media while profile rows remain. The Actor does not build a history database, calculate changes or provide complete account archives.

### Input settings

| Setting | JSON key | Purpose |
| --- | --- | --- |
| Profile URLs or handles | `profileUrlsOrHandles` | Public usernames or profile URLs. |
| Direct post or reel URLs | `postUrls` | Public `/p/`, `/reel/` or `/tv/` URLs. |
| Maximum profiles | `maxProfiles` | Limit unique profiles, up to 100. |
| Maximum posts per profile | `maxPostsPerProfile` | Up to 50 media rows per profile. Zero keeps profile rows only. |
| Maximum direct URLs | `maxDirectUrls` | Limit unique direct media inputs, up to 100. |
| Include recent posts | `includePosts` | Control profile-discovered media. Direct URLs are still processed. |
| Include reels/videos | `includeReels` | Include standalone videos discovered from profiles. Does not filter direct URLs. |
| Date bounds | `onlyPostsNewerThan`, `until` | Inclusive media date filters. Profile rows remain. |
| Proxy configuration | `proxyConfiguration` | Keep the existing managed configuration or supply your own settings. See field help. |
| Target aliases | `handles`, `username`, `usernames`, `directUrls`, `startUrls` | Merged with canonical targets and deduplicated before caps. `username` is one string; other aliases are lists. `startUrls` also accepts `{ "url": "..." }` entries. |
| Media-cap aliases | `postsPerProfile`, `max_posts`, `resultsLimit` | Smallest supplied per-profile media cap wins, never raising `maxPostsPerProfile`. Not global row or target-count limits; each direct URL still returns at most one media row. |
| Compatibility settings | `resultsType`, `addParentData`, `maxItems`, `maxConcurrency` | Only `resultsType: "posts"` is supported and still returns profile rows. `addParentData` warns without changing fields; concurrency is retained but ignored. `maxItems` is unsupported and exits without extraction rather than exceeding a requested global row limit. |

Profile and direct inputs can be combined and are deduplicated. Canonical targets precede aliases when caps truncate a list. Missing/invalid targets or unsupported constraints finish with an explicit `INVALID_INPUT` warning and a no-extraction reason in `RUN_SUMMARY`, without manual startup/item charges. Mixed valid/invalid targets retain valid extraction and per-input warnings. There is no required mode selector: provide at least one valid target. Date bounds must be valid and the lower bound must not exceed the upper bound. No input supplied through an API call means no targets. Form examples are not API defaults.

#### Example inputs

One profile with a small recent-post limit:

```json
{
  "profileUrlsOrHandles": ["nasa"],
  "maxProfiles": 1,
  "includePosts": true,
  "maxPostsPerProfile": 5
}
```

One direct post:

```json
{
  "postUrls": ["https://www.instagram.com/p/DalfZ3Jn8yi/"],
  "maxDirectUrls": 1
}
```

For profile metadata only, set `includePosts` to `false`. For media from the past week, use `onlyPostsNewerThan: "7 days"`.  `until` accepts an ISO date/time. Filters can reduce the number of saved posts below your maximum. Date/type-filtered logged-out timeline recovery follows up to 64 pages (at most 3,200 available posts) within 90 seconds and 64 MiB of cumulative decoded responses, subject to the overall run deadline. Unfiltered recovery keeps its smaller existing bounds. An incomplete scan is not reported as proof of no matches. Collaborative posts retain their original author attribution. Decoded responses, JSON structure, selected fields and detail concurrency are bounded; oversized source data retains an actionable diagnostic rather than silently truncating required media. There is no user-selectable sort order.

Processing has an independent four-minute baseline budget, scaled for direct-media batches to at most fifteen minutes (nine seconds per requested direct URL). The configured run timeout still takes precedence, including cleanup reserve; the default five-minute run setting is unchanged. For large serial batches, configure a longer run timeout (for example, twenty minutes for 100 URLs). This is a finite work allowance, not a guarantee against upstream delays. Incomplete extraction remains a failure with saved progress.

Customer max-cost and short-timeout stops succeed with saved rows preserved and a `limitStop` reason in `RUN_SUMMARY`. Insufficient budget stops before startup billing or further extraction. Source failures and incomplete extraction caused by the Actor's own bounds remain diagnostics, not successful no-match results.

### Output data

The dataset contains profile and media rows, not diagnostic rows. This abbreviated, illustrative shape shows field names—not an observed result or a guarantee of field availability:

```json
{
  "input": "nasa",
  "profileUrl": "https://www.instagram.com/nasa/",
  "username": "nasa",
  "type": "profile",
  "fullName": null,
  "biography": null,
  "followersCount": null,
  "imageUrls": [],
  "mediaAssets": []
}
```

| Fields | Meaning |
| --- | --- |
| `input`, `profileUrl`, `username`, `scrapedAt` | Input attribution, public identity and collection time. |
| `fullName`, `biography`, `externalUrl`, `profilePicUrl` | Available public profile details. |
| `followersCount`, `followingCount`, `postsCount` | Visible profile totals. |
| `isVerified`, `isPrivate`, `isBusinessAccount`, `isProfessionalAccount`, `categoryName` | Account flags/category when exposed. |
| `businessEmail`, `businessPhoneNumber` | Public business contacts when exposed. |
| `type`, `postId`, `shortCode`, `postUrl` | Profile/media type and media identity. |
| `caption`, `hashtags`, `mentions`, `timestamp` | Available text, tags and publication time. |
| `likesCount`, `commentsCount`, `videoViewCount`, `videoPlayCount` | Available engagement metrics. |
| `mediaAssets`, `mediaUrls`, `imageUrls`, `videoUrls` | Exposed assets and flattened URL arrays. Carousel order is preserved when available. |
| `highestResolutionImageUrl`, `videoUrl`, `thumbnailUrl` | Convenient available image, video and thumbnail URLs. |
| `videoDurationSeconds`, `hasAudio`, `audioArtist`, `audioTitle`, `isOriginalAudio` | Available video/audio details. |

A media row may have `type` equal to `post`, `image`, `carousel` or `video`. Asset entries contain position, type, URL and available dimensions, thumbnail and duration. The best image is chosen from available source candidates, not every possible Instagram rendition. Media URLs can expire.

Per-input outcomes are in the default key-value store's `RUN_SUMMARY.inputResults`. Saved inputs report their count. Empty inputs report a reason/message and HTTP status when available. Summary status is `empty`, `succeeded`, `partial` or `failed`. Completed lookups with no usable matches and unavailable targets can succeed empty. A failed lookup alone does not establish that an account is private or deleted. Mixed batches retain useful records. Fatal storage, billing, execution and systemic extraction failures still fail.

#### Download your results

Open your run's dataset, choose **Export** and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See [Apify's download and export guide](https://docs.apify.com/storage/dataset#apify-console) for the available formats and field options.

### Pricing

The `start` event is charged once when a run starts, including runs without results. The `item` event is charged for each saved profile or media row. A profile can produce one profile row plus its media rows, while diagnostic outcomes do not create dataset rows or item charges.

The per-row `item` price increases on 27 November 2026 at 16:00 UTC for every Apify plan; the `start` fee is unchanged. Current prices apply until then.

Use small explicit profile, per-profile media and direct-URL caps. See the live [Pricing tab](https://apify.com/fetch_cat/instagram-profile-posts-scraper/pricing) for current and upcoming rates and discounts.

### Tips for best results

- **Clear the example input mode you do not want.** Profiles and direct URLs can otherwise be combined in one run.
- **Keep row type with public identity fields.** Profile and media records have different field coverage and both can count as saved items.
- **Set small explicit caps for each selected mode.** Maxima do not promise matching record counts or full archives.
- **Keep exposed carousel asset order when useful.** The best image is selected from available candidates rather than every rendition.
- **Inspect per-input summary outcomes before comparing exports.** Empty or unavailable results are not proof of deletion or privacy.

### Limits and caveats

Only public profile details and available recent or directly requested media are supported. No login or cookies are accepted, and login requirements are not bypassed. Private posts, messages, login-only stories and highlights, follower lists, full comment threads and hashtag discovery are outside scope.

Instagram can restrict access or omit fields depending on account, region and request context. Missing values remain null or empty. Media links can expire, no files are stored by this Actor, and full account or asset archives are not guaranteed. Available counts do not mean related comments or follower identities were retrieved.

The existing profile/direct and date controls have separate scope. Include-posts and include-reels settings affect profile-discovered media rather than suppressing direct URLs, and date filters leave profile rows. Inputs are deduplicated, valid targets are required, and there is no selectable sort order.

RUN_SUMMARY.inputResults records saved counts or completed-input reasons, with summary outcomes distinct from a complete archive claim. Completed lookups with no usable matches and unavailable targets can succeed empty, and useful mixed-batch rows remain. Fatal storage, billing, execution and systemic extraction failures still fail. Repeat-export comparisons and alerts are downstream work.

### Automation and integrations

#### Save your settings for next time

Once you have an input that works for you, [save it as an Apify task](https://docs.apify.com/actors/running/tasks). This keeps your settings together so you can use them again without filling in the form from scratch.

#### Run on a schedule

Need fresh results regularly? You can [schedule the Actor or a saved task](https://docs.apify.com/actors/running/schedules) to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

#### Send results to your other tools

Use **n8n, Make or Zapier** to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the [Apify integration guides](https://docs.apify.com/integrations) for your chosen tool.

For a custom connection, an [Apify webhook](https://docs.apify.com/integrations/webhooks) can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

### API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its `defaultDatasetId` to fetch the results.

For setup instructions, see Apify's [JavaScript client guide](https://docs.apify.com/api/client/js), [Python client guide](https://docs.apify.com/api/client/python) and [Actor runs API reference](https://docs.apify.com/api/v2/acts-runs-post).

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~instagram-profile-posts-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "profileUrlsOrHandles": [
    "nasa"
  ],
  "maxProfiles": 1,
  "includePosts": true,
  "maxPostsPerProfile": 5
}
JSON
```

#### Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/instagram-profile-posts-scraper').call({
  "profileUrlsOrHandles": [
    "nasa"
  ],
  "maxProfiles": 1,
  "includePosts": true,
  "maxPostsPerProfile": 5
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/instagram-profile-posts-scraper').call(run_input={'profileUrlsOrHandles': ['nasa'], 'maxProfiles': 1, 'includePosts': True, 'maxPostsPerProfile': 5})
print(client.dataset(run['defaultDatasetId']).list_items().items)
```

#### API and integrations notes

This asynchronous endpoint returns a run record. Wait for completion and retrieve items from its `defaultDatasetId`. It does not return the dataset inline.

### MCP and AI agents

You can ask your AI assistant to collect data with **Instagram Profile & Posts Scraper** and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the [Apify MCP server](https://mcp.apify.com/). MCP gives your assistant a way to find this scraper, run it and read the results. Follow the [official setup and sign-in guide](https://docs.apify.com/mcp) for your app.

#### Easier setup with an Apify plugin

If you use a supported coding assistant, the [official Apify plugin](https://docs.apify.com/agents/plugins) can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

#### Use Apify AI in Console

Prefer to keep everything in Apify? Open [Apify AI in Console](https://docs.apify.com/account/apify-ai) and ask it to find Fetch Cat's **Instagram Profile & Posts Scraper**. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

#### Choose your assistant

- **Claude and Claude Code (Anthropic):** [Apify setup guide](https://docs.apify.com/integrations/claude).
- **ChatGPT and Codex (OpenAI):** [Apify setup guides](https://docs.apify.com/integrations/openai).
- **Grok Bot (xAI):** [Apify plugin guide](https://docs.apify.com/integrations/grok-bot).
- **Gemini CLI (Google):** [MCP server setup guide](https://geminicli.com/docs/tools/mcp-server/). Use the server URL below with the HTTP configuration supported by Gemini CLI.

#### Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/instagram-profile-posts-scraper"
    }
  }
}
```

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

#### Use Apify's general server

Already connected to the general Apify MCP server at `https://mcp.apify.com`? You can use it to find this scraper without adding another server. Ask your assistant to use **Instagram Profile & Posts Scraper** by Fetch Cat, or give it the identifier `fetch_cat/instagram-profile-posts-scraper`.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

#### Example requests

- “Use Fetch Cat’s Instagram Profile & Posts Scraper to collect nasa with one profile and up to 3 posts, clearing direct-URL inputs. Keep profile and media row types separate and report per-input summary outcomes without claiming a complete archive.”
- “Retrieve public profile metadata for nasa with one-profile cap and profile posts off, clearing direct URLs. Show available biography and public counts, leaving missing fields unknown.”
- “Collect the direct post https://www.instagram.com/p/DalfZ3Jn8yi/ with a one-direct-URL cap and no profile inputs. Keep available captions and exposed media assets in source order without downloading files or promising every rendition.”

Normal Apify charges apply. Check the [live Pricing tab](https://apify.com/fetch_cat/instagram-profile-posts-scraper/pricing) before asking your assistant to run a larger batch.

### Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through [x402](https://docs.apify.com/integrations/x402). This experimental option lets an agent use Apify without a conventional account.

[Apify AGI](https://agi.apify.com/) provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

#### Other ways for agents to pay

Apify also supports **MPP** for prepaid access through AGI and **Skyfire** for eligible Actors. If your agent already uses one of these, see the [agentic payment guide](https://docs.apify.com/agents/payments) to choose the right setup.

### FAQ

#### Can I download every post or every image from a profile?

No complete archive is guaranteed. Profile mode returns available recent media up to your cap. Direct URLs collect available assets for the supplied posts. The Actor returns media URLs, not downloaded files.

#### Why did a public handle return no rows?

The target may be unavailable or Instagram may restrict anonymous access. Read `RUN_SUMMARY` for the recorded reason. Inaccessibility alone does not prove privacy or deletion. Try a small public input before expanding the list.

#### Do I need login cookies or an official Instagram API account?

No. This is an independent public-data Actor, not an official Instagram API. It does not accept login cookies or retrieve login-only content.

#### Can I export to Excel or automate comparisons?

Yes. Export the dataset in Excel, CSV or JSON, or retrieve it through the API. Apify can schedule repeated runs if you configure a schedule yourself. Comparisons and alerts belong to your downstream workflow.

### Related Actors

#### More Instagram scrapers

- [Instagram Stories & Highlights Scraper](https://apify.com/fetch_cat/instagram-stories-highlights-scraper) — Collect accessible story and highlight records using your own authorized Instagram session. This does not bypass private-profile permissions.
- [Instagram Post Details Scraper](https://apify.com/fetch_cat/instagram-post-details-scraper) — Collect available captions, author details, dates and visible engagement from known public post URLs.
- [Instagram Related Profiles Scraper](https://apify.com/fetch_cat/instagram-related-profiles-scraper) — Collect direct related-profile suggestions from seed accounts, with available public identity fields.
- [Instagram Reel Scraper](https://apify.com/fetch_cat/instagram-reel-scraper) — Collect available public video metadata from known Instagram Reel URLs.

* [Threads Profile Posts Scraper](https://apify.com/fetch_cat/threads-profile-posts-scraper) — Public profile and post data for cross-channel research.

### Support and feedback

For custom additions or integrations, email <hello@fetchcat.dev>.

Found an error or have a feature request? [Open an issue](https://apify.com/fetch_cat/instagram-profile-posts-scraper/issues) with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See [Apify’s guide to sharing a run when reporting an issue](https://docs.apify.com/account/collaboration/general-resource-access#automatically-sharing-runs-via-actor-issues). Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. [Leave a review](https://apify.com/fetch_cat/instagram-profile-posts-scraper/reviews) to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥

# Changelog

This Actor's version history is a separate document: https://apify.com/fetch_cat/instagram-profile-posts-scraper/changelog.md

# Actor input Schema

## `profileUrlsOrHandles` (type: `array`):

Public Instagram usernames or profile URLs. You can include or omit the @ sign.

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

Public Instagram /p/, /reel/, or /tv/ URLs. Each result includes every exposed carousel asset and highest-resolution image/video URLs.

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

Hard maximum recent post/reel records saved per profile.

## `maxDirectUrls` (type: `integer`):

Hard maximum number of unique direct post/reel URLs processed.

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

Inclusive lower date bound. Use an ISO date/time or a relative value such as 7 days, 2 weeks, or today. Profile rows are not filtered.

## `includeReels` (type: `boolean`):

Include video or reel-like results discovered through profile mode. Direct reel URLs are always processed.

## `until` (type: `string`):

Inclusive upper date bound as an ISO date/time. Profile rows are not filtered.

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

Accepted for existing inputs, but does not change execution concurrency. There is no supported user-selectable parallelism control.

## `maxProfiles` (type: `integer`):

Hard maximum number of unique profiles processed.

## `includePosts` (type: `boolean`):

Save recent public posts returned with each profile. Direct post/reel URLs are always processed.

## `handles` (type: `array`):

Backward-compatible alias for Profile URLs or handles.

## `username` (type: `string`):

One public handle or profile URL. Merged with all other target fields and deduplicated before caps.

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

Public handles or profile URLs. Merged with canonical targets; canonical entries take priority when capped.

## `directUrls` (type: `array`):

Public profile, post, reel or TV URLs (handles also accepted). Classified automatically, merged and deduplicated before caps.

## `postsPerProfile` (type: `integer`):

Additional per-profile media cap. The smallest supplied canonical or alias cap wins.

## `max_posts` (type: `integer`):

Additional per-profile media cap. The smallest supplied canonical or alias cap wins.

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

Additional per-profile media cap (not a global row or target-count limit). Cannot raise maxPostsPerProfile. Profile rows are additional; each direct media URL still returns at most one media row.

## `resultsType` (type: `string`):

Only posts is supported; normal profile and media output is retained. Other scraper modes are not supported.

## `addParentData` (type: `boolean`):

Accepted with a warning only. Does not change this Actor's fixed output fields.

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

Not supported. If supplied, the run exits without extraction and explains how to use maxProfiles, maxDirectUrls and maxPostsPerProfile. Never silently exceeds a requested global row limit.

## `startUrls` (type: `array`):

Backward-compatible URL list. Profile, /p/, /reel/, and /tv/ URLs are classified automatically.

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

Managed Apify Proxy is enabled in the form by default. Existing automatic public-access attempts and proxy recovery remain in place; there is no separate connection-mode selector. Explicit custom proxy URLs, managed groups/country and useApifyProxy: false are respected. Single-profile recovery can use residential proxies when no group or custom proxy is selected, defaulting to US while preserving a selected country. Bulk/mixed inputs keep their existing routing. Omitting this field preserves the Actor's existing automatic behavior. Proxy usage can incur platform charges. Supply a valid configuration; unsupported values are not a connection mode.

## Actor input object example

```json
{
  "profileUrlsOrHandles": [
    "nasa"
  ],
  "postUrls": [
    "https://www.instagram.com/p/DalfZ3Jn8yi/"
  ],
  "maxPostsPerProfile": 12,
  "maxDirectUrls": 20,
  "includeReels": true,
  "maxConcurrency": 1,
  "maxProfiles": 2,
  "includePosts": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {
    "profileUrlsOrHandles": [
        "nasa"
    ],
    "postUrls": [
        "https://www.instagram.com/p/DalfZ3Jn8yi/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/instagram-profile-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 = {
    "profileUrlsOrHandles": ["nasa"],
    "postUrls": ["https://www.instagram.com/p/DalfZ3Jn8yi/"],
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/instagram-profile-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 '{
  "profileUrlsOrHandles": [
    "nasa"
  ],
  "postUrls": [
    "https://www.instagram.com/p/DalfZ3Jn8yi/"
  ]
}' |
apify call fetch_cat/instagram-profile-posts-scraper --silent --output-dataset

```

## MCP server setup

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