# Snapchat Public Spotlight Comments Extractor (`w3crawler/snapchat-spotlight-comments-scraper`) Actor

Read public Snapchat Spotlight/profile pages with bounded requests and extract comment records only when comments are embedded in public server-rendered state.

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

## Pricing

from $2.99 / 1,000 comments

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 Spotlight Comments Extractor

Inspect public Snapchat Spotlight URLs or public profile pages and return comment records only when Snapchat embeds those comments in the rendered public page state. The Actor uses anonymous Chromium, does not call a private comments service, and does not log in, download videos, solve CAPTCHAs, or bypass access controls.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/snapchat-spotlight-comments-scraper) and select **Try for free** or open the **Input** tab.
2. Choose `mode`: `byUsername` for public profile pages or `bySpotlightUrl` for public Spotlight URLs.
3. Supply the matching target list in `usernames` or `spotlightUrls`, and set `maxTargets` and `maxCommentsPerSnap` for the run.
4. Start the Actor, open the dataset, and export the saved comments as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome and counts.

### Input

All fields are optional, but a run needs targets for the selected mode: `usernames` for `byUsername` or `spotlightUrls` for `bySpotlightUrl`. The defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `mode` | string enum | Optional | `byUsername` | `byUsername` inspects public profile pages; `bySpotlightUrl` inspects public Spotlight URLs. |
| `spotlightUrls` | string array | Optional | `[]` | Public HTTPS Snapchat `/spotlight/` URLs used in `bySpotlightUrl` mode; up to 50 values. |
| `usernames` | string array | Optional | `["brentrivera"]` | Public Snapchat usernames used in `byUsername` mode; @ prefixes are accepted; up to 50 values. |
| `maxTargets` | integer | Optional | `10` | Maximum public Spotlight URLs or profile usernames processed, 1–50. |
| `maxCommentsPerSnap` | integer | Optional | `50` | Maximum embedded comment rows retained per target, 1–500. Despite the name, the bound is applied per target. |
| `requestDelayMs` | integer | Optional | `250` | Delay before each public page request, 0–30,000 ms. |
| `maxConcurrency` | integer | Optional | `1` | Maximum concurrent public page requests, 1–5. |
| `timeoutSecs` | integer | Optional | `45` | Per-page timeout, 5–60 seconds. |
| `maxResponseBytes` | integer | Optional | `5000000` | Maximum public response body retained in memory, 100,000–10,000,000 bytes. |
| `maxRequestRetries` | integer | Optional | `1` | Bounded Chromium retries per page, 0–2. |
| `proxyConfiguration` | object | Optional | `{"useApifyProxy":false}` | Optional Apify Proxy settings. Direct HTTPS is the default because public profile pages are currently reachable without proxy cost. |

Full default input:

```json
{
  "mode": "byUsername",
  "spotlightUrls": [],
  "usernames": [
    "brentrivera"
  ],
  "maxTargets": 10,
  "maxCommentsPerSnap": 50,
  "requestDelayMs": 250,
  "maxConcurrency": 1,
  "timeoutSecs": 45,
  "maxResponseBytes": 5000000,
  "maxRequestRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

The Actor reads only visible public Snapchat HTML and server-rendered page state. It does not call a comments endpoint, load comments through the Snapchat app, or request viewer-private data. The selected mode must match the supplied target list; otherwise the run has no targets to inspect. Optional `proxyConfiguration` is used only as a transparent browser transport.

### Output

The dataset contains one row per saved comment. Optional fields are omitted when the embedded public comment state does not expose them; values are not inferred, and no diagnostic or placeholder rows are written.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordId` | string | Always | Stable comment identifier derived from the target and comment identity. |
| `recordType` | string | Always | Record type; always `snapchatSpotlightComment`. |
| `legacyRecordType` | string | When published | Backward-compatible copy of `recordType`. |
| `position` | integer | Always | One-based comment position after deduplication and the `maxCommentsPerSnap` bound. |
| `sourceWebsite` | string | Always | Official Snapchat source website. |
| `sourceUrl` | string | Always | Public profile or Spotlight page that supplied the comment. |
| `inputUrl` | string | When published | Public target URL supplied in the input. |
| `targetUrl` | string | Always | Normalized public target URL visited for the comment. |
| `mode` | string enum | When published | Mode used for the target: `byUsername` or `bySpotlightUrl`. |
| `targetType` | string enum | When published | `profile` for a username target or `spotlight` for a Spotlight URL target. |
| `snapUrl` | string | When published | Public URL of the Spotlight snap associated with the comment. |
| `snapId` | string | When published | Snapchat identifier for the Spotlight snap. |
| `commentId` | string | Always | Source comment identifier used as the record identity. |
| `sourceCommentId` | string | When published | Underlying comment identifier before the row-specific suffix is added. |
| `text` | string | Always | Public comment text. |
| `authorId` | string | When published | Snapchat identifier for the comment author. |
| `authorUsername` | string | When published | Public username of the comment author, when the embedded state exposes it. |
| `authorDisplayName` | string | When published | Public display name of the comment author. |
| `authorProfileUrl` | string | When published | Public profile URL for the comment author. |
| `likeCount` | integer | When published | Public like count on the comment. |
| `replyCount` | integer | When published | Public reply count on the comment. |
| `createdAt` | string | When published | Comment creation time in ISO UTC. |
| `sourcePath` | string | When published | Location in the public page state where the embedded comment was found, such as `props.pageProps.encodedSpotlightComments.decoded.0`. |
| `scrapedAt` | string | Always | Time the comment 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 embedded state did not expose an `authorUsername` or `authorProfileUrl` for this comment, so those fields are absent.

