# Instagram Stories & Highlights Scraper (`coregent/instagram-stories-highlights-scraper`) Actor

Scrape live Instagram stories and highlights from public accounts: photo and video URLs, post and expiry dates, link stickers, mentions, music, location and paid-partnership flags. Usernames, profile, story or highlight URLs in bulk. No login, no start fee.

- **URL**: https://apify.com/coregent/instagram-stories-highlights-scraper.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Features:** Limited permissions
- **Stats:** 32 total users, 11 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 stories

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 Stories & Highlights Scraper

![Instagram Stories & Highlights Scraper](https://raw.githubusercontent.com/coregentdevspace/instagram-stories-highlights-scraper-assets/main/thumbnail-instagram-stories-highlights-scraper.png)

Scrape the **live stories** and **highlights** of public Instagram accounts by **username, profile URL, story URL or
highlight URL**, all into one dataset with one row per story. Every row has the account, whether it is a live story or
from a highlight (with the highlight's title), when it was posted and when it expires, the **photo and video URLs**,
and **when those media links stop working**. Rows also carry the story's **link stickers** (the real target URL),
**mentions**, **music**, **location**, a reshared post or reel, and the **paid-partnership** flag with sponsors.

Collect live stories, highlights, or both for each account; open as many highlights per account as you need; or paste
highlight and story links directly. Filter by **date** and cap the stories per account.

No Instagram account, login, cookies, browser or proxy needed, and **no start fee**: you pay only for data delivered.

### What you can scrape

| Input | Example | What you get |
|---|---|---|
| **Accounts** | `nasa`, `@nasa` or `https://www.instagram.com/nasa/` | The account's live stories and the stories in its highlights (1 highlight by default, up to 100) |
| **Highlight URLs** | `https://www.instagram.com/stories/highlights/18023864549864045/`, a `https://www.instagram.com/s/…` share link, or the highlight ID | Every story in that highlight |
| **Story URLs** | `https://www.instagram.com/stories/nasa/4025959321372004435/` | That one live story |

Mix all three in one run. An account given twice, or a highlight that is both in an account's list and pasted as a
URL, is scraped once. One run takes up to 500 accounts and 1,000 highlight URLs; split bigger lists across runs.

**Live stories last 24 hours.** An account that posted nothing in the last day has no live stories: its highlights are
where older stories stay.

### Options

| Option | Default | What it does |
|---|---|---|
| **Live stories** | on | Each account's stories from the last 24 hours |
| **Highlights** | on | Stories from each account's highlights; the full list of each account's highlights is saved in the `HIGHLIGHTS` record |
| **Highlights per account** | 1 | How many highlights to open per account, in the order the profile shows them (up to 100). Each one returns all its stories |
| **Max stories per account** | no limit | Stop an account after this many stories |
| **Posted since** | none | Only stories posted on or after a date (`2026-11-01`) or within a period (`7 days`). Highlights with nothing that recent aren't opened |

### Input examples

Two accounts' live stories and their first highlight, up to 12 stories each (the run behind the screenshots and
samples below: 23 stories):

```json
{
    "usernames": ["nasa", "natgeo"],
    "includeStories": true,
    "includeHighlights": true,
    "maxHighlightsPerAccount": 1,
    "maxStoriesPerAccount": 12
}
```

The live stories of several accounts, for a daily schedule:

```json
{
    "usernames": ["nasa", "natgeo"],
    "includeStories": true,
    "includeHighlights": false
}
```

All of an account's highlights (up to 20):

```json
{
    "usernames": ["https://www.instagram.com/nike/"],
    "includeStories": false,
    "maxHighlightsPerAccount": 20
}
```

One highlight by its URL:

```json
{
    "highlightUrls": ["https://www.instagram.com/stories/highlights/18023864549864045/"]
}
```

**Run with defaults:** `nasa`, its live stories and its first highlight: about 10 to 15 stories (13 when tested), from 3 requests.

**How to find a highlight URL:** open the profile on instagram.com, click a highlight circle, and copy the address bar
(`…/stories/highlights/<number>/`). The **Share** button in the Instagram app gives a `https://www.instagram.com/s/…`
link, which works too.

### Output

One dataset; **every row is a story**. `source` is `story` for a live story and `highlight` for a story from a
highlight. Three views:

- **Stories:** account, type, highlight, posted and expiry dates, media type, image and video, when the media links
  expire, and the story URL.
- **Links & campaigns:** link stickers, mentions, paid partnership and sponsors, music, location, reshared post.
- **Media:** image, video and thumbnail URLs, size, duration, audio, and when the links expire.

#### Stories view

![Stories view](https://raw.githubusercontent.com/coregentdevspace/instagram-stories-highlights-scraper-assets/main/instagram-stories-highlights-scraper-output-stories-table-view.png)

A story from a highlight (nasa's "MAX POWER"), with a location sticker:

```json
{
    "storyId": "4024655246676403958",
    "shortcode": "Dfacp-Rjyb2",
    "source": "highlight",
    "storyUrl": "https://www.instagram.com/stories/nasa/4024655246676403958/",
    "username": "nasa",
    "fullName": "NASA",
    "userId": "528817151",
    "isVerified": true,
    "highlightId": "18145966027591735",
    "highlightTitle": "MAX POWER",
    "highlightCoverUrl": "https://scontent-lax3-1.cdninstagram.com/…/892543954_27….jpg?…&oe=6AF38A49",
    "postedAt": "2026-11-06T20:18:41.000Z",
    "expiresAt": null,
    "mediaType": "video",
    "videoDuration": 8.2,
    "hasAudio": true,
    "imageUrl": "https://scontent-bru2-1.cdninstagram.com/…/858672849_11….jpg?…&oe=6AF773A2",
    "videoUrl": "https://scontent-bru2-1.cdninstagram.com/…/AQNAadhhvOmb….mp4?…&oe=6AF3A630",
    "thumbnailUrl": "https://scontent-bru2-1.cdninstagram.com/…/858672849_11….jpg?…&oe=6AF773A2",
    "mediaUrlExpiresAt": "2026-11-10T23:18:08.000Z",
    "width": 1080,
    "height": 1920,
    "linkStickers": [],
    "mentions": [],
    "sharedPostUrl": null,
    "location": {
        "id": "1365935970087741",
        "name": "Kennedy Space Center",
        "city": "Orsino, Florida"
    },
    "music": null,
    "isPaidPartnership": false,
    "sponsors": [],
    "scrapedAt": "2026-11-09T12:22:35.456Z"
}
```

#### Links & campaigns view

![Links & campaigns view](https://raw.githubusercontent.com/coregentdevspace/instagram-stories-highlights-scraper-assets/main/instagram-stories-highlights-scraper-output-campaigns-table-view.png)

A live story with a link sticker (the real target, Instagram's redirect removed):

```json
{
    "storyId": "4026013462839830622",
    "shortcode": "DffRenpgihe",
    "source": "story",
    "storyUrl": "https://www.instagram.com/stories/natgeo/4026013462839830622/",
    "username": "natgeo",
    "fullName": "National Geographic",
    "userId": "787132",
    "isVerified": true,
    "highlightId": null,
    "highlightTitle": null,
    "highlightCoverUrl": null,
    "postedAt": "2026-11-08T17:17:05.000Z",
    "expiresAt": "2026-11-09T17:17:05.000Z",
    "mediaType": "photo",
    "videoDuration": null,
    "hasAudio": null,
    "imageUrl": "https://scontent-iad6-1.cdninstagram.com/…/860457513_18….jpg?…&oe=6AF77346",
    "videoUrl": null,
    "thumbnailUrl": "https://scontent-iad6-1.cdninstagram.com/…/860457513_18….jpg?…&oe=6AF77346",
    "mediaUrlExpiresAt": "2026-11-13T20:29:58.000Z",
    "width": 1170,
    "height": 2080,
    "linkStickers": [
        {
            "url": "https://on.natgeo.com/BR56079",
            "displayUrl": "on.natgeo.com/br56079",
            "title": "Visit Link"
        }
    ],
    "mentions": [],
    "sharedPostUrl": null,
    "location": null,
    "music": null,
    "isPaidPartnership": false,
    "sponsors": [],
    "scrapedAt": "2026-11-09T12:22:17.265Z"
}
```

#### Media view

![Media view](https://raw.githubusercontent.com/coregentdevspace/instagram-stories-highlights-scraper-assets/main/instagram-stories-highlights-scraper-output-media-table-view.png)

A live video story that reshares a reel, with its original audio:

```json
{
    "storyId": "4025959321372004435",
    "shortcode": "DffFKwejRBT",
    "source": "story",
    "storyUrl": "https://www.instagram.com/stories/nasa/4025959321372004435/",
    "username": "nasa",
    "fullName": "NASA",
    "userId": "528817151",
    "isVerified": true,
    "highlightId": null,
    "highlightTitle": null,
    "highlightCoverUrl": null,
    "postedAt": "2026-11-08T15:29:25.000Z",
    "expiresAt": "2026-11-09T15:29:25.000Z",
    "mediaType": "video",
    "videoDuration": 52.8,
    "hasAudio": true,
    "imageUrl": "https://scontent-ord5-2.cdninstagram.com/…/892796013_10….jpg?…&oe=6AF77CDA",
    "videoUrl": "https://scontent-ord5-1.cdninstagram.com/…/AQOjXSGa2ZUq….mp4?…&oe=6AF3A05F",
    "thumbnailUrl": "https://scontent-ord5-2.cdninstagram.com/…/892796013_10….jpg?…&oe=6AF77CDA",
    "mediaUrlExpiresAt": "2026-11-10T22:53:19.000Z",
    "width": 1080,
    "height": 1920,
    "linkStickers": [],
    "mentions": [],
    "sharedPostUrl": "https://www.instagram.com/reel/DffAEWhve1J/",
    "location": null,
    "music": {
        "title": "Original audio",
        "artist": "nasa",
        "isOriginalAudio": true
    },
    "isPaidPartnership": false,
    "sponsors": [],
    "scrapedAt": "2026-11-09T12:22:14.647Z"
}
```

Media URLs are shortened here (`…`); real rows carry the full signed links.

#### Story fields

| Field | Description |
|---|---|
| `storyId`, `shortcode` | Instagram's story ID and code |
| `source` | `story` (live) or `highlight` |
| `storyUrl` | Link to the story on instagram.com |
| `username`, `fullName`, `userId`, `isVerified` | The account that posted it |
| `highlightId`, `highlightTitle`, `highlightCoverUrl` | The highlight the story came from (`null` for live stories) |
| `postedAt` | When the story was posted (UTC) |
| `expiresAt` | When a live story disappears (24 hours after posting); `null` for highlights |
| `mediaType` | `photo` or `video` |
| `videoDuration`, `hasAudio` | Videos only: length in seconds, whether it has sound |
| `imageUrl`, `videoUrl`, `thumbnailUrl` | Largest available image, the video, and the preview image |
| `mediaUrlExpiresAt` | When the media links above stop working (see below) |
| `width`, `height` | Original size in pixels |
| `linkStickers` | Link stickers: the real target `url` (Instagram's redirect and click ID removed), `displayUrl`, `title` |
| `mentions` | Usernames mentioned or tagged in the story |
| `sharedPostUrl` | The post or reel the story reshares, if any |
| `location` | Location sticker: `id`, `name`, `city` |
| `music` | `title` and `artist` of the song, or the original audio's title and creator (`isOriginalAudio: true`) |
| `isPaidPartnership`, `sponsors` | The "Paid partnership" label and the sponsor usernames |
| `scrapedAt` | When the row was collected |

Every row has the same fields; a field the story doesn't have is `null` or an empty list.

#### Media links expire

Instagram signs every photo and video link with an expiry time, which the Actor reads into `mediaUrlExpiresAt`.
In testing, links lasted from about **1 day** (highlights and some videos) to about **4 days** (live story photos).
Download the files you want to keep before that time, or run the Actor again for fresh links.

#### HIGHLIGHTS record

The run's key-value store has a `HIGHLIGHTS` record listing every highlight of each account (not only the ones opened):
ID, title, cover image, number of stories, created and updated dates. Run once with a small **Highlights per account**
to see the list, then open the ones you want by URL.

#### Inputs that couldn't be scraped

They are never dataset rows: each is logged, and listed with its reason in the `RUN_SUMMARY` record in the run's
key-value store (`errors`): an account that doesn't exist (`user-not-found`), a private account (`private-account`), a
highlight that doesn't exist (`highlight-not-found`), a story that is no longer live (`story-expired`), or a link that
isn't a profile, story or highlight. They are never charged. `RUN_SUMMARY` also has counts per account and request
statistics.

### Pricing

Pay per event: you pay for each **story** delivered, live or from a highlight, plus once per **account** that was found
and is public. The account event covers checking an account even when it has nothing live right now. Highlight URLs
have no account charge. Accounts that don't exist or are private, expired stories, duplicates and stories older than
your **Posted since** date are free, and there is **no start fee**. See the **Pricing** tab for current rates. This
README deliberately doesn't quote figures.

If you set a spending limit on a run, the Actor stops when it is reached and keeps everything already paid for.

### FAQ

**Why does an account have no stories?**
It posted no story in the last 24 hours, or it is private. Its highlights may still have stories: turn on
**Highlights**.

**Can I get private accounts, close-friends stories or who viewed a story?**
No. The Actor collects only what Instagram shows publicly, without logging in.

**Can I get old stories?**
Only the ones the account saved to its highlights. Instagram removes other stories after 24 hours, so schedule a daily
run to keep a record of an account's live stories.

**How long do the photo and video links work?**
Until `mediaUrlExpiresAt`: about 1 to 4 days in testing. Download what you want to keep before then.

**How do I collect every highlight of an account?**
Set **Highlights per account** to 100. The `HIGHLIGHTS` record lists them all with their story counts.

**Does it work with posts and reels?**
No: this Actor is for stories and highlights. A post or reel link is listed as `not-a-story-url` and not charged.

### Data and privacy

This Actor collects only what Instagram shows publicly to anyone, from public accounts. Stories are personal data and
are meant to disappear: the Actor returns the account's public username, name and verified badge, and what the story
itself shows; it doesn't return viewer data or contact details. You are responsible for having a lawful basis to
process this data, for deleting it when you no longer need it, and for following the laws that apply to you, including
the GDPR where relevant, and Instagram's terms.

This Actor is not affiliated with, endorsed by or sponsored by Instagram or Meta. Instagram is a trademark of Meta
Platforms, Inc.

# Actor input Schema

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

Instagram usernames (nasa or @nasa) or profile URLs (https://www.instagram.com/nasa/). Public accounts only. For each account the Actor collects its live stories and highlights, as set below. With no account, story or highlight at all, the Actor runs a short demo for nasa. Up to 500 per run.

## `highlightUrls` (type: `array`):

Highlight URLs (https://www.instagram.com/stories/highlights/18023864549864045/), highlight share links (https://www.instagram.com/s/…) or highlight IDs. Each highlight's stories are collected directly. Up to 1,000 per run.

## `storyUrls` (type: `array`):

Links to single live stories (https://www.instagram.com/stories/nasa/4025959321372004435/). Live stories last 24 hours; an expired one is listed in the run summary and not charged.

## `includeStories` (type: `boolean`):

Collect each account's live stories (posted in the last 24 hours).

## `includeHighlights` (type: `boolean`):

Collect stories from each account's highlights (the saved story collections on the profile). The full list of each account's highlights is also saved in the HIGHLIGHTS record.

## `maxHighlightsPerAccount` (type: `integer`):

How many of each account's highlights to open, in the order the profile shows them. Each highlight returns all its stories.

## `maxStoriesPerAccount` (type: `integer`):

Optional. Stop collecting an account after this many stories (live and highlight stories together). Leave empty for no limit.

## `postedSince` (type: `string`):

Optional. Only stories posted on or after this date (2026-11-01) or within this period ("7 days", "12 hours"). Older stories are skipped and not charged; highlights with nothing that recent are not opened.

## Actor input object example

```json
{
  "usernames": [
    "nasa"
  ],
  "includeStories": true,
  "includeHighlights": true,
  "maxHighlightsPerAccount": 1
}
```

# Actor output Schema

## `stories` (type: `string`):

No description

## `campaigns` (type: `string`):

No description

## `media` (type: `string`):

No description

## `highlights` (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 = {
    "usernames": [
        "nasa"
    ],
    "maxHighlightsPerAccount": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/instagram-stories-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"],
    "maxHighlightsPerAccount": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/instagram-stories-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"
  ],
  "maxHighlightsPerAccount": 1
}' |
apify call coregent/instagram-stories-highlights-scraper --silent --output-dataset

```

## MCP server setup

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