# Instagram Highlights Scraper (`automation-lab/instagram-highlights-scraper`) Actor

Scrape Instagram story highlights from public profiles or highlight IDs: tray, covers and every story item with media URLs and timestamps. No login.

- **URL**: https://apify.com/automation-lab/instagram-highlights-scraper.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 8 total users, 5 monthly users, 94.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.16 / 1,000 story items

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

## Instagram Highlights Scraper

Scrape the story highlights of public Instagram profiles without logging in. Get each highlight's ID, title and cover, then every story saved inside it, with image and video URLs, posting dates, durations, link stickers and hashtags.

Give it usernames, profile URLs or highlight IDs. Turn on list-only mode for a cheap inventory of a profile's highlights, or open them all for the full archive.

### What does Instagram Highlights Scraper do?

Highlights are the story collections a profile pins under its bio. They stay up after the 24 hours of a normal story, so they are where brands keep product launches, FAQs, reviews and campaign creative. Instagram offers no export for them.

This Actor reads the highlights that Instagram shows to logged-out visitors and saves them as structured rows:

- **One `highlight` row** per highlight: ID, title, cover, owner, tray position and number of stories.
- **One `story_item` row** per story inside it: media URLs, type, size, posting time, duration, links and stickers.

It needs no Instagram account, cookies or session from you.

### Who is it for?

- **Brand and creative researchers** archiving how competitors present products in their highlights.
- **Social media agencies** auditing a client's or a competitor's highlight tray before a pitch.
- **Influencer marketing teams** checking which sponsors and links a creator keeps pinned.
- **Market analysts** tracking when a brand adds, changes or removes a highlight, by comparing repeat runs.
- **Developers** feeding highlight media into their own archive, review tool or AI pipeline.

This Actor does not cover active 24-hour stories.

### Why use this Actor?

- **Stable keys for repeat runs.** Every row has a `key` that stays the same between runs (`highlight:<id>` or `<highlightId>:<mediaId>`), so you can merge runs and see what changed.
- **Expiry you can act on.** Instagram media links are signed and stop working after a while. Each story row has `mediaUrlExpiresAt` and a `mediaExpired` flag, so you know when to download.
- **A cheap inventory mode.** List-only mode returns the highlights of a profile without opening them, for a fraction of the cost of a full scrape.
- **Honest about gaps.** Every private account, missing profile and profile with no visible highlights gets its own row saying so, and truncated trays are flagged on the rows. You are never charged for a row you did not get.
- **Direct links.** Link stickers are returned as their real destination, without Instagram's redirect.

### What data can you extract?

#### Highlight rows

| Field | Description |
|---|---|
| `key` | Stable key: `highlight:<highlightId>` |
| `highlightId` | Instagram highlight ID |
| `highlightTitle` | Title under the highlight on the profile |
| `highlightUrl` | Public URL of the highlight |
| `highlightCoverUrl` | Cover image (signed URL) |
| `ownerUsername`, `ownerId` | The profile that owns it |
| `itemCount` | Stories in the highlight. Null in list-only mode |
| `latestItemAt` | When its newest story was posted. Null for profiles in list-only mode |
| `trayPosition` | Place in the profile's tray |
| `trayHasMore` | True if the profile has more than the 10 highlights shown logged out |

#### Story item rows

| Field | Description |
|---|---|
| `key` | Stable key: `<highlightId>:<mediaId>` |
| `position` | Place of the story in the highlight, from 1 |
| `mediaId`, `storyId`, `shortcode` | Instagram identifiers |
| `mediaType` | `image` or `video` |
| `imageUrl`, `videoUrl` | Largest image and the video file (signed URLs) |
| `width`, `height` | Original size in pixels |
| `takenAt` | When the story was posted |
| `durationSeconds`, `hasAudio` | For videos |
| `linkUrls`, `hashtags`, `locations`, `mentions` | Stickers on the story, when Instagram returns them |
| `caption`, `accessibilityCaption` | Text, when Instagram returns it |
| `musicTitle`, `musicArtist` | From a music sticker, when Instagram returns it |
| `isPaidPartnership` | Whether it is labelled as a paid partnership |
| `mediaUrlExpiresAt` | When the signed media URLs stop working |
| `mediaExpired` | True if the row has no media URL, or its URL had already expired |

