# Snapchat Public Story Media Extractor (`w3crawler/snapchat-user-stories-scraper`) Actor

Read public Snapchat profile pages for visible profile and Spotlight media metadata, thumbnails, creators, and source URLs with bounded requests and explicit run diagnostics.

- **URL**: https://apify.com/w3crawler/snapchat-user-stories-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 stories

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Snapchat Public Story Media Extractor

Extract public Snapchat story and Spotlight media metadata from public profile pages. The Actor renders each profile in anonymous Chromium, reads the visible public media state and markup, and returns normalized media references with canonical Spotlight links only when a visible public link verifies them.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/snapchat-user-stories-scraper) and select **Try for free** or open the **Input** tab.
2. Add bare usernames, @-prefixed usernames, or public `/@` or `/add/` profile URLs to `usernames`.
3. Set `maxUsers` and `maxSnapsPerUser` for the run. Keep the defaults for the first pass.
4. Start the Actor, open the dataset, and export the media rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome and counts.

### Input

`usernames` is required. All other fields are optional and the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before the browser starts.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `usernames` | string array | Required | `["khaby.lame"]` | Bare usernames, @-prefixed usernames, or public HTTPS Snapchat `/@` and `/add/` profile URLs; up to 50 unique values. |
| `maxUsers` | integer | Optional | `25` | Maximum unique public profiles processed, 1–50. |
| `maxSnapsPerUser` | integer | Optional | `50` | Maximum visible story or media records retained per profile, 1–500. |
| `requestDelayMs` | integer | Optional | `250` | Delay before each public profile request, 0–30,000 ms. |
| `timeoutSecs` | integer | Optional | `30` | Timeout for each public page request, 5–60 seconds. |
| `maxResponseBytes` | integer | Optional | `5000000` | Maximum public HTML response retained in memory, 100,000–10,000,000 bytes. |
| `maxRequestRetries` | integer | Optional | `1` | Bounded retries for a failed public browser request, 0–3. |
| `proxyConfiguration` | object | Optional | `{"useApifyProxy":false}` | Optional Apify Proxy settings. Direct HTTPS is the default because public profiles are currently reachable without proxy cost. |

Full default input:

```json
{
  "usernames": [
    "khaby.lame"
  ],
  "maxUsers": 25,
  "maxSnapsPerUser": 50,
  "requestDelayMs": 250,
  "timeoutSecs": 30,
  "maxResponseBytes": 5000000,
  "maxRequestRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

The Actor reads only visible public profile-page state rendered in Chromium. It does not infer private stories, call a private story API, or substitute third-party reader data. Optional `proxyConfiguration` is used only as a transparent browser transport.

### Output

The dataset contains one row per saved public media item. Optional fields are omitted when the public profile does not expose them, and no diagnostic or placeholder rows are written.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordId` | string | Always | Stable deterministic ID derived from the public username and media identity. |
| `recordType` | string | Always | Record type; always `snapchatUserStory`. |
| `legacyRecordType` | string | When published | Backward-compatible copy of `recordType`. |
| `position` | integer | Always | One-based output position after deduplication and the `maxSnapsPerUser` bound. |
| `sourceWebsite` | string | Always | Official Snapchat source website. |
| `sourceUrl` | string | Always | Official public profile page that supplied the row. |
| `inputUrl` | string | Always | Public profile URL requested for the row. |
| `username` | string | Always | Normalized public username used for extraction. |
| `inputUsername` | string | When published | Original username or profile value supplied in the input. |
| `profileUrl` | string | Always | Canonical public Snapchat profile URL. |
| `snapId` | string | When published | Public snap identifier when exposed. |
| `storyId` | string | When published | Public story identifier when exposed. |
| `snapUrl` | string | When published | Public Spotlight URL with creator and token confirmed by a visible profile link. |
| `snapUrlVerified` | boolean | When published | Whether `snapUrl` was verified against a visible canonical public profile link. |
| `mediaUrl` | string | When published | Public media URL reference; binary media is not downloaded. |
| `thumbnailUrl` | string | When published | Public thumbnail or preview URL reference. |
| `mediaType` | string | When published | Public media type, such as `video`. |
| `title` | string | When published | Public story or media title. |
| `caption` | string | When published | Public caption or description with email-like values redacted. |
| `createdAt` | string | When published | Public creation or publication time in ISO UTC. |
| `expiresAt` | string | When published | Public expiry time in ISO UTC, when exposed. |
| `durationSeconds` | number | When published | Public media duration in seconds. |
| `viewCount` | number | When published | Public view count. |
| `likeCount` | number | When published | Public like count. |
| `shareCount` | number | When published | Public share count. |
| `commentCount` | number | When published | Public comment count. |
| `width` | number | When published | Public media width in pixels. |
| `height` | number | When published | Public media height in pixels. |
| `creatorName` | string | When published | Public creator display name. |
| `creatorUsername` | string | When published | Public creator username. |
| `creatorUrl` | string | When published | Public creator profile URL. |
| `keywords` | string array | When published | Bounded public keywords associated with the media. |
| `htmlMediaElement` | string | When published | Bounded visible `<video>` or `<source>` element evidence used by the HTML fallback parser. |
| `scrapedAt` | string | Always | Time the media row was saved, in ISO UTC. |

