{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat Highlight & Story Media Downloader",
    "description": "Pull individual snaps from a Snapchat profile's saved highlight albums and live story, with downloadable video/image links, post timestamps, and the creator's subscriber count and bio attached.",
    "version": "1.0",
    "x-build-id": "jnoJZ0OjjNipIstNX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~snapchat-highlight-and-story-media-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-snapchat-highlight-and-story-media-downloader",
        "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/dataspryva~snapchat-highlight-and-story-media-downloader/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-snapchat-highlight-and-story-media-downloader",
        "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/dataspryva~snapchat-highlight-and-story-media-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-snapchat-highlight-and-story-media-downloader",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "profiles",
              "urls"
            ],
            "type": "string",
            "description": "What to scrape. profiles = look up usernames or profile URLs and collect their highlights and active story. urls = process pasted profile, highlight or active-story snap links, including highlights that are not on the rendered profile page.",
            "default": "profiles"
          },
          "usernames": {
            "title": "Usernames or Profile URLs",
            "type": "array",
            "description": "(mode=profiles) One or more Snapchat usernames or profile URLs. Accepts bare username (brentrivera), @-prefixed (@brentrivera), add URL (https://www.snapchat.com/add/brentrivera) and profile URL (https://www.snapchat.com/@brentrivera).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Profile, Highlight or Story Links",
            "type": "array",
            "description": "(mode=urls) Paste profile links, highlight links (https://www.snapchat.com/@user/highlight/<id>) or active-story snap links (https://www.snapchat.com/@user/<snapId>). Each link is resolved to exactly the content it names.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sources": {
            "title": "Story Sources",
            "type": "array",
            "description": "Which story surfaces to collect in profiles mode. curatedHighlights = saved highlight albums. activeStory = the currently public 24-hour story. Highlight-link mode always returns the linked highlight.",
            "items": {
              "type": "string",
              "enum": [
                "curatedHighlights",
                "activeStory"
              ],
              "enumTitles": [
                "Curated highlights",
                "Active story"
              ]
            },
            "default": [
              "curatedHighlights",
              "activeStory"
            ]
          },
          "maxSnapsPerUser": {
            "title": "Max Snaps Per Target",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum snaps to save per profile, highlight or story-snap target. Supports large highlight albums up to the clip length shown by Snapchat.",
            "default": 50
          },
          "maxHighlightsPerUser": {
            "title": "Max Highlights Per Profile",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many of a profile's saved highlight albums to read, in the order Snapchat renders them. 0 uses every highlight on the page.",
            "default": 0
          },
          "maxItems": {
            "title": "Max Records",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on snap records saved in the run across all targets. The actor stops cleanly when it reaches this number.",
            "default": 5000
          },
          "postedAfter": {
            "title": "Posted After",
            "type": "string",
            "description": "Only keep snaps posted on or after this date (YYYY-MM-DD or full ISO 8601). Saved highlights can stay live for years, so set this to your last run date when you only want new snaps. Leave empty for everything."
          },
          "downloadMedia": {
            "title": "Store Durable Media Copies",
            "type": "boolean",
            "description": "Download each image/video into this run's Apify key-value store and return permanent public URLs. The original Snapchat CDN URL stays in a matching *Original field. Capped at 200 files and 50 MB per file per run; failures keep the direct URL. Costs extra storage and bandwidth; off by default because Snapchat CDN links work for immediate downloads.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional Apify proxy override. Public Snapchat profiles work without a proxy."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}