{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat Spotlight Scraper (Language & Topic Filters)",
    "description": "Scrape Snapchat Spotlight videos by language and topic. Extract video details, creators, captions, hashtags, engagement metrics, timestamps, and more. Ideal for trend research, content analysis, competitor insights, and audience discovery.",
    "version": "0.1",
    "x-build-id": "PqC9JpgZaAJfdoJv3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~snapchat-spotlight-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-snapchat-spotlight-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/api-empire~snapchat-spotlight-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-snapchat-spotlight-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/api-empire~snapchat-spotlight-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-snapchat-spotlight-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": {
          "spotlightsToClassify": {
            "title": "🗣️ Spotlight links to classify",
            "type": "array",
            "description": "One Snapchat Spotlight URL or bare video ID per line.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "🔁 Spotlight URLs (legacy field)",
            "type": "array",
            "description": "Legacy input kept for compatibility. Used only when 'Spotlight links to classify' above is empty.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Maximum videos to process",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many links from the input above have been processed. Example: 100 processes at most 100 links. 0 processes every link. Default is 0.",
            "default": 0
          },
          "skipDuplicateSpotlights": {
            "title": "🧹 Skip duplicate links",
            "type": "boolean",
            "description": "When two input links point at the same Spotlight video, fetch and save it only once. Default is true.",
            "default": true
          },
          "includeContentSignals": {
            "title": "🧠 Read language, keywords & scene data",
            "type": "boolean",
            "description": "When on, each row carries the detected language, its confidence, the scored keyword list and (unless disabled below) a scene description. Turn off to skip these fields entirely.",
            "default": true
          },
          "includeSceneDescription": {
            "title": "🎬 Include scene description",
            "type": "boolean",
            "description": "When on, adds a one-sentence description of what the video shows, plus its scene keywords. Requires the toggle above.",
            "default": true
          },
          "minKeywordScore": {
            "title": "📈 Minimum keyword score",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Drop scored keywords below this confidence (0-1) from the returned list. Default 0 keeps every scored keyword.",
            "default": 0
          },
          "lowConfidenceLanguageThreshold": {
            "title": "⚠️ Low-confidence language threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "A video's detected language is flagged 'low confidence' (detectedLanguageIsLowConfidence = true) when its score is below this value (0-1). Does not remove any row by itself.",
            "default": 0.6
          },
          "languages": {
            "title": "🌍 Only these detected languages",
            "type": "array",
            "description": "ISO-style language codes to keep (e.g. en, es, ko). Leave empty to keep every language.",
            "items": {
              "type": "string"
            }
          },
          "excludeLanguages": {
            "title": "🚫 Exclude these detected languages",
            "type": "array",
            "description": "Language codes to drop. Leave empty to exclude none.",
            "items": {
              "type": "string"
            }
          },
          "minLanguageConfidence": {
            "title": "🎯 Minimum language confidence",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Drop videos whose detected-language confidence is below this value (0-1). Default 0 keeps every confidence level. Snapchat's detector is sometimes wrong at low confidence, which is exactly why this exists.",
            "default": 0
          },
          "includeUnclassifiedVideos": {
            "title": "❔ Keep videos with no language signal",
            "type": "boolean",
            "description": "When on and no language filter above is set, videos Snapchat did not attach a language signal to are still returned (with detectedLanguage = null). When any language filter is set, such videos cannot be evaluated against it and are dropped either way.",
            "default": true
          },
          "topicKeywords": {
            "title": "🏷️ Only these topics",
            "type": "array",
            "description": "Keep only videos where at least one of these terms appears in the field(s) selected below. Leave empty to keep every topic. This searches data already in the payload — it is not a Snapchat search and cannot find videos outside the links you submit.",
            "items": {
              "type": "string"
            }
          },
          "excludeTopicKeywords": {
            "title": "🚫 Exclude these topics",
            "type": "array",
            "description": "Drop videos where any of these terms appears in the field(s) selected below. Leave empty to exclude none.",
            "items": {
              "type": "string"
            }
          },
          "topicMatchFields": {
            "title": "🔎 Topic match fields",
            "enum": [
              "scoredKeywords",
              "sceneText",
              "captionHashtags",
              "onScreenText",
              "all"
            ],
            "type": "string",
            "description": "Which field(s) topic terms are matched against.",
            "default": "all"
          },
          "includeLanguageBreakdown": {
            "title": "📚 Add a run-level language & topic breakdown row",
            "type": "boolean",
            "description": "When on, one extra row is added at the end of the run summarizing the language mix, confidence and topic matches across every video submitted.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Connection",
            "type": "object",
            "description": "Optional. Leave empty to use the default connection, or choose your own proxy settings."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}