# Instagram Intelligence Suite (`qaseemiqbal/instagram-intelligence-suite`) Actor

Scrape public Instagram profiles, posts, reels, comments, hashtags, keywords, locations, followers, and following lists.

- **URL**: https://apify.com/qaseemiqbal/instagram-intelligence-suite.md
- **Developed by:** [Muhammad Qaseem Iqbal](https://apify.com/qaseemiqbal) (community)
- **Categories:** Social media, Videos, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 results

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

Collect public Instagram data for research, monitoring, influencer discovery, and content analysis. Enter Instagram usernames, post URLs, reel URLs, hashtags, or location URLs, and get clean, structured results you can download or send to your tools.

This Actor is designed for people who want useful Instagram data without building their own scraper or working with raw page code.

### What can Instagram Intelligence Suite do?

Instagram Intelligence Suite helps you collect public data from Instagram pages such as:

* Profile details, including username, full name, profile URL, follower count, following count, post count, profile picture, and public account flags when available
* Public posts, reels, videos, and carousel-style media found on profile, hashtag, or location pages
* Captions, hashtags, mentions, media URLs, and engagement metrics when Instagram exposes them publicly
* Public comments and replies when they are included in the public page data
* Hashtag and location discovery results from public Instagram pages
* Clean JSON records that are easy to export to CSV, Excel, Google Sheets, databases, dashboards, or automation tools

The Actor only works with public Instagram data. It does not log in to Instagram, bypass private accounts, or access private content.

### Why use this Actor?

You can use Instagram Intelligence Suite to:

* Track public brand mentions and campaign hashtags
* Find posts and reels around a niche, topic, event, or location
* Research influencers, creators, and public profile activity
* Collect user-generated content for review or reporting
* Monitor engagement on public posts and reels
* Export public Instagram data for analysis in spreadsheets or BI tools
* Build automated workflows with Apify integrations, APIs, schedules, and webhooks

### Profile research use cases

Profile scraping is useful when you want a quick public snapshot of an Instagram account.

For example, you can use profile targets to:

* Check public follower, following, and post counts
* Review bios, profile names, profile images, websites, and business categories when available
* See whether a public account is verified, private, or marked as a business account
* Compare creators, brands, competitors, or public organizations
* Build a list of public profiles for market research, influencer discovery, or reporting

You can enter a username such as `nasa`, an `@username`, or a full profile URL such as `https://www.instagram.com/nasa/`.

### Hashtag and discovery use cases

Hashtag discovery is useful when you want to understand what people are posting around a topic, campaign, event, product category, or community.

For example, you can use a hashtag target to:

* Collect public posts and videos connected to a campaign hashtag
* Find creators posting in a specific niche
* Review captions, mentions, and related hashtags
* Compare engagement across public content in a topic area
* Build a content library for reporting or manual review

You can enter hashtags with or without the `#` symbol. For simple keyword targets, the Actor can treat plain words such as `birdsofinstagram` like hashtags. Broad free-form Instagram search is different and is listed in the limitations section below.

### Reels and video use cases

Reel scraping is useful when you want to track short-form video content, campaign performance, creator activity, or competitor posts.

For example, you can use reel and video targets to:

* Scrape a direct public reel URL
* Discover public reels from profile, hashtag, or location pages when Instagram exposes them
* Review captions, hashtags, mentions, owner details, timestamps, and engagement metrics
* Collect public video URLs, display images, duration, dimensions, and music information when available
* Save supported videos or images to Apify storage by turning on `downloadMedia`
* Run the Actor on a schedule to compare public metrics over time

The Actor does not create video transcripts itself. It can only return transcript-related fields when Instagram exposes that information in the public page data.

### Comment analysis use cases

Comment scraping is useful when you want to understand how people are reacting to a specific public post or reel.

For example, you can use comment targets to:

* Collect public comment text from a direct post or reel URL
* Include public replies when they are available
* Review commenter usernames, timestamps, likes, reply counts, and comment URLs
* Monitor feedback on campaigns, launches, creator partnerships, or competitor content
* Export comments for manual review, moderation support, reporting, or sentiment analysis in another tool

Instagram does not always include full comment threads in public page data. Direct post or reel URLs usually work best for comments, but the number of comments can still vary.

### What Instagram data can I extract?

The output depends on what Instagram makes available on the public page at the time of the run. Typical records can include:

| Record type | What it contains |
| --- | --- |
| `profile` | Username, profile URL, full name, follower count, following count, post count, profile image, verification/private flags when public |
| `media` | Post or reel URL, shortcode, caption, hashtags, mentions, owner, media image/video URL, view count, play count, likes, comments, duration, music info, location, and public flags when available |
| `comment` | Comment ID, text, owner username, owner profile image, likes, timestamp, position, replies, reply count, comment URL, and post URL when available |
| `hashtag` | Hashtag URL, normalized tag, observed media count, and related tags when available |
| `location` | Location ID or URL, location name, observed media count, and media records when available |
| `error` | A clear explanation when Instagram does not expose the requested public data |

Common media fields include captions, hashtags, mentions, public creator information, image URLs, video URLs, downloaded media URLs, view counts, play counts, like counts, comment counts, timestamps, durations, dimensions, music information, locations, tagged users, latest public comment previews, and public content flags when Instagram includes them.

Common profile fields include username, profile URL, full name, biography, external website URL, follower count, following count, post count, highlight count, business category, public/private status, verification status, profile image URL, and public "about" details when Instagram exposes them.

### How to use Instagram Intelligence Suite

1. Click **Try for free** or **Run** on the Actor page.
2. Add one or more Instagram targets, such as a username, post URL, reel URL, hashtag, or location URL.
3. Choose how many results you want.
4. Run the Actor.
5. Download the results as JSON, CSV, Excel, XML, HTML, or access them through the Apify API.

No code is required. Developers can also run the Actor from the Apify API, SDKs, schedules, or webhooks.

### Input

You can set up the Actor from the Apify UI or by sending JSON input through the API. The most important input fields are:

| Setting | What it does |
| --- | --- |
| `targets` | The Instagram usernames, URLs, hashtags, locations, or post/reel/comment targets you want to scrape |
| `operationPreset` | The type of run, such as profiles, post details, comments, hashtag discovery, or location discovery |
| `maxResultsPerTarget` | Maximum number of media records to collect for each target |
| `maxItemsTotal` | Hard limit for the whole run |
| `contentTypes` | Which media types to include, such as posts, reels, videos, images, or carousels |
| `includeComments` | Adds public embedded comments when they are available |
| `commentLimit` | Maximum number of public comments to save for each post or reel |
| `includeReplies` | Adds embedded public replies when Instagram includes them |
| `downloadMedia` | Saves supported images or videos to the Apify key-value store |
| `flattenOutput` | Adds CSV-friendly top-level fields for easier spreadsheet exports |
| `includeErrorRecords` | Saves clear error records for unavailable or unsupported targets |

For hashtag runs, you can add one hashtag or many hashtags. Keep the first run small, check the dataset, then raise `maxResultsPerTarget` if the public page exposes enough results.

For profile runs, you can add one username or a list of usernames. You can also paste full Instagram profile URLs if you already have them from another source.

For post, reel, and comment runs, paste the exact public Instagram URL. Direct URLs are the best option when you need details or comments for a specific item.

#### Input examples

##### Scrape a public profile

Use this when you want profile-level information such as follower count, post count, and profile image.

```json
{
  "operationPreset": "profiles",
  "targets": [
    {
      "type": "profile",
      "value": "nasa"
    }
  ]
}
````

##### Find public posts and reels from a hashtag

Use this to discover content around a campaign, topic, niche, event, or community hashtag.

```json
{
  "operationPreset": "hashtagDiscovery",
  "targets": [
    {
      "type": "hashtag",
      "value": "birdsofinstagram"
    }
  ],
  "contentTypes": ["post", "reel"],
  "maxResultsPerTarget": 50
}
```

##### Scrape one public post or reel

Use this when you already know the Instagram post or reel URL.

```json
{
  "operationPreset": "postDetails",
  "targets": [
    {
      "type": "post",
      "value": "https://www.instagram.com/p/DW_CSSeDMyA/"
    }
  ]
}
```

##### Scrape one public reel and save the video

Use this when you want reel metadata and want Apify to save the supported video file when Instagram exposes a public video URL.

```json
{
  "operationPreset": "reelDetails",
  "targets": [
    {
      "type": "reel",
      "value": "https://www.instagram.com/reel/SHORTCODE/"
    }
  ],
  "downloadMedia": true,
  "mediaTypesToDownload": ["video"],
  "includeComments": true,
  "commentLimit": 20
}
```

##### Scrape public comments

Use this to collect public comments when Instagram includes them in the page data.

```json
{
  "operationPreset": "comments",
  "targets": [
    {
      "type": "comments",
      "value": "https://www.instagram.com/p/SHORTCODE/"
    }
  ],
  "commentLimit": 100,
  "includeReplies": true
}
```

##### Scrape public media from a location

Use this when you want public posts or reels connected to a public Instagram location page.

```json
{
  "operationPreset": "locationDiscovery",
  "targets": [
    {
      "type": "location",
      "value": "https://www.instagram.com/explore/locations/213385402/"
    }
  ],
  "maxResultsPerTarget": 50
}
```

### Output

Results are saved to the Apify dataset for the run. You can find them in the **Storage** tab and export them as JSON, CSV, Excel, XML, HTML, or through the Apify API.

Each item in the dataset has a `recordType`, so you can easily tell whether it is a profile, media item, comment, hashtag, location, or error message.

#### Output examples

##### Profile result

```json
{
  "recordType": "profile",
  "username": "nasa",
  "url": "https://www.instagram.com/nasa/",
  "fullName": "NASA",
  "followersCount": 104000000,
  "followsCount": 95,
  "postsCount": 4815,
  "profilePicUrl": "https://scontent.cdninstagram.com/..."
}
```

##### Media result

```json
{
  "recordType": "media",
  "mediaKind": "video",
  "shortCode": "DW_CSSeDMyA",
  "url": "https://www.instagram.com/p/DW_CSSeDMyA/",
  "caption": "You are hot for a young couple #parrot #farm #birdsofinstagram",
  "hashtags": ["parrot", "farm", "birdsofinstagram"],
  "owner": {
    "username": "example_creator",
    "isVerified": false
  },
  "metrics": {
    "videoViewCount": 1116825,
    "videoPlayCount": 1116825
  },
  "media": {
    "displayUrl": "https://scontent.cdninstagram.com/...",
    "videoUrl": "https://instagram.cdninstagram.com/..."
  }
}
```

##### Comment result

```json
{
  "recordType": "comment",
  "id": "17949788698583607",
  "postUrl": "https://www.instagram.com/p/SHORTCODE/",
  "text": "Amazing post!",
  "position": 1,
  "timestamp": "2026-06-11T14:44:09.000Z",
  "owner": {
    "username": "commenter",
    "isVerified": false,
    "profilePicUrl": "https://scontent.cdninstagram.com/..."
  },
  "likesCount": 12,
  "repliesCount": 1,
  "replies": [
    {
      "text": "Thanks for sharing this!",
      "ownerUsername": "another_user"
    }
  ]
}
```

##### Error result

```json
{
  "recordType": "error",
  "errorInfo": {
    "code": "NO_EMBEDDED_MEDIA_FOUND",
    "message": "No public embedded media was found on the hashtag page.",
    "retryable": false
  }
}
```

Error records are useful because they tell you what happened instead of silently hiding missing results.

### Using the Actor as an API

You can use Instagram Intelligence Suite without opening the Apify Console. Run it from your own app, dashboard, backend job, or automation tool through the Apify API.

Common automation options include:

- Run the Actor on a schedule
- Trigger it from a webhook
- Send results to another app after each run
- Export datasets automatically
- Call the Actor from Node.js, Python, or any HTTP client
- Connect results to tools such as Make, Zapier, n8n, Slack, Airbyte, Google Sheets, Google Drive, or your own database
- Use the Actor from tools that connect to Apify through an API or MCP-style integration

This makes it useful for recurring reports, campaign monitoring, creator tracking, and content pipelines.

Developers can use the Apify API directly or use the official Apify clients for JavaScript and Python to start runs, monitor status, and fetch dataset items.

### How many results can you scrape?

The number of results depends on what Instagram shows publicly at the moment of the run. A profile, hashtag, post, reel, or location page may expose different data depending on:

- Whether the content is public
- The type of Instagram page
- The region and runtime environment
- Instagram layout changes
- Rate limits or temporary anti-automation behavior
- Whether Instagram includes the data in the public page HTML

For best results, start with a small test run, confirm the output, then increase `maxResultsPerTarget`.

### How much does it cost?

The cost depends on your Apify plan, run size, memory settings, proxies, and the pricing model selected for this Actor on the Store.

To control costs:

- Start with a small `maxResultsPerTarget`
- Use `maxItemsTotal` to set a hard cap
- Keep `downloadMedia` turned off unless you need media files saved
- Use focused targets instead of very broad searches

You can see the exact run cost in Apify after each run.

### Important notes and limitations

Instagram public data is dynamic. Sometimes a public page shows media, comments, or metrics; sometimes Instagram does not include them in the public page data. When data is not available, the Actor returns a clear error record where possible.

Current limitations:

- Private profiles and private posts are not supported.
- Login-only data is not supported.
- Followers and following lists are not collected from public pages because Instagram does not provide a stable public endpoint for them without authenticated access.
- Free-form keyword search is limited. Simple keyword values can be treated like hashtags, but broad Instagram search requires a separate search backend.
- Like counts, comment counts, view counts, captions, comments, and media URLs may be missing when Instagram hides or changes the public data.
- Comment results are limited to comments and replies embedded in the public page data. They may not match everything you see while logged in to Instagram.
- The Actor does not generate AI summaries, sentiment labels, or transcripts. It exports structured data that you can analyze in another tool.

### Is it legal to scrape Instagram?

This Actor is built for public Instagram data only. It does not access private accounts or private content.

Public profile, post, and comment data can still include personal data. You are responsible for using the results lawfully and ethically. Make sure you have a legitimate reason for collecting the data, follow applicable privacy laws such as GDPR, avoid collecting unnecessary sensitive information, and delete data when you no longer need it.

If you are unsure whether your use case is allowed, consult a legal professional.

### FAQ

#### Can I scrape private Instagram accounts?

No. This Actor only collects data that is publicly available.

#### Can I scrape followers and following lists?

Not from public Instagram pages. The Actor recognizes follower and following requests and returns a clear unsupported-endpoint message, but it does not collect private or login-only audience lists.

#### Can I get Instagram profile details by username?

Yes. Add a username such as `nasa` or `@nasa`, choose the `profiles` preset, and the Actor will collect the public profile fields Instagram exposes for that account.

#### Can I get Instagram profile details by URL?

Yes. You can paste a full public profile URL such as `https://www.instagram.com/nasa/`. The Actor normalizes it to the username and returns the available public profile data.

#### Why are some profile fields empty?

Not every profile exposes the same data publicly. Some fields may be missing because the account does not provide them, Instagram hides them, or the public page did not include them during the run.

#### Can this Actor scrape reels?

Yes, when public reel data is available. You can provide a reel URL directly, use profile reel discovery, or include `"reel"` in `contentTypes` for discovery-style runs.

#### Can I scrape one reel by URL?

Yes. Use the `reelDetails` preset and paste the full public reel URL, such as `https://www.instagram.com/reel/SHORTCODE/`.

#### Does this Actor generate reel transcripts?

No. It does not transcribe audio or generate text from videos. It only returns transcript-related fields if Instagram exposes them in the public page data.

#### Can I scrape posts and reels from a hashtag in the same run?

Yes. Add a hashtag target and choose the content types you want to collect. Instagram may expose posts, videos, or reels differently depending on the hashtag page, so the exact mix of results can vary.

#### Can I enter hashtags with the `#` symbol?

Yes. You can enter `#birdsofinstagram` or `birdsofinstagram`. The Actor normalizes the hashtag before running.

#### Can I scrape comments from posts or reels?

Yes. Use the `comments` preset with a direct public post or reel URL, or turn on `includeComments` for post and reel detail runs. The Actor saves the comments Instagram includes in the public page data.

#### Can I get comment replies?

Yes, when Instagram includes embedded replies publicly. Turn on `includeReplies` to keep those replies in the comment records.

#### Why did I get fewer comments than I can see on Instagram?

Instagram often shows more comments to logged-in users than it exposes to public visitors. The Actor only saves comments available from the public page data during the run.

#### Why did I get fewer results than expected?

Instagram may not expose all content in the public page data. The number of available results can vary by page type, region, public visibility, rate limits, deleted content, and Instagram layout changes.

#### Why are some fields missing?

Some Instagram data is not always public. For example, users may hide like counts, comments may not be embedded, media URLs may expire, or Instagram may not include certain metrics in the page data.

#### Can I download the images or videos?

Yes. Turn on `downloadMedia` if you want supported media files saved to the Apify key-value store. Leave it off if you only need URLs and metadata. Direct Instagram CDN links can expire or change, so downloading media is useful when you need files saved with the run.

#### Does this Actor analyze sentiment or summarize comments?

No. It collects structured public data. You can export the dataset to another tool for sentiment analysis, summaries, dashboards, or reporting.

#### Can I export the results to Excel or CSV?

Yes. Apify datasets can be exported as JSON, CSV, Excel, XML, HTML, RSS, and through the API. For CSV-friendly exports, turn on `flattenOutput`.

#### Can I use this Actor with other apps?

Yes. You can connect it to schedules, webhooks, API calls, and Apify integrations. For example, you can run it every day, export the dataset, and send the results to a spreadsheet, database, or analytics workflow.

### Tips for better results

- Test with one target before running a large batch.
- Use direct post or reel URLs when you need details for a specific item.
- Use hashtags or location URLs when you want discovery-style results.
- Keep result limits realistic for public Instagram pages.
- Check error records and run logs when results are lower than expected.
- Use proxies for production runs.

### Support

If a run does not return the results you expected, check the run log and error records first. They usually explain whether Instagram did not expose the data, the target was unavailable, or the request type is not supported through public access.

# Actor input Schema

## `operationPreset` (type: `string`):

Choose a simplified workflow. Use Auto for mixed targets.

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

Instagram usernames, URLs, hashtags, keywords, places, or audience targets.

## `contentTypes` (type: `array`):

Media types to collect for profile, hashtag, keyword, and location discovery.

## `maxResultsPerTarget` (type: `integer`):

Maximum media or audience records per target. Use a small number for testing.

## `maxItemsTotal` (type: `integer`):

Hard cap for all output records. Use 0 for no explicit cap.

## `onlyContentNewerThan` (type: `string`):

ISO date or relative duration such as '1 day', '7 days', or '2026-01-01'.

## `skipPinnedContent` (type: `boolean`):

Skip pinned posts/reels that may be old and irrelevant.

## `includePinnedIfNewerThanCutoff` (type: `boolean`):

If enabled, pinned posts/reels are included only when they pass the date filter.

## `includeProfileDetails` (type: `boolean`):

Fetch profile details for owners when supported by the route.

## `includeLatestContentInProfile` (type: `boolean`):

Include latest post and reel summaries inside profile records when available.

## `includeComments` (type: `boolean`):

Fetch embedded public comments for posts and reels when available.

## `commentLimit` (type: `integer`):

Maximum number of comments to collect per post or reel.

## `includeReplies` (type: `boolean`):

Include embedded public comment replies when available.

## `latestCommentLimit` (type: `integer`):

Maximum number of latest embedded comments to keep as media previews.

## `includeTranscripts` (type: `boolean`):

Add transcript fields for reels when transcript data is available.

## `downloadMedia` (type: `boolean`):

Download supported images/videos/thumbnails to the key-value store.

## `mediaTypesToDownload` (type: `array`):

Select which media assets should be downloaded to the key-value store.

## `expandRelatedHashtags` (type: `boolean`):

Collect related hashtag suggestions when exposed in public page data.

## `relatedHashtagLimit` (type: `integer`):

Maximum number of related hashtags to collect per seed hashtag.

## `audienceMode` (type: `string`):

Select whether audience targets export followers or following.

## `audienceLimit` (type: `integer`):

Maximum number of audience records to collect per profile when supported.

## `freeApiLimit` (type: `integer`):

Optional product policy guardrail for free or trial usage.

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

Use Apify Proxy for production runs.

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

Maximum number of concurrent requests.

## `minConcurrency` (type: `integer`):

Minimum number of concurrent requests.

## `maxRequestRetries` (type: `integer`):

Maximum retry attempts for failed requests.

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

Maximum time a single request can run before timing out.

## `sessionPoolSize` (type: `integer`):

Maximum size of the session pool for production crawling.

## `outputMode` (type: `string`):

Select whether to store normalized records, raw records, or both when raw mode is implemented.

## `flattenOutput` (type: `boolean`):

Add CSV-friendly top-level aliases for common nested media fields.

## `dedupeResults` (type: `boolean`):

Skip duplicate records by stable entity key.

## `includeErrorRecords` (type: `boolean`):

Store structured error records for failed or unsupported targets.

## `summaryToKeyValueStore` (type: `boolean`):

Save RUN-SUMMARY.json to the default key-value store.

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

Enable additional debug logging and raw response snapshots.

## `saveRawResponses` (type: `boolean`):

Stores sanitized raw responses in the key-value store for debugging.

## Actor input object example

```json
{
  "operationPreset": "auto",
  "targets": [
    {
      "type": "profile",
      "value": "nasa"
    },
    {
      "type": "hashtag",
      "value": "birdsofinstagram"
    }
  ],
  "contentTypes": [
    "post",
    "reel"
  ],
  "maxResultsPerTarget": 50,
  "maxItemsTotal": 0,
  "onlyContentNewerThan": "",
  "skipPinnedContent": true,
  "includePinnedIfNewerThanCutoff": true,
  "includeProfileDetails": false,
  "includeLatestContentInProfile": true,
  "includeComments": false,
  "commentLimit": 10,
  "includeReplies": false,
  "latestCommentLimit": 10,
  "includeTranscripts": false,
  "downloadMedia": false,
  "mediaTypesToDownload": [
    "video"
  ],
  "expandRelatedHashtags": false,
  "relatedHashtagLimit": 20,
  "audienceMode": "followers",
  "audienceLimit": 1000,
  "freeApiLimit": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 5,
  "minConcurrency": 1,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 60,
  "sessionPoolSize": 50,
  "outputMode": "normalized",
  "flattenOutput": false,
  "dedupeResults": true,
  "includeErrorRecords": true,
  "summaryToKeyValueStore": true,
  "debugMode": false,
  "saveRawResponses": false
}
```

# Actor output Schema

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

No description

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

No description

## `normalizedInput` (type: `string`):

No description

## `files` (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 = {
    "targets": [
        {
            "type": "profile",
            "value": "nasa"
        },
        {
            "type": "hashtag",
            "value": "birdsofinstagram"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("qaseemiqbal/instagram-intelligence-suite").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 = { "targets": [
        {
            "type": "profile",
            "value": "nasa",
        },
        {
            "type": "hashtag",
            "value": "birdsofinstagram",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("qaseemiqbal/instagram-intelligence-suite").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 '{
  "targets": [
    {
      "type": "profile",
      "value": "nasa"
    },
    {
      "type": "hashtag",
      "value": "birdsofinstagram"
    }
  ]
}' |
apify call qaseemiqbal/instagram-intelligence-suite --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=qaseemiqbal/instagram-intelligence-suite",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Intelligence Suite",
        "description": "Scrape public Instagram profiles, posts, reels, comments, hashtags, keywords, locations, followers, and following lists.",
        "version": "1.0",
        "x-build-id": "gWdF8B684S3F27YZF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/qaseemiqbal~instagram-intelligence-suite/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-qaseemiqbal-instagram-intelligence-suite",
                "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/qaseemiqbal~instagram-intelligence-suite/runs": {
            "post": {
                "operationId": "runs-sync-qaseemiqbal-instagram-intelligence-suite",
                "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/qaseemiqbal~instagram-intelligence-suite/run-sync": {
            "post": {
                "operationId": "run-sync-qaseemiqbal-instagram-intelligence-suite",
                "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"
                ],
                "properties": {
                    "operationPreset": {
                        "title": "Operation preset",
                        "enum": [
                            "auto",
                            "profiles",
                            "profilePosts",
                            "profileReels",
                            "postDetails",
                            "reelDetails",
                            "comments",
                            "hashtagDiscovery",
                            "keywordDiscovery",
                            "locationDiscovery",
                            "followers",
                            "following"
                        ],
                        "type": "string",
                        "description": "Choose a simplified workflow. Use Auto for mixed targets.",
                        "default": "auto"
                    },
                    "targets": {
                        "title": "Targets",
                        "type": "array",
                        "description": "Instagram usernames, URLs, hashtags, keywords, places, or audience targets.",
                        "items": {
                            "type": "object",
                            "required": [
                                "value"
                            ],
                            "properties": {
                                "type": {
                                    "title": "Target type",
                                    "description": "Target type. Use auto to infer it from the target value.",
                                    "type": "string",
                                    "default": "auto",
                                    "enum": [
                                        "auto",
                                        "profile",
                                        "post",
                                        "reel",
                                        "hashtag",
                                        "keyword",
                                        "place",
                                        "location",
                                        "comments",
                                        "audience"
                                    ]
                                },
                                "value": {
                                    "title": "Target value",
                                    "description": "Instagram username, URL, hashtag, keyword, location, or audience seed.",
                                    "type": "string",
                                    "editor": "textfield"
                                },
                                "audienceMode": {
                                    "title": "Audience mode",
                                    "description": "Followers or following mode for audience targets.",
                                    "type": "string",
                                    "enum": [
                                        "followers",
                                        "following"
                                    ]
                                },
                                "label": {
                                    "title": "Label",
                                    "description": "Optional label copied into normalized target metadata.",
                                    "type": "string",
                                    "editor": "textfield"
                                },
                                "metadata": {
                                    "title": "Metadata",
                                    "description": "Optional custom metadata for downstream workflows.",
                                    "type": "object",
                                    "editor": "json"
                                }
                            }
                        }
                    },
                    "contentTypes": {
                        "title": "Content types",
                        "type": "array",
                        "description": "Media types to collect for profile, hashtag, keyword, and location discovery.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "post",
                                "reel",
                                "carousel",
                                "video",
                                "image"
                            ]
                        },
                        "default": [
                            "post",
                            "reel"
                        ]
                    },
                    "maxResultsPerTarget": {
                        "title": "Max results per target",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum media or audience records per target. Use a small number for testing.",
                        "default": 50
                    },
                    "maxItemsTotal": {
                        "title": "Max items total",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Hard cap for all output records. Use 0 for no explicit cap.",
                        "default": 0
                    },
                    "onlyContentNewerThan": {
                        "title": "Only content newer than",
                        "type": "string",
                        "description": "ISO date or relative duration such as '1 day', '7 days', or '2026-01-01'.",
                        "default": ""
                    },
                    "skipPinnedContent": {
                        "title": "Skip pinned content",
                        "type": "boolean",
                        "description": "Skip pinned posts/reels that may be old and irrelevant.",
                        "default": true
                    },
                    "includePinnedIfNewerThanCutoff": {
                        "title": "Include pinned if newer than cutoff",
                        "type": "boolean",
                        "description": "If enabled, pinned posts/reels are included only when they pass the date filter.",
                        "default": true
                    },
                    "includeProfileDetails": {
                        "title": "Include profile details",
                        "type": "boolean",
                        "description": "Fetch profile details for owners when supported by the route.",
                        "default": false
                    },
                    "includeLatestContentInProfile": {
                        "title": "Include latest content in profile records",
                        "type": "boolean",
                        "description": "Include latest post and reel summaries inside profile records when available.",
                        "default": true
                    },
                    "includeComments": {
                        "title": "Include comments",
                        "type": "boolean",
                        "description": "Fetch embedded public comments for posts and reels when available.",
                        "default": false
                    },
                    "commentLimit": {
                        "title": "Comment limit per post or reel",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of comments to collect per post or reel.",
                        "default": 10
                    },
                    "includeReplies": {
                        "title": "Include comment replies",
                        "type": "boolean",
                        "description": "Include embedded public comment replies when available.",
                        "default": false
                    },
                    "latestCommentLimit": {
                        "title": "Latest comments preview limit",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of latest embedded comments to keep as media previews.",
                        "default": 10
                    },
                    "includeTranscripts": {
                        "title": "Include reel transcripts",
                        "type": "boolean",
                        "description": "Add transcript fields for reels when transcript data is available.",
                        "default": false
                    },
                    "downloadMedia": {
                        "title": "Download media",
                        "type": "boolean",
                        "description": "Download supported images/videos/thumbnails to the key-value store.",
                        "default": false
                    },
                    "mediaTypesToDownload": {
                        "title": "Media types to download",
                        "type": "array",
                        "description": "Select which media assets should be downloaded to the key-value store.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "image",
                                "video",
                                "thumbnail"
                            ]
                        },
                        "default": [
                            "video"
                        ]
                    },
                    "expandRelatedHashtags": {
                        "title": "Expand related hashtags",
                        "type": "boolean",
                        "description": "Collect related hashtag suggestions when exposed in public page data.",
                        "default": false
                    },
                    "relatedHashtagLimit": {
                        "title": "Related hashtag limit",
                        "minimum": 0,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of related hashtags to collect per seed hashtag.",
                        "default": 20
                    },
                    "audienceMode": {
                        "title": "Audience mode",
                        "enum": [
                            "followers",
                            "following"
                        ],
                        "type": "string",
                        "description": "Select whether audience targets export followers or following.",
                        "default": "followers"
                    },
                    "audienceLimit": {
                        "title": "Audience limit per profile",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Maximum number of audience records to collect per profile when supported.",
                        "default": 1000
                    },
                    "freeApiLimit": {
                        "title": "Free API limit",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional product policy guardrail for free or trial usage.",
                        "default": 1000
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for production runs.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of concurrent requests.",
                        "default": 5
                    },
                    "minConcurrency": {
                        "title": "Min concurrency",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Minimum number of concurrent requests.",
                        "default": 1
                    },
                    "maxRequestRetries": {
                        "title": "Max request retries",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum retry attempts for failed requests.",
                        "default": 3
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout seconds",
                        "minimum": 10,
                        "maximum": 300,
                        "type": "integer",
                        "description": "Maximum time a single request can run before timing out.",
                        "default": 60
                    },
                    "sessionPoolSize": {
                        "title": "Session pool size",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum size of the session pool for production crawling.",
                        "default": 50
                    },
                    "outputMode": {
                        "title": "Output mode",
                        "enum": [
                            "normalized",
                            "raw",
                            "both"
                        ],
                        "type": "string",
                        "description": "Select whether to store normalized records, raw records, or both when raw mode is implemented.",
                        "default": "normalized"
                    },
                    "flattenOutput": {
                        "title": "Flatten output for CSV",
                        "type": "boolean",
                        "description": "Add CSV-friendly top-level aliases for common nested media fields.",
                        "default": false
                    },
                    "dedupeResults": {
                        "title": "Deduplicate results",
                        "type": "boolean",
                        "description": "Skip duplicate records by stable entity key.",
                        "default": true
                    },
                    "includeErrorRecords": {
                        "title": "Include error records",
                        "type": "boolean",
                        "description": "Store structured error records for failed or unsupported targets.",
                        "default": true
                    },
                    "summaryToKeyValueStore": {
                        "title": "Save run summary",
                        "type": "boolean",
                        "description": "Save RUN-SUMMARY.json to the default key-value store.",
                        "default": true
                    },
                    "debugMode": {
                        "title": "Debug mode",
                        "type": "boolean",
                        "description": "Enable additional debug logging and raw response snapshots.",
                        "default": false
                    },
                    "saveRawResponses": {
                        "title": "Save raw responses",
                        "type": "boolean",
                        "description": "Stores sanitized raw responses in the key-value store 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
