# Snapchat Public Topic Spotlight Scraper (`w3crawler/snapchat-topic-scraper`) Actor

Read public Snapchat topic pages with bounded requests and extract normalized structured Spotlight video metadata with explicit diagnostics when public data is unavailable.

- **URL**: https://apify.com/w3crawler/snapchat-topic-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 topics

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 Topic Spotlight Scraper

Read public Snapchat Explore topic pages and return normalized Spotlight video metadata for the topic: topic title, description, related topics, video identity, creator, engagement counts, thumbnail, and media reference. The Actor renders each public topic page in anonymous Chromium and does not download binary media.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/snapchat-topic-scraper) and select **Try for free** or open the **Input** tab.
2. Add public `/explore/` topic URLs to `startUrls`, or list slugs in `topicSlugs` to build Explore URLs. The default target is `https://www.snapchat.com/explore/food`.
3. Set `maxItems` for the global video cap and set `maxPages` to the number of initial topic URLs you want processed (the default `1` processes only the first target). The public Explore source does not expose a stable same-topic continuation.
4. Start the Actor, open the dataset, and export the video rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome and counts.

### Input

All fields are optional. If you omit `startUrls`, the default Explore food URL is used; values in `topicSlugs` are appended as additional `/explore/` targets. 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 |
| --- | --- | --- | --- | --- |
| `startUrls` | object array | Optional | `[{"url":"https://www.snapchat.com/explore/food"}]` | Public HTTPS Snapchat `/explore/` topic URLs or legacy `/topic/` URLs; up to 50 items. |
| `topicSlugs` | string array | Optional | `[]` | Slugs used to build public `/explore/{slug}` URLs; up to 50 values. |
| `query` | string | Optional | `""` | Case-insensitive local filter over normalized video fields; up to 200 characters. |
| `maxItems` | integer | Optional | `10` | Maximum complete Spotlight video records saved across all topic targets. The cap is global, not per page, 1–100. |
| `maxPages` | integer | Optional | `1` | Maximum number of initial topic URLs processed, 1–50. With the default `1`, only the first selected target is rendered. It does not create page-2 requests because the public Explore source exposes no stable same-topic continuation. |
| `requestDelayMs` | integer | Optional | `250` | Delay before each rendered topic request, 0–30,000 ms. |
| `maxConcurrency` | integer | Optional | `1` | Maximum concurrent public topic requests, 1–5. |
| `timeoutSecs` | integer | Optional | `30` | 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 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 Explore pages are currently reachable without proxy cost. |

Full default input:

```json
{
  "startUrls": [
    {
      "url": "https://www.snapchat.com/explore/food"
    }
  ],
  "topicSlugs": [],
  "query": "",
  "maxItems": 10,
  "maxPages": 1,
  "requestDelayMs": 250,
  "maxConcurrency": 1,
  "timeoutSecs": 30,
  "maxResponseBytes": 5000000,
  "maxRequestRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

`query` filters the parsed public videos locally; it does not change the topic pages requested. `topicSlugs` is a convenience for building `/explore/` URLs and does not call a search API. Optional `proxyConfiguration` is used only as a transparent browser transport.

### Output

The dataset contains one row per saved Spotlight video. A topic page can expose several videos; `maxItems` caps the total across all targets. Optional fields are omitted when the public page does not expose them, and no diagnostic or placeholder rows are written.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordId` | string | Always | Stable video identifier derived from the topic and video identity. |
| `recordType` | string | Always | Record type; always `snapchatTopicSpotlightVideo`. |
| `legacyRecordType` | string | When published | Backward-compatible copy of `recordType`. |
| `position` | integer | Always | One-based position across the saved run after deduplication and the global `maxItems` cap. |
| `sourceWebsite` | string | Always | Official Snapchat source website. |
| `sourceUrl` | string | Always | Public topic page that supplied the video. |
| `inputUrl` | string | Always | Public topic URL requested for the row. |
| `topicUrl` | string | Always | Normalized public topic URL. |
| `topicId` | string | Always | Source topic identifier, usually the topic slug. |
| `topicSlug` | string | Always | Topic slug used by the public page. |
| `topicTitle` | string | Always | Public topic page title. |
| `topicDescription` | string | When published | Public topic description or meta description. |
| `topicLastUpdated` | string | When published | Public topic last-updated label, as displayed by the page. |
| `topicPreviewImageUrl` | string | When published | Public topic preview-image URL reference. |
| `videoId` | string | When published | Snapchat Spotlight identifier for the video. |
| `videoUrl` | string | Always | Public Spotlight URL for the video. |
| `videoTitle` | string | Always | Public video title. |
| `videoDescription` | string | When published | Public video description. |
| `contentUrl` | string | When published | Public CDN media URL reference; no media is downloaded. |
| `thumbnailUrl` | string | When published | Public thumbnail URL reference. |
| `uploadDate` | string | When published | Public upload time in ISO UTC. |
| `duration` | string | When published | ISO 8601 duration, such as `PT5.4S`. |
| `width` | number | When published | Public video width in pixels. |
| `height` | number | When published | Public video 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 or add-friend URL. |
| `keywords` | string array | When published | Public keywords associated with the video. |
| `viewCount` | number | When published | Public view count. |
| `likeCount` | number | When published | Public like count. |
| `commentCount` | number | When published | Public comment count. |
| `shareCount` | number | When published | Public share count. |
| `relatedTopics` | object array | When published | Related-topic objects with `name`, `url`, and `slug`; URLs can use the legacy `/topic/` path. |
| `contentText` | string | When published | Bounded searchable text assembled from the public topic and video fields. |
| `scrapedAt` | string | Always | Time the video 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; long strings and arrays are shortened. That run capped the global output at four videos from a topic page with 20 candidates.

