# Instagram Stories Scraper (`vero-api/instagram-stories-scraper`) Actor

Get every active Instagram story from any account you can view — direct image and video links, mentions, hashtags, link stickers, music, location, and when each story expires.

- **URL**: https://apify.com/vero-api/instagram-stories-scraper.md
- **Developed by:** [VeroAPIs](https://apify.com/vero-api) (community)
- **Categories:** Social media, Videos, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 instagram stories

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Stories Scraper — every active story, with direct media links

Give it a list of accounts and get back every story they have live right now: the
full-size image or MP4, who and what is tagged, the link sticker, the song, and the
exact minute each story expires.

### What you can do

- Download story images and videos in full quality before they disappear.
- Track what competitors and creators post every day.
- See which accounts, hashtags, and links a story sends viewers to.
- Know exactly when each story expires, down to the second.
- Spot paid partnerships and the brands behind them.

### How to use it

1. Add the accounts you want — usernames, profile links, or story links all work.
2. Click **Start**.
3. Download your results as JSON, CSV, or Excel.

No Instagram login needed. Every public account works straight away.

Want stories from private accounts you follow? Connect your own Instagram session under
**Advanced** — see [Using your own Instagram session](#using-your-own-instagram-session).

### What you get

One row per story, with the media ready to download:

| Account | Type | Posted | Expires | Mentions | Story link |
|---|---|---|---|---|---|
| natgeo | video | 2026-08-04 09:12 | 2026-08-05 09:12 | nasa | [open](https://www.instagram.com/stories/natgeo/3512345678901234567/) |

```json
{
  "username": "natgeo",
  "url": "https://www.instagram.com/stories/natgeo/3512345678901234567/",
  "storyId": "3512345678901234567",
  "type": "video",
  "fullName": "National Geographic",
  "isVerified": true,
  "displayUrl": "https://instagram.com/…/story.jpg",
  "videoUrl": "https://instagram.com/…/story.mp4",
  "width": 1080,
  "height": 1920,
  "videoDuration": 14.9,
  "postedAt": "2026-08-04T09:12:07.000Z",
  "expiresAt": "2026-08-05T09:12:07.000Z",
  "mentions": ["nasa"],
  "hashtags": ["wildlife"],
  "links": ["https://www.nationalgeographic.com/"],
  "location": { "id": "212988663", "name": "Serengeti National Park", "lat": -2.33, "lng": 34.83 },
  "musicTitle": "Bad Guy",
  "musicArtist": "Billie Eilish",
  "isPaidPartnership": false
}
```

Story media links are short-lived, so download the files you want to keep.

### Using your own Instagram session

Public accounts work with no setup at all. Adding your own `sessionid` under **Advanced**
also gets you the private accounts you already follow — the run sees exactly what your
account sees.

To find it: open Instagram in your browser, then DevTools → Application → Cookies →
`instagram.com`, and copy the `sessionid` value.

Here is exactly what happens to that cookie:

- **It only ever goes to instagram.com.** The actor talks to no other host — no analytics,
  no third party, nowhere else.
- **Only your run can read it.** Apify encrypts it the moment you enter it, and it can only
  be decrypted inside your own run. It is masked in the input tab.
- **It never lands in your results.** Not in the dataset, not in the logs, not in any file.
- **It lives only as long as your run does.** Delete the run and the encrypted value goes
  with it.

You can revoke it any time by logging out of Instagram in your browser, which retires that
`sessionid` everywhere.

### Real-time API

Need stories on demand? Turn on **Standby mode** and call the actor like a live API — one
account per request, every live story straight back in the HTTP response. Perfect for
checking an account the moment someone asks, instead of waiting on a run.

Every request needs your Apify token, passed as a `Bearer` token (or a `?token=` query param).

```bash
curl "https://vero-api--instagram-stories-scraper.apify.actor/?username=nasa" \
  -H "Authorization: Bearer <APIFY_TOKEN>"
```

A username, a profile link, or a story link all work:

```bash
curl "https://vero-api--instagram-stories-scraper.apify.actor/?username=https://www.instagram.com/nasa/" \
  -H "Authorization: Bearer <APIFY_TOKEN>"
```

The response names the account once, then lists its stories with the media grouped together:

```json
{
  "account": {
    "username": "nasa",
    "profileUrl": "https://www.instagram.com/nasa/",
    "userId": "528817151",
    "fullName": "NASA",
    "isVerified": true,
    "profilePicUrl": "https://instagram.com/…/nasa.jpg"
  },
  "storiesCount": 1,
  "stories": [
    {
      "id": "3512345678901234567",
      "url": "https://www.instagram.com/stories/nasa/3512345678901234567/",
      "type": "video",
      "postedAt": "2026-08-04T09:12:07.000Z",
      "expiresAt": "2026-08-05T09:12:07.000Z",
      "media": {
        "imageUrl": "https://instagram.com/…/story.jpg",
        "videoUrl": "https://instagram.com/…/story.mp4",
        "width": 1080,
        "height": 1920,
        "durationSeconds": 14.9
      },
      "caption": "A rocket lifts off at sunrise",
      "mentions": ["spacex"],
      "hashtags": ["artemis"],
      "links": ["https://www.nasa.gov/"],
      "location": { "id": "212988663", "name": "Kennedy Space Center", "lat": 28.57, "lng": -80.65 },
      "music": { "title": "Starman", "artist": "David Bowie" },
      "sponsors": [],
      "isPaidPartnership": false
    }
  ]
}
```

When an account has nothing live you get `storiesCount: 0`, an empty `stories` list, and a
`message` telling you why. Ask for an account that does not exist and you get a `404`.

**Private accounts you follow.** Send your own Instagram `sessionid` in the
`x-instagram-sessionid` header and the request sees exactly what your account sees. Leave the
header out and the actor uses its own session, which covers every public account.

```bash
curl "https://vero-api--instagram-stories-scraper.apify.actor/?username=nasa" \
  -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "x-instagram-sessionid: <YOUR_SESSIONID>"
```

Your session travels in a header rather than the URL, so it stays out of server logs, browser
history, and proxy logs. See [Using your own Instagram session](#using-your-own-instagram-session)
for where to find the value and exactly how it is handled.

### Pricing

You pay only for the stories you get — no subscriptions, no surprises.

### FAQ

**Do I need to log in?** No. Public accounts work with no setup at all.

**Can I get stories from private accounts?** Yes — paste your own `sessionid` under
**Advanced**, and you get every private account you already follow.

**Is my Instagram session safe?** Yes. It goes only to instagram.com, it is encrypted so
that only your own run can read it, and it never appears in your results or logs. See
[Using your own Instagram session](#using-your-own-instagram-session).

**What if an account has no stories up?** You get one row for that account explaining
it — nothing is silently dropped.

**Can I call it like an API?** Yes — turn on **Standby mode** and request one account at a
time over HTTP. See [Real-time API](#real-time-api).

**How fresh is the data?** Live. Every run reads the stories that are up at that
moment, which is why the expiry time is included on every row.

# Actor input Schema

## `profiles` (type: `array`):

The accounts whose stories you want. Add usernames, profile links, or story links — one per line.

## `sessionCookie` (type: `string`):

Leave empty to use the actor's own session — that covers every public account. Add your own `sessionid` to also get private accounts you follow, and to run on your account's own capacity: in your browser, DevTools → Application → Cookies → instagram.com → copy `sessionid`. It is sent only to instagram.com, encrypted so that only your own run can read it, and never written to your results or logs.

## Actor input object example

```json
{
  "profiles": [
    "natgeo",
    "https://www.instagram.com/nasa/"
  ]
}
```

# Actor output Schema

## `results` (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 = {
    "profiles": [
        "natgeo",
        "https://www.instagram.com/nasa/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vero-api/instagram-stories-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 = { "profiles": [
        "natgeo",
        "https://www.instagram.com/nasa/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("vero-api/instagram-stories-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 '{
  "profiles": [
    "natgeo",
    "https://www.instagram.com/nasa/"
  ]
}' |
apify call vero-api/instagram-stories-scraper --silent --output-dataset

```

## MCP server setup

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