{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat User Stories Scraper With AI Bio & Caption Insights",
    "description": "Snapchat User Stories Scraper with AI Bio & Caption Insights extracts Snapchat Stories, creator profiles, bios, captions, hashtags, timestamps, media details, and AI-powered insights. Ideal for story research, creator analysis, content trends, and audience insights.",
    "version": "0.1",
    "x-build-id": "EHivNUChvGSPJe6B0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~snapchat-user-stories-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-snapchat-user-stories-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/scrapier~snapchat-user-stories-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-snapchat-user-stories-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/scrapier~snapchat-user-stories-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-snapchat-user-stories-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": {
          "snapchatAccounts": {
            "title": "👤 Snapchat Accounts (usernames or profile URLs)",
            "type": "array",
            "description": "List one or more Snapchat usernames (e.g. fcbarcelona) or profile URLs (e.g. https://www.snapchat.com/@fcbarcelona). Each account's stories, highlights, profile bio, and Spotlight videos are scraped.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Legacy: startUrls (base actor alias)",
            "type": "array",
            "description": "Legacy alias for the base Snapchat User Stories Scraper's `startUrls` field -- same accepted values (usernames or profile URLs). Use `snapchatAccounts` above instead; this is kept only so base-actor input JSON keeps working.",
            "items": {
              "type": "string"
            }
          },
          "maxSnapsPerStory": {
            "title": "📸 Max Snaps per Story/Highlight",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of snaps to collect per story or highlight. Example: maxSnapsPerStory=20 → up to 20 snaps for the main story and up to 20 for each highlight. Default is 100."
          },
          "maxSnaps": {
            "title": "🔢 Legacy: maxSnaps (base actor alias)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Legacy alias for the base actor's `maxSnaps` field. Use `maxSnapsPerStory` above instead; this is kept only so base-actor input JSON keeps working."
          },
          "aiEnhancement": {
            "title": "🤖 Enable AI Bio & Caption Insights",
            "type": "boolean",
            "description": "When enabled, the account's profile bio + Spotlight video captions/hashtags/titles are sent to an AI model for sentiment/topic analysis and niche/category classification (the two sub-toggles below). Off by default -- requires an API key.",
            "default": false
          },
          "aiModel": {
            "title": "🤖 AI Model / Provider",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-4-8",
              "claude-fable-5",
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4.1-mini",
              "gpt-4.1",
              "o3-mini",
              "o1",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-1.5-pro",
              "gemini-2.5-flash",
              "gemini-2.5-pro",
              "grok-2-latest",
              "grok-3-mini",
              "grok-3",
              "grok-beta",
              "deepseek-chat",
              "deepseek-reasoner",
              "sonar",
              "sonar-pro",
              "sonar-reasoning",
              "mistral-small-latest",
              "mistral-large-latest"
            ],
            "type": "string",
            "description": "Only used when AI Bio & Caption Insights is enabled. Provider auto-detected from the name: claude-*=Anthropic, gpt-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Cheaper mini/flash/haiku models are recommended for this kind of classification.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 AI Provider API Key",
            "type": "string",
            "description": "API key for the selected AI provider. Only needed when AI Bio & Caption Insights is enabled. Falls back to an environment variable on the account if left empty (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY)."
          },
          "enableSentimentAnalysis": {
            "title": "🙂 AI Sentiment & Topic Analysis",
            "type": "boolean",
            "description": "When AI Bio & Caption Insights is enabled: classify the account's overall bio + Spotlight caption/hashtag/title text into sentiment (positive/neutral/negative), a tone score, up to 5 topics, and detected language. Default: enabled.",
            "default": true
          },
          "enableNicheClassification": {
            "title": "🏷️ AI Niche/Category Classification",
            "type": "boolean",
            "description": "When AI Bio & Caption Insights is enabled: classify the account's niche/category (e.g. fashion, sports, entertainment) from the same bio + Spotlight text -- useful for lead/influencer-discovery filtering. A distinct classification from sentiment analysis above. Default: enabled.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Choose which proxies to use. By default, no proxy is used. If Snapchat rejects or blocks the request, the actor automatically falls back to datacenter proxy, then residential proxy with 3 retries."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}