Story rows also repeat the highlight's ID, title, URL, cover and owner, so each row stands on its own in a spreadsheet.

#### Target status rows

A target with nothing to return gets one row, with `recordType` set to `target_status`, so you can see the result of every name you asked for.

| Field | Description |
|---|---|
| `key` | Stable key: `target:<username or highlightId>` |
| `target` | The username or highlight ID |
| `targetStatus` | `private`, `not_found`, or `no_highlights` when a public profile shows none to logged-out visitors |

### How much does it cost to scrape Instagram highlights?

The Actor uses pay-per-event pricing, with no monthly fee on top of your Apify plan. Proxy costs are included.

| Event | Price |
|---|---|
| Run start | $0.001 |
| Each highlight row or target status row | $0.0012 |
| Each story item row | $0.0027 |

These are the prices before your plan's volume discount, shown on the Actor's pricing tab.

Examples at these prices:

- **List the highlights of 10 profiles** with 8 highlights each: 80 highlight rows, about **$0.097**.
- **Archive one profile** with 10 highlights and 112 stories: **$0.315**.
- **Open one highlight** with 47 stories by ID: **$0.129**.

Checking a private, missing or empty target has a real cost, so it is charged as one target status row. A run that checks 5 missing usernames costs **$0.007**. A value that is not a username or highlight ID, a target that failed, and a run that fails cost nothing. You can also cap any run with Maximum charge per run or Maximum total rows.

### How to scrape Instagram highlights