```json
{
  "recordId": "snapchat_comment_ad96f940e9a5eb1c952a5ff3",
  "recordType": "snapchatSpotlightComment",
  "legacyRecordType": "snapchatSpotlightComment",
  "position": 1,
  "sourceWebsite": "https://www.snapchat.com/",
  "sourceUrl": "https://www.snapchat.com/@brentrivera",
  "inputUrl": "https://www.snapchat.com/@brentrivera",
  "targetUrl": "https://www.snapchat.com/@brentrivera",
  "mode": "byUsername",
  "targetType": "profile",
  "snapId": "W7_EDlXWTBiXAEEniNoMPwAAYdXd0bndkZmd1AZrNg9asAZrNg8LXAAAAAQ",
  "commentId": "5758741031064062807:10259145918106167697_12fe893f8afa",
  "sourceCommentId": "5758741031064062807:10259145918106167697",
  "text": "Yess I bet she would be sooo happy",
  "authorId": "17654372085560593316:11015253187255888454",
  "authorDisplayName": "⭐️MIKAYLA⭐️",
  "likeCount": 4101,
  "replyCount": 29,
  "createdAt": "2025-11-29T02:52:46.983Z",
  "sourcePath": "props.pageProps.encodedSpotlightComments.decoded.0",
  "scrapedAt": "2026-10-25T20:44:39.893Z"
}
```

### 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 the comments service was not used.

| Field | Meaning |
| --- | --- |
| `actor` | Actor slug that produced the run artifact. |
| `recordType` | Artifact discriminator; `runSummary`. |
| `status` | Source-result status. The schema accepts `SUCCEEDED`/`FAILED` plus the lowercase `success`, `partial`, `no_results`, `blocked`, `failed`, and `input_validation`; the saved run uses `success`. |
| `runStatus` | Execution status. The schema accepts the same values as `status`; the saved run uses `success`. |
| `dataStatus` | Completeness of the saved comments: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `itemCount` | Number of comment records saved. |
| `publicRecords` | Number of public records saved. |
| `commentRecords` | Number of comment records saved. |
| `diagnosticCount` | Number of operational issues recorded for the run. |
| `targetCount` | Number of public targets processed. |
| `targetsWithComments` | Number of targets that produced at least one embedded comment. |
| `candidateCount` | Embedded comment candidates parsed before deduplication. |
| `incompleteRecordCount` | Candidates skipped because required public comment fields were missing. |
| `uniqueIdentities` | Unique comment identities saved. |
| `duplicateCount` | Duplicate comments removed. |
| `requestLogicalCount` | Logical page requests made. |
| `requestAttemptCount` | Page requests including retries. |
| `requestErrorCount` | Page requests that produced an error. |
| `successfulRequestCount` | Page requests that completed successfully. |
| `failedRequestCount` | Page requests that remained failed after retries. |
| `pagesRequested` | Public pages requested. |
| `pagesProcessed` | Public pages parsed successfully. |
| `publicJsonResponseCount` | Public JSON responses observed by the browser. |
| `renderedMediaElementCount` | Rendered media elements observed on the page. |
| `visitedUrls` | Public Snapchat 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. |
| `customUserAgentUsed` | Whether a custom user agent was used; always `false`. |
| `stealthPatchesUsed` | Whether stealth patches were used; always `false`. |
| `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` (or `SUCCEEDED`) | `COMPLETE` | Every processed target produced its available rows without a later problem. |
| `partial` | `PARTIAL` | Some comments were saved, but another target or optional step failed. Saved rows remain available. |
| `no_results` | `NO_RESULTS` | The pages loaded cleanly but exposed no embedded comments. |
| `failed` | `FAILED` | No comment row could be saved because of an operational failure. |

Example `OUTPUT_SUMMARY` from the saved run:

