# Snapchat Public Profile Scraper (`w3crawler/snapchat-profile-scraper`) Actor

Extract bounded public Snapchat profile, related-account, highlight, Spotlight, lens, story, and page metadata with explicit diagnostics.

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

## Pricing

from $2.99 / 1,000 profiles

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 Profile Scraper extracts bounded, normalized records from public Snapchat profile pages. Supply usernames or public profile URLs to collect identity, biography, subscriber count, images, category, related accounts, public highlights, Spotlight metadata, active-story metadata, and lenses when Snapchat exposes them.

The Actor reads only public server-rendered page state. It does not log in, access viewer-private data or private APIs, download media, solve CAPTCHAs, or bypass access controls. Direct public HTTPS is used by default; standard Apify Proxy can be enabled as a transparent request transport when justified.

### Input

| Field | Default | Limits |
| --- | --- | --- |
| `usernames` | `["brentrivera"]` | 1–100 usernames or public HTTPS Snapchat profile URLs |
| `maxItems` | `5` | 1–100 unique profiles |
| `maxRelatedAccounts` | `5` | 1–25 per profile |
| `maxHighlightsPerProfile` | `5` | 1–25 per public section |
| `maxSnapsPerHighlight` | `5` | 1–25 per highlight |
| `includeHighlights` | `true` | Include bounded Curated and Spotlight highlights |
| `includeSpotlightMetadata` | `true` | Include bounded public Spotlight metadata |
| `includeActiveStory` | `true` | Include an active public story when available |
| `includeLenses` | `true` | Include bounded public lens metadata |
| `requestDelayMs` | `250` | 0–30,000 ms before each request |
| `timeoutSecs` | `45` | 5–60 seconds per request |
| `maxResponseBytes` | `5000000` | 100,000–10,000,000 bytes |
| `proxyConfiguration` | Direct (`useApifyProxy: false`) | Optional standard Apify proxy configuration |

```json
{
  "usernames": ["brentrivera", "@science"],
  "maxItems": 2,
  "maxRelatedAccounts": 3,
  "maxHighlightsPerProfile": 2,
  "maxSnapsPerHighlight": 2,
  "includeHighlights": true,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### Output

The default dataset contains successful `snapchat-profile` records only. Each row includes a stable ID, profile identity and URL, normalized public fields, bounded nested collections, source provenance, HTTP evidence, transport metadata, and scrape time. Optional fields are omitted when Snapchat does not expose them; values are not fabricated.

Run diagnostics and errors are kept in `OUTPUT_SUMMARY` and its `OUTPUT` compatibility alias so failed targets never masquerade as scraped data. `SOURCE_METADATA` describes access policy, transport, and public-source capabilities. A blocked or unavailable target can therefore produce an empty valid dataset alongside an explicit run status and diagnostic details.

Requests use one attempt with library retries disabled. The Actor follows at most three safe redirects and accepts redirects only to Snapchat HTTPS hosts.

### Local verification

```text
npm test
npm run lint
apify validate-schema
apify run --purge --input-file qa-inputs/local.json
npm run validate
```

Public Snapchat payloads, media availability, and access controls can change. Use this Actor only for lawful collection of public information and respect platform terms, privacy rights, content ownership, rate limits, and applicable data-protection requirements.

# Changelog

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

# Actor input Schema

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

Bare usernames, @-prefixed usernames, or public HTTPS Snapchat profile URLs.

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

Maximum number of unique profiles processed in this run.

## `maxRelatedAccounts` (type: `integer`):

Maximum public related-account records returned for each profile.

## `maxHighlightsPerProfile` (type: `integer`):

Maximum Curated and Spotlight highlights, Spotlight metadata records, and lenses returned per profile.

## `maxSnapsPerHighlight` (type: `integer`):

Maximum public media items nested inside each returned highlight.

## `includeHighlights` (type: `boolean`):

Return bounded Curated and Spotlight highlight media when publicly available.

## `includeSpotlightMetadata` (type: `boolean`):

Return public Spotlight video and engagement metadata when available.

## `includeActiveStory` (type: `boolean`):

Return the profile's active public story when available.

## `includeLenses` (type: `boolean`):

Return bounded public lens records published in the profile payload when available.

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

Delay before each public HTTPS request.

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

Bounded timeout for each public request.

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

Maximum public HTML response body retained in memory.

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

Optional Apify Proxy configuration used as a transparent request transport. Direct public HTTPS is used by default.

## Actor input object example

```json
{
  "usernames": [
    "brentrivera"
  ],
  "maxItems": 5,
  "maxRelatedAccounts": 5,
  "maxHighlightsPerProfile": 5,
  "maxSnapsPerHighlight": 5,
  "includeHighlights": true,
  "includeSpotlightMetadata": true,
  "includeActiveStory": true,
  "includeLenses": true,
  "requestDelayMs": 250,
  "timeoutSecs": 45,
  "maxResponseBytes": 5000000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

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

No description

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

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

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

```

## MCP server setup

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