```json
{
  "recordId": "snapchat_topic_a51dbfcf482ba5448243d785",
  "recordType": "snapchatTopicSpotlightVideo",
  "legacyRecordType": "snapchatTopicSpotlightVideo",
  "position": 1,
  "sourceWebsite": "https://www.snapchat.com/",
  "sourceUrl": "https://www.snapchat.com/explore/food",
  "inputUrl": "https://www.snapchat.com/explore/food",
  "topicUrl": "https://www.snapchat.com/explore/food",
  "topicId": "food",
  "topicSlug": "food",
  "topicTitle": "food | Search Snapchat Creators, Filters and Lenses",
  "topicDescription": "Find your favourite Profiles, Lenses, Filters and Spotlight popular videos related to food. Only on Snapchat.",
  "topicLastUpdated": "10/25/2026",
  "topicPreviewImageUrl": "https://www.snapchat.com/images/default-preview/facebook.png",
  "videoId": "W7_EDlXWTBiXAEEniNoMPwAAYaXNmc3ZkZ2tlAaFmQycOAaFmQxzAAAAAAA",
  "videoUrl": "https://www.snapchat.com/spotlight/W7_EDlXWTBiXAEEniNoMPwAAYaXNmc3ZkZ2tlAaFmQycOAaFmQxzAAAAAAA",
  "videoTitle": "Oh my goodness 🔥",
  "videoDescription": "Oh my goodness 🔥",
  "contentUrl": "https://cf-st.sc-cdn.net/d/7NpYcW219UUuS6pq8f57f.27.IRZXSOY?mo=GmUaCzIBBEgCUC5gAWgNUKIBWhBTcG90bGlnaHRTaGFyaW5nogE8CBsSJwolCKy3SSABMJwEOMAHQAFKEAoLngFneYYBdWttYWsQ9ANQmCpoAiIPCgJoDRIAKgdJUlpYU09ZkAOYKg%3D%3D&uc=46",
  "thumbnailUrl": "https://cf-st.sc-cdn.net/d/7NpYcW219UUuS6pq8f57f.1025?mo=GigaCzIBBEgCUC5gAWgNUJ0BWghEZkZGcmFtZaIBCwiBCCIGCgJoDRIA&uc=46",
  "uploadDate": "2026-10-23T00:57:16.736Z",
  "duration": "PT5.4S",
  "width": 540,
  "height": 960,
  "creatorName": "Tori",
  "creatorUsername": "tori246358",
  "creatorUrl": "https://www.snapchat.com/add/tori246358",
  "relatedTopics": [
    {
      "name": "bakery shopping tips",
      "url": "https://www.snapchat.com/topic/bakery-shopping-tips",
      "slug": "bakery-shopping-tips"
    },
    {
      "name": "how to run a food booth",
      "url": "https://www.snapchat.com/topic/how-to-run-a-food-booth",
      "slug": "how-to-run-a-food-booth"
    }
  ],
  "contentText": "food | Search Snapchat Creators, Filters and Lenses | Find your favourite Profiles, Lenses, Filters and Spotlight popular videos related to food. Only on Snapchat. | Oh my goodness 🔥 | Tori",
  "scrapedAt": "2026-10-25T20:46:19.164Z"
}
```

### 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 pagination state.