```json
{
  "actor": "snapchat-spotlight-comments-scraper",
  "recordType": "runSummary",
  "status": "success",
  "runStatus": "success",
  "dataStatus": "COMPLETE",
  "itemCount": 2,
  "publicRecords": 2,
  "commentRecords": 2,
  "diagnosticCount": 0,
  "targetCount": 1,
  "targetsWithComments": 1,
  "candidateCount": 2,
  "incompleteRecordCount": 0,
  "uniqueIdentities": 2,
  "duplicateCount": 0,
  "requestLogicalCount": 1,
  "requestAttemptCount": 1,
  "requestErrorCount": 0,
  "successfulRequestCount": 1,
  "failedRequestCount": 0,
  "pagesRequested": 1,
  "pagesProcessed": 1,
  "publicJsonResponseCount": 0,
  "renderedMediaElementCount": 63,
  "visitedUrls": [
    "https://www.snapchat.com/@brentrivera"
  ],
  "limits": {
    "mode": "byUsername",
    "usernames": [
      "brentrivera"
    ],
    "maxTargets": 1,
    "maxCommentsPerSnap": 2,
    "requestDelayMs": 0,
    "maxConcurrency": 1,
    "timeoutSecs": 30,
    "maxResponseBytes": 5000000,
    "includeDiagnostics": false,
    "maxRequestRetries": 1
  },
  "directHttp": false,
  "sourceTransport": "chromium-rendered-public-page",
  "proxyUsed": true,
  "customUserAgentUsed": false,
  "stealthPatchesUsed": false,
  "source": "Snapchat public Spotlight/profile pages and embedded comment state",
  "provenance": "snapchat_spotlight_comments_v2",
  "accessPolicy": "Public Snapchat HTML and server-rendered page state only; no login, private comment API, video download, CAPTCHA solving, or access-control bypass.",
  "startedAt": "2026-10-25T20:44:37.543Z",
  "completedAt": "2026-10-25T20:44:40.261Z",
  "scrapedAt": "2026-10-25T20:44:40.261Z"
}
```

### Coverage and limitations

Comments are extracted only from comment data already embedded in the rendered public page. The Actor does not open a comment thread, call Snapchat's comments service, or paginate comments inside a post. If Snapchat does not embed comments for a profile or Spotlight URL, the run returns no comment rows rather than an empty placeholder.

`byUsername` inspects the public profile page for embedded Spotlight comment state, while `bySpotlightUrl` inspects a specific public Spotlight URL. A target can expose zero, one, or many comments; `maxCommentsPerSnap` caps retained rows per target. `authorUsername` and `authorProfileUrl` are optional and can be absent even when an `authorDisplayName` is present, as in the saved row. `sourcePath` records where the comment was found in the public state so the evidence can be audited.

The Actor does not log in, access viewer-private data, use a private API, download video, solve CAPTCHAs, or bypass access controls. Comment text is user-generated public content and may contain personal information; review it before publication or reuse. Public page structure and embedded comment availability can change between runs, and 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 targets, retries, and optional proxy usage. Start with one username or Spotlight URL and a small `maxCommentsPerSnap`; inspect the dataset and `OUTPUT_SUMMARY`, then add targets. If a target returns no comments, try another public post or verify that comments are visible in the public page before scaling. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/snapchat-spotlight-comments-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.

# Changelog

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

# Actor input Schema

## `mode` (type: `string`):

Choose public Spotlight URL or public profile username inspection.

## `spotlightUrls` (type: `array`):

Public HTTPS Snapchat /spotlight/ URLs used in bySpotlightUrl mode.

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

Public Snapchat usernames used in byUsername mode; @ prefixes are accepted.

## `maxTargets` (type: `integer`):

Maximum public Spotlight URLs or profile usernames processed.

## `maxCommentsPerSnap` (type: `integer`):

Maximum embedded comment rows retained per target.

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

Delay before each public HTTP request.

## `maxConcurrency` (type: `integer`):

Maximum concurrent public page requests.

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

Per-request timeout for public Snapchat pages.

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

Maximum public response body size retained in memory.

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

Maximum bounded browser retries for each public Snapchat page.

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

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

## Actor input object example

```json
{
  "mode": "byUsername",
  "spotlightUrls": [],
  "usernames": [
    "brentrivera"
  ],
  "maxTargets": 10,
  "maxCommentsPerSnap": 50,
  "requestDelayMs": 250,
  "maxConcurrency": 1,
  "timeoutSecs": 45,
  "maxResponseBytes": 5000000,
  "maxRequestRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

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

Run status and counters stored by the Actor.

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

No description

# 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 = {
    "mode": "byUsername",
    "usernames": [
        "brentrivera"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/snapchat-spotlight-comments-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 = {
    "mode": "byUsername",
    "usernames": ["brentrivera"],
}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/snapchat-spotlight-comments-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 '{
  "mode": "byUsername",
  "usernames": [
    "brentrivera"
  ]
}' |
apify call w3crawler/snapchat-spotlight-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/snapchat-spotlight-comments-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/NqrsehVrOMOKCfuMd/builds/xo7JuoXcxZyXqgIaU/openapi.json