1. Open [Instagram Highlights Scraper](https://apify.com/automation-lab/instagram-highlights-scraper) in Apify Console.
2. Add one or more usernames or profile URLs under **Usernames or profile URLs**, or specific highlights under **Highlight IDs or URLs**.
3. Turn on **List highlights only** if you only want the inventory.
4. Set the limits you want, then click **Start**.
5. Download the rows as JSON, CSV or Excel, or read them through the API. Save any media you want to keep before `mediaUrlExpiresAt`.

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `usernames` | array | none | Usernames, @handles or profile URLs |
| `highlightIds` | array | none | Highlight IDs, `highlight:<id>`, highlight URLs or `instagram.com/s/` share links |
| `listOnly` | boolean | `false` | Return highlight rows only and do not open them |
| `maxHighlightsPerProfile` | integer | `10` | Highlights to take from each profile, in tray order |
| `maxItemsPerHighlight` | integer | `100` | Stories to return from each highlight |
| `maxTotalRows` | integer | `1000` | Stops the run after this many rows of both kinds together |

Give at least one username or highlight ID. You can mix both in a run, and duplicates are removed.

```json
{
    "usernames": ["nasa", "https://www.instagram.com/sephora/"],
    "highlightIds": ["https://www.instagram.com/stories/highlights/18277480240094052/"],
    "listOnly": false,
    "maxItemsPerHighlight": 100,
    "maxTotalRows": 1000
}
```

### Output example

A highlight row and one of its story items, from a real run. Media URLs are shortened here.

```json
{
    "recordType": "highlight",
    "key": "highlight:18066826616637328",
    "highlightId": "18066826616637328",
    "highlightTitle": "Zero Excuses",
    "highlightUrl": "https://www.instagram.com/stories/highlights/18066826616637328/",
    "highlightCoverUrl": "https://scontent.cdninstagram.com/…/621249055_1331231705476033_6958519720051357259_n.jpg?…",
    "ownerUsername": "redbull",
    "ownerId": "476322",
    "itemCount": 7,
    "latestItemAt": "2026-02-06T15:24:02.000Z",
    "trayPosition": 1,
    "trayHasMore": true,
    "scrapedAt": "2026-11-06T07:22:16.205Z"
}
```

```json
{
    "recordType": "story_item",
    "key": "18420569413022317:3195125504368636533",
    "highlightId": "18420569413022317",
    "highlightTitle": "Watersports",
    "highlightUrl": "https://www.instagram.com/stories/highlights/18420569413022317/",
    "highlightCoverUrl": "https://scontent.cdninstagram.com/…/410057471_331838802960386_6355193411914580558_n.jpg?…",
    "ownerUsername": "redbull",
    "ownerId": "476322",
    "position": 3,
    "mediaId": "3195125504368636533",
    "storyId": "3195125504368636533_476322",
    "shortcode": "CxXXbe8rvJ1",
    "mediaType": "video",
    "imageUrl": "https://instagram.fagc3-2.fna.fbcdn.net/v/t51.71878-15/572443277_24885388507778695_1466885708990286440_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=110&_nc_map=urlgen_bucketless&ig_cache_key=MzE5NTEyNTUwNDM2ODYzNjUzMw%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IlNUT1JZLnhwaWRzLjY0MC5zZHIudmlkZW9fZGVmYXVsdF9jb3Zlcl9mcmFtZS5DMyJ9&_nc_ohc=cbxRrTgjtHkQ7kNvwFtNFYm&_nc_oc=Ado5-AotLa1OikmBFgG6M_Q5-u1txFYCB-s4cR8di-PwL6kmSB7Xpvg1yYfa7CwjW48UoHtRX521jTvsfZ1qJyWx&_nc_zt=23&_nc_ht=instagram.fagc3-2.fna&_nc_gid=Ad78Q7X5tbsq7Oz2sJce5w&_nc_ss=70689&oh=00_AQTiWaxsIeRFwBljn5T20xoAWOndRYIldIE9AT2tzxC9pQ&oe=6AF36786",
    "videoUrl": "https://instagram.fagc3-1.fna.fbcdn.net/o1/v/t2/f2/m78/AQO_x-UPe_YFmyMIJePlk5YrHnM6HGzX0cGUKYqZHneyntox9IvDb7GfRguoHwbOA0b32JfesFjpMBl0n-x_4i4SayEYRpFTMums2cc.mp4?_nc_cat=110&_nc_oc=AdoUF4GX8_22vvqsPIocfV63IB-qr3LFdfJRvsAoNzsmIGBRqq_VLazES334NEPmI3Z2EmMq7eqW_W3CGNMT3jdW&_nc_sid=5e9851&_nc_ht=instagram.fagc3-1.fna.fbcdn.net&_nc_ohc=Y_C20uczHRMQ7kNvwETNHrU&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l2ZS5JTlNUQUdSQU0uU1RPUlkuQzMuNzIwLmRhc2hfYmFzZWxpbmVfMV92MSIsInhwdl9hc3NldF9pZCI6NjU3NTIzMDUwNTg4Nzc3NCwiYXNzZXRfYWdlX2RheXMiOjExNDMsInZpX3VzZWNhc2VfaWQiOjEwODI2LCJkdXJhdGlvbl9zIjoxNCwidXJsZ2VuX3NvdXJjZSI6Ind3dyJ9&ccb=17-1&vs=475e8f5b6467e2dd&_nc_vs=HBksFQIYUWlnX3hwdl9wbGFjZW1lbnRfcGVybWFuZW50X3YyLzlENEJFQkI2MDdDNEU4OEVERDNEQzdDODBDNjNDQkE0X3ZpZGVvX2Rhc2hpbml0Lm1wNBUAAsgBEgAVAhg6cGFzc3Rocm91Z2hfZXZlcnN0b3JlL0dLZWFyUmJmdDFFbE92d0NBTW11eUp6MTFvbzNicGt3QUFBRhUCAsgBEgAoABgAGwKIB3VzZV9vaWwBMRJwcm9ncmVzc2l2ZV9yZWNpcGUBMRUAACa8oPXp5IiuFxUCKAJDMywXQC1mZmZmZmYYEmRhc2hfYmFzZWxpbmVfMV92MREAdegHZZSpAQA&_nc_gid=Ad78Q7X5tbsq7Oz2sJce5w&_nc_ss=70689&_nc_map=urlgen_bucketless&_nc_zt=28&oh=00_AQT1X-zgp02h8S0PosNYDHydIMHpmBxmvjX-Kkd00eAJ_Q&oe=6AEF629B",
    "width": 720,
    "height": 1280,
    "takenAt": "2023-09-19T07:30:58.000Z",
    "durationSeconds": 14.72,
    "hasAudio": true,
    "caption": null,
    "accessibilityCaption": null,
    "musicTitle": null,
    "musicArtist": null,
    "linkUrls": [
        "https://www.redbull.com/int-en/live/red-bull-megaloop-2023"
    ],
    "hashtags": [],
    "locations": [],
    "mentions": [],
    "isPaidPartnership": false,
    "mediaUrlExpiresAt": "2026-11-07T17:40:43.000Z",
    "mediaExpired": false,
    "scrapedAt": "2026-11-06T07:22:16.223Z"
}
```

### Limits and failure behavior

- **10 highlights per profile.** Instagram shows logged-out visitors the first 10 highlights of a profile and refuses the request for more, even in its own website. A profile with more returns its first 10, with `trayHasMore: true` on the rows and a note in the status message. If you know the ID of a later highlight, you can still open it through **Highlight IDs or URLs**.
- **Some profiles show no highlights logged out.** Instagram hides the tray on some public accounts for logged-out visitors. Each of these profiles returns one `target_status` row with `no_highlights`.
- **Private and missing profiles, and highlight IDs that do not exist,** return one `target_status` row each and are listed in the status message.
- **Blocked requests** are retried on a new residential address. A target that still fails is named in the status message, and the rows already saved are kept.
- **Signed media links expire**, typically within days. Use `mediaUrlExpiresAt` to plan downloads, or run the Actor again for fresh links.
- **Stickers depend on Instagram.** Music, captions and mentions are returned only when Instagram includes them for logged-out visitors, and many stories have none.

### Tips for better results

- Start with list-only mode to see what a profile has, then open only the highlights you want by ID.
- Schedule a weekly list-only run and compare `key` values to detect new or removed highlights.
- Compare `itemCount` and `latestItemAt` over time to see when a brand updates a highlight.
- Lower Maximum story items per highlight when you only need a sample of each highlight.

### Integrations

Connect the Actor to the tools you already use:

- **Google Sheets**: keep a live inventory of competitor highlights for your creative team.
- **Slack**: post a message when a scheduled run finds a new `key`.
- **Make, Zapier and n8n**: download each `videoUrl` to your own storage before it expires.
- **Webhooks**: start your own processing as soon as a run finishes.

### Use the Actor through the API

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~instagram-highlights-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["nasa"], "listOnly": true}'
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/instagram-highlights-scraper').call({
    usernames: ['nasa'],
    maxItemsPerHighlight: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((row) => row.recordType === 'story_item').length);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("automation-lab/instagram-highlights-scraper").call(run_input={
    "usernames": ["nasa"],
    "maxItemsPerHighlight": 50,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["recordType"] == "story_item":
        print(row["key"], row["videoUrl"] or row["imageUrl"])
```

### Use with MCP and AI agents

Connect this Actor to Claude Code through the Apify MCP server:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/instagram-highlights-scraper"
```

#### Claude Desktop

Add this server in Claude Desktop settings:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com?tools=automation-lab/instagram-highlights-scraper"
        }
    }
}
```

#### Cursor

Use the same `mcpServers` JSON in Cursor's MCP settings.

#### VS Code

Add the same Apify MCP URL through VS Code's MCP server configuration.

#### Reading results

Selecting this Actor also adds the `get-actor-run`, `get-dataset-items`, `get-key-value-store-record` and `abort-actor-run` tools. Start one run and keep its run ID. `call-actor` waits 45 seconds at most, so if the run is still going, check that same run with `get-actor-run` instead of starting another. Then read the rows with `get-dataset-items` using the dataset ID, an explicit `limit` and `offset`, and only the `fields` you need. Media URLs are long, so read pages of about 20 rows, and keep full exports outside the model's context.

Example prompts:

- "List the highlights of @sephora and tell me which titles look like product launches."
- "Get the stories in this highlight and list every link sticker destination: https://www.instagram.com/stories/highlights/18277480240094052/"
- "Compare the highlight titles of @nike and @adidas."

### Data handling and dependencies

The Actor reads pages and data Instagram serves to logged-out visitors, through Apify residential proxies. It uses no third-party data provider, no AI service and no account of yours. It stores nothing beyond your run's dataset and logs, which follow your Apify retention settings. Scraped rows can contain usernames and whatever people show in their stories, so treat them as personal data where that applies.

Instagram can change what it shows logged-out visitors at any time, which can change what this Actor returns.

Failed operations send sanitized diagnostic input, exceptions and Actor/build/run IDs to our private GlitchTip service for repair. Secret fields and URL queries are removed, and reports are retained for 30 days.

### Is it legal to scrape Instagram highlights?

This Actor collects only publicly visible content and does not log in or access private accounts. Whether you may use that data depends on your location and purpose. Personal data is protected by laws such as the GDPR and CCPA, and media belongs to its creators. Use the data responsibly, respect copyright, and ask a lawyer if you are unsure. The Actor is not affiliated with or endorsed by Instagram or Meta.

### FAQ

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

No. The Actor works only with what Instagram shows to logged-out visitors.

#### Why did I get only 10 highlights from a profile with more?

Instagram stops at 10 for logged-out visitors. Rows from that profile have `trayHasMore: true`. Later highlights can still be opened if you have their ID or URL.

#### Why did a public profile return no highlights?

Either the profile has none, or Instagram does not show them to logged-out visitors. You get one status row saying so, charged as a highlight row, and you can check by opening the profile in a private browser window.

#### Why does my media link return an error?

The link has expired. Check `mediaUrlExpiresAt` on the row, and run the Actor again for fresh links. Download files you want to keep.

#### How do I find a highlight ID?

Open the highlight on Instagram and copy the number in the URL, or take `highlightId` from a list-only run. Share links in the `instagram.com/s/` form also work.

#### Does it scrape active stories?

No. This Actor covers highlights only, not active 24-hour stories.

### Related automation-lab Actors

- [Instagram Profile Scraper](https://apify.com/automation-lab/instagram-public-profile-details): public profile details.
- [Instagram Post & Reel Details Scraper](https://apify.com/automation-lab/instagram-post-reel-details-scraper): details of posts and reels.
- [Instagram Comments Scraper](https://apify.com/automation-lab/instagram-comments-scraper): comments on posts.
- [Instagram Reels Audio Scraper](https://apify.com/automation-lab/instagram-reels-audio-scraper): audio details from reels.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/instagram-highlights-scraper/changelog.md

# Actor input Schema

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

Public Instagram profiles whose highlight tray to read, for example nasa, @nasa or https://www.instagram.com/nasa/. Instagram shows at most 10 highlights per profile to logged-out visitors, so a profile with more returns its first 10 with trayHasMore: true. Duplicates are removed. Use this, Highlight IDs or URLs, or both.

## `highlightIds` (type: `array`):

Specific highlights to open, whichever place they have in the tray. Accepts 18277480240094052, highlight:18277480240094052, https://www.instagram.com/stories/highlights/18277480240094052/ or an instagram.com/s/ share link. Maximum highlights per profile does not apply to these.

## `listOnly` (type: `boolean`):

Return one row per highlight (ID, title, cover, owner) and do not open it, so no story items are returned and itemCount is null. This is the cheapest mode. Maximum story items per highlight is ignored.

## `maxHighlightsPerProfile` (type: `integer`):

How many highlights to take from each profile, in tray order. Applies per profile from Usernames or profile URLs. Instagram exposes 10 at most when logged out, so a higher value returns no more.

## `maxItemsPerHighlight` (type: `integer`):

How many story items to return from each highlight, in the order Instagram shows them. The highlight row still reports the full itemCount. Ignored when List highlights only is on.

## `maxTotalRows` (type: `integer`):

Stops the whole run after this many dataset rows, counting highlight rows and story item rows together. The Maximum charge per run setting can stop it earlier.

## Actor input object example

```json
{
  "usernames": [
    "nasa",
    "sephora"
  ],
  "listOnly": false,
  "maxHighlightsPerProfile": 10,
  "maxItemsPerHighlight": 20,
  "maxTotalRows": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

All rows: highlight, story item and target status rows, told apart by recordType.

## `highlights` (type: `string`):

The same dataset with the fields that describe a highlight.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "usernames": [
        "nasa"
    ],
    "listOnly": false,
    "maxHighlightsPerProfile": 10,
    "maxItemsPerHighlight": 20,
    "maxTotalRows": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/instagram-highlights-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 = {
    "usernames": ["nasa"],
    "listOnly": False,
    "maxHighlightsPerProfile": 10,
    "maxItemsPerHighlight": 20,
    "maxTotalRows": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/instagram-highlights-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 '{
  "usernames": [
    "nasa"
  ],
  "listOnly": false,
  "maxHighlightsPerProfile": 10,
  "maxItemsPerHighlight": 20,
  "maxTotalRows": 20
}' |
apify call automation-lab/instagram-highlights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/instagram-highlights-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/GSLbCkzxJrfpkEdxW/builds/6Pc0b2VL2aQaO78Zb/openapi.json
