{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Stories & Highlights Scraper · Download · No Login",
    "description": "Instagram Stories & Highlights Scraper — pull active stories and permanent highlights from any public account. Image & video URLs, media type, timestamps, music, and highlight titles. Optional permanent file download. No login, no cookies. Stories, highlights, or both. JSON/CSV/Excel.",
    "version": "1.0",
    "x-build-id": "aEeHshB5rS9d72GAh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~instagram-stories-highlights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-instagram-stories-highlights-scraper",
        "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/memo23~instagram-stories-highlights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-instagram-stories-highlights-scraper",
        "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/memo23~instagram-stories-highlights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-instagram-stories-highlights-scraper",
        "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",
        "properties": {
          "usernames": {
            "title": "Instagram usernames or direct story/highlight/share URLs",
            "type": "array",
            "description": "Public Instagram accounts whose active stories and/or highlights you want to scrape. Accepts plain handles (nytimes), @-handles (@nytimes), profile URLs (https://www.instagram.com/nytimes), direct story URLs (/stories/user/ID), direct highlight URLs (/stories/highlights/ID), or mobile /s/ share links. Active live broadcasts are also detected and attached automatically. Optional if highlightIds is provided.",
            "items": {
              "type": "string"
            }
          },
          "highlightIds": {
            "title": "Direct highlight IDs or URLs",
            "type": "array",
            "description": "Optional. Target specific Instagram highlight trays directly without scraping every highlight of a user. Accepts bare numeric IDs (17895485201123456), highlight:17895485201123456, or full highlight URLs (https://www.instagram.com/stories/highlights/17895485201123456/). Can be used alone or alongside usernames.",
            "items": {
              "type": "string"
            }
          },
          "dataToScrape": {
            "title": "Data to scrape",
            "enum": [
              "stories",
              "highlights",
              "both"
            ],
            "type": "string",
            "description": "Which to collect for each account: Stories (active 24h stories), Highlights (permanent highlight trays), or both. Overridden if includeStories / includeActiveStories / includeHighlights are explicitly set.",
            "default": "stories"
          },
          "expandHighlightItems": {
            "title": "Expand highlight trays into individual story items",
            "type": "boolean",
            "description": "When enabled (default), expands each highlight tray and returns all of its story items (billed per expanded tray). When disabled, returns lightweight highlight tray metadata (id, title, coverImageUrl, mediaCount, url, timestamps) without expanding items or incurring highlight-tray expansion charges.",
            "default": true
          },
          "maxHighlightsPerUser": {
            "title": "Max highlight trays per user",
            "minimum": 1,
            "type": "integer",
            "description": "Cap how many highlight trays to collect per account. Leave empty for all trays. Ignored for stories."
          },
          "maxStoriesPerHighlight": {
            "title": "Max items per highlight tray",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Cap how many media items to emit from each individual highlight tray (applies to both user highlights and direct highlightIds). Leave empty for all items in each tray."
          },
          "maxStoriesPerUser": {
            "title": "Max stories per account",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Take at most this many of an account's active stories (newest first, as Instagram lists them). Leave empty for all of them. Stories are billed per account, so this trims the rows, not the price."
          },
          "maxTotalItems": {
            "title": "Max total items (global run cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Hard global ceiling on total story, highlight, or highlight tray items emitted across the entire run (across all usernames and highlightIds). Once reached, remaining accounts and trays are skipped immediately."
          },
          "downloadMedia": {
            "title": "Download media files",
            "type": "boolean",
            "description": "Also download each image/video and save it permanently to storage, returning a non-expiring downloadUrl per item. Instagram's own media URLs expire after a few hours — enable this to keep the files. Adds run time and a small per-file charge. Default: off.",
            "default": false
          },
          "includeHistorical": {
            "title": "Include historical (archived) stories",
            "type": "boolean",
            "description": "Also return stories and highlight items captured on earlier runs that a live scrape can no longer see — expired or deleted stories. Each historical row is tagged source:\"archive\" with firstSeenAt/lastSeenAt. Paying accounts only. Off by default. Example: enable to pull a creator's expired stories from the archive alongside what's live right now.",
            "default": false
          },
          "includeStatusRows": {
            "title": "Include status rows for empty, private, or failed targets",
            "type": "boolean",
            "description": "When enabled, emits structured status rows (type: \"status\", username, status: \"private\" | \"not_found\" | \"no_active_stories\" | \"no_highlights\" | \"error\", message) instead of silently omitting empty accounts or emitting legacy error objects. Status rows are never billed for per-item or highlight-tray events. Default: off.",
            "default": false
          },
          "compactOutput": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Emit sleek rows containing only core media/tray fields (omitting verbose sticker arrays, dimensions, audio/music metadata, and live broadcast detail objects). Alias: compact. Default: off.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields",
            "type": "boolean",
            "description": "Remove null, empty string, empty array, and empty object fields from output rows (while preserving 0 and false). Default: off.",
            "default": false
          },
          "includeStories": {
            "title": "Include stories (alias)",
            "type": "boolean",
            "description": "Optional drop-in alias for dataToScrape. Explicitly enable or disable active 24h stories for accounts in usernames."
          },
          "includeActiveStories": {
            "title": "Include active stories (alias)",
            "type": "boolean",
            "description": "Optional drop-in alias for includeStories."
          },
          "includeHighlights": {
            "title": "Include highlights (alias)",
            "type": "boolean",
            "description": "Optional drop-in alias for dataToScrape. Explicitly enable or disable highlight trays for accounts in usernames."
          },
          "maxActiveStoriesPerUser": {
            "title": "Max active stories per user (alias)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional drop-in alias for maxStoriesPerUser."
          },
          "compact": {
            "title": "Compact (alias for compactOutput)",
            "type": "boolean",
            "description": "Optional drop-in alias for compactOutput."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}