# Snapchat Spotlight Scraper for User (`scrapeengine/snapchat-user-spotlight-scraper`) Actor

- **URL**: https://apify.com/scrapeengine/snapchat-user-spotlight-scraper.md
- **Developed by:** [ScrapeEngine](https://apify.com/scrapeengine) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Snapchat User Spotlight Scraper

Extract Snapchat Spotlight videos from public user profiles. This actor scrapes video metadata including views, engagement stats, hashtags, and more.

### Why Choose Us?

- **Comprehensive Data Extraction**: Get detailed metadata for every Spotlight video including views, shares, comments, boosts, and engagement statistics
- **Smart Proxy Management**: Automatic proxy fallback system ensures high success rates even when facing blocks
- **Bulk Processing**: Process multiple usernames concurrently for maximum efficiency
- **Incremental Saving**: Data is saved as it's extracted, so you never lose progress
- **Robust Error Handling**: Automatic retries with exponential backoff and proxy rotation

### Key Features

- Extract Spotlight video metadata from Snapchat user profiles
- Support for bulk username processing
- Automatic proxy fallback (no proxy → datacenter → residential)
- Detailed engagement statistics (views, shares, comments, boosts)
- Video metadata (thumbnails, content URLs, deeplinks)
- Hashtag extraction
- Incremental data saving to Apify dataset
- Comprehensive logging for monitoring

### Input

#### Input Schema

```json
{
  "startUrls": [
    { "url": "https://www.snapchat.com/@realmadrid" },
    { "url": "https://www.snapchat.com/@fcbarcelona" }
  ],
  "sortOrder": "recent",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxRetries": 3,
  "requestDelay": 1
}
````

#### Input Fields

- **startUrls** (required): Array of Snapchat profile URLs or usernames
  - Can be full URLs: `https://www.snapchat.com/@username`
  - Or just usernames: `username` or `@username`
- **sortOrder** (optional): Sort order for videos (`recent`, `popular`, `trending`). Default: `recent`
- **proxyConfiguration** (optional): Proxy settings
  - Default: No proxy
  - If blocked, automatically falls back to datacenter proxy
  - If still blocked, falls back to residential proxy with retries
- **maxRetries** (optional): Maximum retry attempts (1-5). Default: 3
- **requestDelay** (optional): Base delay between requests in seconds (0-10). Default: 1

### Output

#### Output Format

Each video is saved as a separate dataset item:

```json
{
  "username": "realmadrid",
  "videoTitle": "Spotlight Snap",
  "description": "#RealMadrid",
  "viewCount": 12995,
  "shareCount": 13,
  "commentCount": 31,
  "boostCount": 1311,
  "recommendCount": 124,
  "uploadDate": 1766173649643,
  "uploadDateMs": "1766173649643",
  "thumbnailUrl": "https://...",
  "contentUrl": "https://...",
  "deeplink": "https://...",
  "hashtags": ["#RealMadrid"],
  "durationMs": "50120",
  "width": 540,
  "height": 960,
  "success": true
}
```

#### Output Fields

- **username**: Snapchat username
- **videoTitle**: Title of the video
- **description**: Video description/caption
- **viewCount**: Number of views
- **shareCount**: Number of shares
- **commentCount**: Number of comments
- **boostCount**: Number of boosts
- **recommendCount**: Number of recommendations
- **uploadDate**: Upload timestamp (milliseconds)
- **thumbnailUrl**: Video thumbnail image URL
- **contentUrl**: Direct video content URL
- **deeplink**: Deep link to open video in Snapchat app
- **hashtags**: Array of hashtags used in the video
- **durationMs**: Video duration in milliseconds
- **width**: Video width in pixels
- **height**: Video height in pixels
- **rawData**: Complete raw data object from Snapchat
- **success**: Boolean indicating if extraction was successful

### 🚀 How to Use the Actor (via Apify Console)

1. Log in at https://console.apify.com and go to **Actors**.
2. Find your actor (snapchat-user-spotlight-scraper) and click it.
3. Configure inputs:
   - Add Snapchat usernames or profile URLs in the `startUrls` field
   - Optionally configure proxy settings
   - Adjust retry and delay settings if needed
4. Run the actor.
5. Monitor logs in real time to see extraction progress.
6. Access results in the **OUTPUT** tab.
7. Export results to JSON or CSV.

### Best Use Cases

- **Social Media Analytics**: Track engagement metrics for Snapchat Spotlight content
- **Content Research**: Discover trending videos and hashtags
- **Competitor Analysis**: Monitor competitor Spotlight performance
- **Influencer Research**: Analyze Spotlight video performance for influencer marketing
- **Content Strategy**: Identify successful content patterns and trends

### Frequently Asked Questions

**Q: How many usernames can I process at once?**\
A: The actor supports bulk processing. There's no hard limit, but processing time increases with the number of usernames.

**Q: What happens if a request is blocked?**\
A: The actor automatically falls back through proxy types: no proxy → datacenter → residential, with retries at each level.

**Q: How long does extraction take?**\
A: Processing time depends on the number of usernames and videos. Typically, 1-2 seconds per username plus network latency.

**Q: Can I extract private profile data?**\
A: No, this actor only extracts publicly available Spotlight videos from public profiles.

**Q: What if a username has no Spotlight videos?**\
A: The actor will log a warning and continue processing other usernames. The failed username will be marked with `success: false`.

### Support and Feedback

For issues, questions, or feature requests, please contact support through the Apify platform.

### Cautions

- Data is collected only from **publicly available sources**.
- No data is taken from private accounts or password-protected content.
- The end user is responsible for ensuring legal compliance (spam laws, privacy, data protection, etc.).
- Respect Snapchat's Terms of Service and rate limits.
- Use appropriate delays between requests to avoid overwhelming the platform.

# Actor input Schema

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

List of Snapchat usernames (e.g., 'realmadrid') or profile URLs (e.g., 'https://www.snapchat.com/@realmadrid').

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

Choose which proxies to use. By default, no proxy is used. If Snapchat blocks the request, it will automatically fallback to datacenter proxy, then residential proxy with retries.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.snapchat.com/@realmadrid"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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": [
        "https://www.snapchat.com/@realmadrid"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeengine/snapchat-user-spotlight-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": ["https://www.snapchat.com/@realmadrid"],
    "proxyConfiguration": { "useApifyProxy": False },
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "https://www.snapchat.com/@realmadrid"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapeengine/snapchat-user-spotlight-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapeengine/snapchat-user-spotlight-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Snapchat Spotlight Scraper for User",
        "version": "0.1",
        "x-build-id": "AN718Hk7IRkzJvhVy"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapeengine~snapchat-user-spotlight-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapeengine-snapchat-user-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/scrapeengine~snapchat-user-spotlight-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapeengine-snapchat-user-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/scrapeengine~snapchat-user-spotlight-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapeengine-snapchat-user-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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Snapchat Usernames or Profile URLs",
                        "type": "array",
                        "description": "List of Snapchat usernames (e.g., 'realmadrid') or profile URLs (e.g., 'https://www.snapchat.com/@realmadrid').",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Choose which proxies to use. By default, no proxy is used. If Snapchat blocks the request, it will automatically fallback to datacenter proxy, then residential proxy with 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