The example below is a real saved row from the 2026-10-25 run, limited to fields declared in the dataset schema; the long keyword array is shortened. The run saved two verified media rows from one profile; this is the first.

```json
{
  "recordId": "snapchat_user_story_eaaa691d21540f77007568fe",
  "recordType": "snapchatUserStory",
  "position": 1,
  "sourceWebsite": "https://www.snapchat.com/",
  "sourceUrl": "https://www.snapchat.com/@brentrivera",
  "inputUrl": "https://www.snapchat.com/@brentrivera",
  "username": "brentrivera",
  "inputUsername": "brentrivera",
  "profileUrl": "https://www.snapchat.com/@brentrivera",
  "snapUrl": "https://www.snapchat.com/@brentrivera/spotlight/W7_EDlXWTBiXAEEniNoMPwAAYdXd0bndkZmd1AZrNg9asAZrNg8LXAAAAAQ",
  "snapUrlVerified": true,
  "mediaUrl": "https://cf-st.sc-cdn.net/d/WPKYcMfmlLYcUdWJY1bad.27.IRZXSOY?mo=Gl4aCTIBBEgCUC5gAVCiAVoQU3BvdGxpZ2h0U2hhcmluZ6IBNwgbEiYKJAi3hGMgATCcBDjAB0ABSg8KCoMBRG07MmRgOCwQ9ANQzlRoAiILEgAqB0lSWlhTT1mQA85U&uc=46",
  "thumbnailUrl": "https://cf-st.sc-cdn.net/d/WPKYcMfmlLYcUdWJY1bad.256.IRZXSOY?mo=GkYaCTIBBEgCUC5gAVCgAVoQRGZMYXJnZVRodW1ibmFpbKIBEAiAAiILEgAqB0lSWlhTT1miARAImgoiCxIAKgdJUlpYU09Z&uc=46",
  "mediaType": "video",
  "title": "Let me know quick!!",
  "caption": "In this candid moment, Brent Rivera and friends are seen at an In-N-Out Burger, seemingly plotting whether to reveal a secret message to Sabrina Carpenter. The scene captures their playful anticipation before showing a phone screen with a pre-recorded video of Sabrina herself, creating a humorous and intimate 'reveal' scenario.",
  "createdAt": "2025-11-29T02:49:15.735Z",
  "durationSeconds": 11,
  "viewCount": 1623691,
  "likeCount": 162632,
  "commentCount": 13092,
  "width": 540,
  "height": 960,
  "creatorName": "Brent Rivera",
  "creatorUsername": "brentrivera",
  "creatorUrl": "https://www.snapchat.com/@brentrivera",
  "keywords": [
    "memes",
    "restaurants",
    "dining"
  ],
  "scrapedAt": "2026-10-25T20:48:53.221Z"
}
```

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT_SUMMARY`; `OUTPUT` is a compatibility alias with the same core fields. `SOURCE_METADATA` records the public-only policy and confirms that no third-party reader was used.

| Field | Meaning |
| --- | --- |
| `actor` | Actor slug that produced the run artifact. |
| `recordType` | Artifact discriminator; `runSummary`. |
| `status` | Source-result status: `success`, `partial`, `failed`, `no_results`, or `blocked`. The saved run uses `success`. |
| `runStatus` | Execution status; the schema uses the same lowercase values as `status`. The saved run uses `success`. |
| `dataStatus` | Completeness of the saved media rows: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `itemCount` | Number of media records emitted. |
| `storyRecords` | Number of normal story or media records emitted. |
| `diagnosticCount` | Number of bounded diagnostics. |
| `targetCount` | Normalized profile targets processed. |
| `candidateCount` | Parsed media candidates. |
| `uniqueRecordCount` | Unique media records emitted. |
| `duplicateCount` | Duplicate candidates removed. |
| `usersWithStories` | Number of profiles with at least one emitted media record. |
| `pagesRequested` | Logical profile-page requests. |
| `pagesProcessed` | Profile pages parsed successfully. |
| `requestLogicalCount` | Logical browser requests. |
| `requestAttemptCount` | Browser attempts including retries. |
| `requestErrorCount` | Requests that produced an error. |
| `successfulRequestCount` | Successful browser requests. |
| `failedRequestCount` | Requests that remained failed after retries. |
| `publicJsonResponseCount` | Public JSON responses observed by the browser. |
| `blockedCount` | Requests that hit a public access block. |
| `noResultCount` | Requests with no public story or media result. |
| `canonicalSnapUrlCount` | Visible canonical Spotlight links observed. |
| `snapUrlsVerified` | Emitted Spotlight URLs verified against visible links. |
| `snapUrlsUnverified` | Candidates whose Spotlight URL could not be verified. |
| `visitedUrls` | Unique public profile URLs visited. |
| `limits` | Input bounds and proxy settings used for the run. |
| `directHttp` | Whether direct HTTP transport was used; always `false`. |
| `sourceTransport` | Browser transport used, `chromium-rendered-public-page`. |
| `proxyUsed` | Whether Apify Proxy was used. |
| `source` | Human-readable public source description. |
| `provenance` | Stable extraction-implementation label. |
| `accessPolicy` | Public-data and access-policy disclosure. |
| `datasetWriteFailureCount` | Dataset writes that failed after collection. |
| `optionalOutputFailureCount` | Optional artifact writes that failed after the dataset was saved. |
| `startedAt` | Run start time in ISO UTC. |
| `completedAt` | Run completion time in ISO UTC. |
| `scrapedAt` | Time the summary was written, in ISO UTC. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `success` | `COMPLETE` | Media was saved for every processed profile without a later problem. |
| `partial` | `PARTIAL` | Some media was saved, but another profile or optional step failed. Saved rows remain available. |
| `no_results` | `NO_RESULTS` | The profile loaded cleanly but exposed no parseable public media. |
| `failed` | `FAILED` | No media row could be saved because of an operational failure. |

Example `OUTPUT_SUMMARY` from the saved run:

```json
{
  "actor": "snapchat-user-stories-scraper",
  "recordType": "runSummary",
  "status": "success",
  "runStatus": "success",
  "dataStatus": "COMPLETE",
  "itemCount": 2,
  "storyRecords": 2,
  "diagnosticCount": 0,
  "targetCount": 1,
  "candidateCount": 2,
  "uniqueRecordCount": 2,
  "duplicateCount": 0,
  "usersWithStories": 1,
  "pagesRequested": 1,
  "pagesProcessed": 1,
  "requestLogicalCount": 1,
  "requestAttemptCount": 1,
  "requestErrorCount": 0,
  "successfulRequestCount": 1,
  "failedRequestCount": 0,
  "publicJsonResponseCount": 0,
  "blockedCount": 0,
  "noResultCount": 0,
  "canonicalSnapUrlCount": 30,
  "snapUrlsVerified": 2,
  "snapUrlsUnverified": 0,
  "visitedUrls": [
    "https://www.snapchat.com/@brentrivera"
  ],
  "limits": {
    "usernames": [
      "brentrivera"
    ],
    "maxUsers": 1,
    "maxSnapsPerUser": 2,
    "requestDelayMs": 0,
    "timeoutSecs": 45,
    "maxResponseBytes": 5000000,
    "includeDiagnostics": false,
    "maxRequestRetries": 2
  },
  "directHttp": false,
  "sourceTransport": "chromium-rendered-public-page",
  "proxyUsed": true,
  "source": "Snapchat public profile pages",
  "provenance": "snapchat_public_profile_media_v3",
  "accessPolicy": "Public Snapchat profile state rendered in Chromium only; no login, private API, third-party reader, media download, CAPTCHA solving, or access-control bypass.",
  "startedAt": "2026-10-25T20:48:50.961Z",
  "completedAt": "2026-10-25T20:48:53.418Z",
  "scrapedAt": "2026-10-25T20:48:53.418Z"
}
```

### Coverage and limitations

The Actor extracts media metadata that the public profile page renders. It does not enumerate private stories, call a private story API, use a third-party reader, or infer media from a missing page. `maxSnapsPerUser` bounds the rows per profile, and `maxUsers` bounds the profiles processed. A profile with no parseable public media produces a clean `no_results` / `NO_RESULTS` outcome rather than a fabricated row.

`snapUrl` is emitted only when a visible public link verifies the creator and token. If verification fails, the URL is omitted and the run increments `snapUrlsUnverified`; in the saved run, 30 canonical links were observed and both emitted rows were verified. `mediaUrl` and `thumbnailUrl` are public CDN references and can expire after the run; the Actor never downloads the binary media. `caption` has email-like values redacted.

The Actor does not log in, access viewer-private data, call a private API, download media, solve CAPTCHAs, or bypass access controls. Public profiles can contain personal information, and media availability changes over time. Blocked, empty, or partial responses are reported in `OUTPUT_SUMMARY` and logs rather than written as fabricated rows. Optional Apify Proxy settings are supported only as a transparent transport.

### Usage and support

Run cost depends on Apify browser compute, the number of profiles, retries, and optional proxy usage. Start with one profile and `maxSnapsPerUser` around 10, inspect the dataset and `OUTPUT_SUMMARY`, then add profiles or raise the per-profile limit. Check `snapUrlsVerified` and `snapUrlsUnverified` before relying on Spotlight links. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/snapchat-user-stories-scraper/issues) to report a problem. Include the run ID, the input used, and the `OUTPUT_SUMMARY`; do not include tokens, cookies, or private data. This Actor is not affiliated with, endorsed by, or sponsored by Snapchat. Use it only for public data and in accordance with Snapchat's terms, robots guidance, and applicable law. Public pages can contain personal information; do not use the output for unauthorized profiling or contact.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/snapchat-user-stories-scraper/changelog.md

# Actor input Schema

## `usernames` (type: `array`):

Bare usernames, @-prefixed usernames, or public HTTPS Snapchat /@ and /add/ profile URLs. Up to 50 unique values.

## `maxUsers` (type: `integer`):

Maximum unique profiles processed.

## `maxSnapsPerUser` (type: `integer`):

Maximum visible story/media records retained per profile.

## `requestDelayMs` (type: `integer`):

Delay before each public Snapchat profile request.

## `timeoutSecs` (type: `integer`):

Timeout applied to each public page request.

## `maxResponseBytes` (type: `integer`):

Hard upper bound for each public HTML response.

## `maxRequestRetries` (type: `integer`):

Maximum retries for a failed public browser request.

## `proxyConfiguration` (type: `object`):

Optional Apify proxy configuration for public Snapchat profile requests. Direct HTTPS is the default because public profiles are currently reachable without proxy cost.

## Actor input object example

```json
{
  "usernames": [
    "khaby.lame"
  ],
  "maxUsers": 25,
  "maxSnapsPerUser": 50,
  "requestDelayMs": 250,
  "timeoutSecs": 30,
  "maxResponseBytes": 5000000,
  "maxRequestRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset containing normalized public Snapchat story and Spotlight media rows only.

## `runSummary` (type: `string`):

OUTPUT_SUMMARY key-value record with status, counts, request evidence, canonical-link evidence, bounds, and failures.

## `sourceMetadata` (type: `string`):

SOURCE_METADATA key-value record describing the public Chromium source, access policy, input, and proxy flags.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "usernames": [
        "khaby.lame"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/snapchat-user-stories-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "usernames": ["khaby.lame"] }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/snapchat-user-stories-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "usernames": [
    "khaby.lame"
  ]
}' |
apify call w3crawler/snapchat-user-stories-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/snapchat-user-stories-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/lzAZtZukMkkCdzLoi/builds/yrfyLgrf8mnvTlkFK/openapi.json
