{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Stories & Highlights Scraper - Media Export",
    "description": "Export accessible Instagram Stories and Highlights with direct media URLs, timestamps, captions, links, mentions, hashtags, stickers, music, profile metrics, and Highlight context. Use usernames, profile URLs, date filters, CSV, Excel, JSON, API, or MCP. Authorized session cookie required.",
    "version": "0.1",
    "x-build-id": "vLZ955PFCgYK1MBoX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetch_cat~instagram-stories-highlights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetch_cat-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/fetch_cat~instagram-stories-highlights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetch_cat-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/fetch_cat~instagram-stories-highlights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetch_cat-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",
        "required": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "Instagram profiles",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Instagram usernames, @handles, or exact profile URLs. Private profiles are not supported. Duplicate profiles run once.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "maxProfiles": {
            "title": "Maximum profiles",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap for unique profiles processed in one run.",
            "default": 2
          },
          "includeStories": {
            "title": "Include active stories",
            "type": "boolean",
            "description": "Collect currently active story items visible to the provided Instagram session.",
            "default": true
          },
          "includeHighlights": {
            "title": "Include saved highlights",
            "type": "boolean",
            "description": "Collect highlight collections and their accessible saved story items.",
            "default": true
          },
          "maxHighlightsPerProfile": {
            "title": "Maximum highlights per profile",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Limit highlight collections per profile. Use 0 to skip highlight items while retaining the option for backward-compatible inputs.",
            "default": 10
          },
          "maxItemsPerHighlight": {
            "title": "Maximum items per highlight",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Limit saved story items exported from each highlight collection.",
            "default": 20
          },
          "sinceDate": {
            "title": "Only media on or after",
            "type": "string",
            "description": "Optional ISO date or timestamp. Older story/highlight items are filtered after Instagram returns them."
          },
          "saveProfileOnNoMedia": {
            "title": "Save verified no-media rows",
            "type": "boolean",
            "description": "Save one profile_status row when authorized requests succeed but no matching story/highlight media is available.",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw media objects",
            "type": "boolean",
            "description": "Preserve the source media object in raw. Enabled by default for backward compatibility; disable it for smaller datasets.",
            "default": true
          },
          "instagramCookies": {
            "title": "Instagram session cookie",
            "type": "string",
            "description": "Required at runtime: enter a sessionid value or full Cookie header from an Instagram session authorized to view the requested public content. Public examples intentionally omit it. It is used only for this run. Never share it in issues or logs."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Residential or ISP routes are usually more reliable for Instagram. Retries use bounded profile-specific sessions.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "retryCount": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries for rate limits, blocks, transient server errors, and network failures.",
            "default": 3
          },
          "initialRetryDelayMillis": {
            "title": "Initial retry delay (milliseconds)",
            "minimum": 250,
            "maximum": 30000,
            "type": "integer",
            "description": "Initial backoff; later retries increase the delay and honor Retry-After when present.",
            "default": 1000
          },
          "requestPacingMillis": {
            "title": "Delay between Instagram requests (milliseconds)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pacing between successful requests to reduce session pressure.",
            "default": 350
          },
          "runTimeSecs": {
            "title": "Safe work time (seconds)",
            "minimum": 30,
            "maximum": 1740,
            "type": "integer",
            "description": "Stop before the platform timeout so saved media and RUN_SUMMARY can be finalized.",
            "default": 1680
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}