| Field | Meaning |
| --- | --- |
| `actor` | Actor slug that produced the run artifact. |
| `recordType` | Artifact discriminator; `runSummary`. |
| `status` | Source-result status: `success`, `partial`, `no_results`, `blocked`, or `failed`. The saved run uses `success`. |
| `runStatus` | Execution status: `SUCCEEDED` or `FAILED`. |
| `dataStatus` | Completeness of the saved video rows: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `itemCount` | Number of video records saved. |
| `publicRecords` | Number of public records saved. |
| `topicRecords` | Number of topic Spotlight video records saved. |
| `candidateCount` | Video candidates parsed before filtering and the global cap. |
| `queryMatchCount` | Candidates that matched the local `query` filter. |
| `incompleteRecordCount` | Candidates skipped because required public fields were missing. |
| `uniqueIdentities` | Unique video identities saved. |
| `duplicateCount` | Duplicate videos removed. |
| `diagnosticCount` | Number of operational issues recorded for the run. |
| `targetCount` | Topic targets processed. |
| `topicCount` | Topic pages processed. |
| `emptyPages` | Topic pages that exposed no usable videos. |
| `requestLogicalCount` | Logical topic page requests made. |
| `requestAttemptCount` | Topic 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. |
| `requestedPageLimit` | Requested `maxPages` value. |
| `requestedTargetCount` | Topic targets requested. |
| `processedTargetCount` | Topic targets processed. |
| `unprocessedTargetCount` | Topic targets not processed. |
| `paginationSupported` | Whether the source exposed a stable continuation; `false` for the current Explore page. |
| `continuationObserved` | Whether a same-topic continuation link or cursor was observed. |
| `continuationRequestCount` | Continuation requests attempted. |
| `unsupportedContinuationCount` | Continuations rejected because the source does not expose a stable next page. |
| `paginationStopReason` | Why pagination stopped, such as `source_continuation_not_exposed`. |
| `sourceExhaustionCount` | Times the source was treated as exhausted. |
| `repeatedContinuationCount` | Repeated continuation targets detected. |
| `noProgressCount` | Pagination passes that produced no new videos. |
| `pageEvidence` | Per-page evidence with candidate, match, normal, duplicate, and continuation counts. |
| `globalMaxItems` | Global video cap applied to the run. |
| `globalItemCapReached` | Whether the global cap stopped further output. |
| `reconciliation` | Dataset, page-evidence, and summary counts used to reconcile the run. |
| `publicJsonResponseCount` | Public JSON responses observed by the browser. |
| `renderedMediaElementCount` | Rendered media elements observed on the page. |
| `blockedCount` | Public responses that hit an access block. |
| `noResultCount` | Targets that exposed no usable videos. |
| `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. |
| `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` | Every processed topic produced its available videos without a later problem. |
| `partial` | `PARTIAL` | Some videos were saved, but another target or optional step failed. Saved rows remain available. |
| `no_results` | `NO_RESULTS` | The topic pages loaded cleanly but exposed no eligible videos. |
| `failed` | `FAILED` | No video row could be saved because of an operational failure. |

Example `OUTPUT_SUMMARY` from the saved run:

```json
{
  "actor": "snapchat-topic-scraper",
  "recordType": "runSummary",
  "status": "success",
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "itemCount": 4,
  "publicRecords": 4,
  "topicRecords": 4,
  "candidateCount": 20,
  "queryMatchCount": 20,
  "incompleteRecordCount": 0,
  "uniqueIdentities": 4,
  "duplicateCount": 0,
  "diagnosticCount": 0,
  "targetCount": 1,
  "topicCount": 1,
  "emptyPages": 0,
  "requestLogicalCount": 1,
  "requestAttemptCount": 1,
  "requestErrorCount": 0,
  "successfulRequestCount": 1,
  "failedRequestCount": 0,
  "pagesRequested": 1,
  "pagesProcessed": 1,
  "requestedPageLimit": 1,
  "requestedTargetCount": 1,
  "processedTargetCount": 1,
  "unprocessedTargetCount": 0,
  "paginationSupported": false,
  "continuationObserved": false,
  "continuationRequestCount": 0,
  "unsupportedContinuationCount": 0,
  "paginationStopReason": "source_continuation_not_exposed",
  "sourceExhaustionCount": 1,
  "repeatedContinuationCount": 0,
  "noProgressCount": 0,
  "pageEvidence": [
    {
      "pageNumber": 1,
      "sourceUrl": "https://www.snapchat.com/explore/food",
      "inputUrl": "https://www.snapchat.com/explore/food",
      "candidateCount": 20,
      "queryMatchCount": 20,
      "normalRecordCount": 4,
      "duplicateRecordCount": 0,
      "incompleteRecordCount": 0,
      "continuationObserved": false,
      "relNextUrlCount": 0,
      "sectionPageTokenCount": 0,
      "openSectionCount": 2,
      "continuationRequestCount": 0,
      "stopReason": "source_continuation_not_exposed",
      "globalItemCap": 4,
      "globalItemCapReached": true
    }
  ],
  "globalMaxItems": 4,
  "globalItemCapReached": true,
  "reconciliation": {
    "datasetNormalRecords": 4,
    "pageEvidenceNormalRecords": 4,
    "summaryItemCount": 4,
    "summaryDiagnosticCount": 0,
    "uniqueIdentities": 4,
    "duplicateCount": 0
  },
  "publicJsonResponseCount": 23,
  "renderedMediaElementCount": 185,
  "blockedCount": 0,
  "noResultCount": 0,
  "visitedUrls": [
    "https://www.snapchat.com/explore/food"
  ],
  "limits": {
    "startUrls": [
      "https://www.snapchat.com/explore/food"
    ],
    "maxItems": 4,
    "maxPages": 1,
    "requestDelayMs": 1000,
    "maxConcurrency": 1,
    "timeoutSecs": 40,
    "maxResponseBytes": 5000000,
    "includeDiagnostics": false,
    "maxRequestRetries": 2,
    "proxyConfiguration": {
      "useApifyProxy": false
    }
  },
  "directHttp": false,
  "sourceTransport": "chromium-rendered-public-page",
  "proxyUsed": false,
  "source": "Snapchat public Explore topic pages and structured Spotlight metadata",
  "provenance": "snapchat_topic_spotlight_v2",
  "accessPolicy": "Public Snapchat Explore HTML, JSON-LD, and page state only; no login, private API, video download, CAPTCHA solving, or access-control bypass.",
  "startedAt": "2026-10-25T20:46:14.612Z",
  "completedAt": "2026-10-25T20:46:19.386Z",
  "scrapedAt": "2026-10-25T20:46:19.386Z"
}
```

### Coverage and limitations

The current public Explore topic page exposes one server-rendered set of videos per target; it does not publish a stable same-topic next-page URL, cursor, or scroll continuation. `maxPages` also caps the initial URL list (`startUrls` is truncated to that many targets), so with the default `1` only the first topic URL is rendered. Raise `maxPages` to process more topic targets, not to paginate a single topic. `maxItems` is a global cap across all processed targets, so a single topic with many candidates can fill the run before another target is processed.

`query` is a local filter over normalized fields and cannot discover videos that the topic page does not render. `relatedTopics` can contain legacy `/topic/` URLs even when the input uses `/explore/`; those are public links returned by Snapchat and are emitted as related metadata, not followed automatically. Videos missing a title or public Spotlight URL are skipped rather than guessed.

The Actor does not log in, access viewer-private data, call a private API, download media, solve CAPTCHAs, or bypass access controls. Topic composition and engagement counts can change between runs. 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 topic targets, retries, and optional proxy usage. Start with one topic and `maxItems` around 10, inspect the dataset and `OUTPUT_SUMMARY`, then raise `maxPages` to process additional topic URLs. Raising `maxPages` will not produce more pages of the same topic with the current source; use additional topic URLs or slugs instead. See the Actor's Pricing tab for current account rates.

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

# Actor input Schema

## `startUrls` (type: `array`):

Public HTTPS Snapchat /explore/ topic URLs or legacy /topic/ URLs. If omitted, Explore food is used.

## `topicSlugs` (type: `array`):

Optional slug values used to build public /explore/ URLs. Up to 50 values.

## `query` (type: `string`):

Optional case-insensitive local filter over normalized structured video fields.

## `maxItems` (type: `integer`):

Maximum complete Spotlight video records saved across all requested topic targets. The cap is global, not per page.

## `maxPages` (type: `integer`):

Backward-compatible bound for the number of initial topic URLs requested. The current public Explore source exposes no stable same-topic URL, cursor, or scroll continuation, so each target is rendered once and no page 2 request is made even when this value is higher than 1.

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

Delay before each rendered public topic request.

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

Maximum concurrent public topic requests.

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

Per-request timeout for the public topic page.

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

Bound the public response body retained in memory.

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

Maximum retries for a failed public browser request.

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

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

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.snapchat.com/explore/food"
    }
  ],
  "topicSlugs": [],
  "query": "",
  "maxItems": 10,
  "maxPages": 1,
  "requestDelayMs": 250,
  "maxConcurrency": 1,
  "timeoutSecs": 30,
  "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 = {
    "startUrls": [
        {
            "url": "https://www.snapchat.com/explore/food"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/snapchat-topic-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 = { "startUrls": [{ "url": "https://www.snapchat.com/explore/food" }] }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/snapchat-topic-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 '{
  "startUrls": [
    {
      "url": "https://www.snapchat.com/explore/food"
    }
  ]
}' |
apify call w3crawler/snapchat-topic-scraper --silent --output-dataset

```

## MCP server setup

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