# Snapchat Scraper (`tri_angle/snapchat-scraper`)

Actor for scraping public profile data from Snapchat.

- **URL**: https://beta-securitybyobscurity.apify.com/tri\_angle/snapchat-scraper.md
- **Developed by:** [Tri⟁angle](https://beta-securitybyobscurity.apify.com/tri_angle) (Apify)
- **Categories:** Social media
- **Stats:** 860 total users, 74 monthly users, 100.0% runs succeeded, 20 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$2.00 / 1,000 profiles

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for dataset items the Actor outputs.

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

# README

## Snapchat Scraper 👻🌟🔥

### What does the Snapchat Scraper do?

This scraper can be used to scrape and extract public profile information from [Snapchat](https://www.snapchat.com/). This information can be used for variety of purposes, such as trends monitoring, marketing, competitor analysis, campaign tracking, or social listening.

### How to use the Snapchat Scraper

To scrape [Snapchat](https://www.snapchat.com/), follow these simple steps and you'll get your data:

1. Click on Try for free.
2. Enter one or more URLs/usernames of profiles you want to scrape.
   - username example: `fcbarcelona`
   - URL example: `https://www.snapchat.com/add/fcbarcelona`
3. Click on Run.
4. When the scraper has finished, preview or download your data from the Dataset tab.

### Example of an output

```json
{
	"profileUrl": "https://www.snapchat.com/add/fcbarcelona",
	"username1": "FC Barcelona",
	"username2": "fcbarcelona",
	"profileImageUrl": "https://cf-st.sc-cdn.net/aps/bolt/aHR0cHM6Ly9jZi1zdC5zYy1jZG4ubmV0L2QvNHY1U0RnWkI4OHVZY2ZoWFM3eE5LP2JvPUVnMGFBQm9BTWdFRVNBSlFHV0FCJnVjPTI1._RS0,90_FMjpeg",
	"profileDescription": "FC Barcelona’s official Snapchat account #ForçaBarça 💙❤️",
	"profileLocation": "Barcelona, Catalunya, España",
	"subscribers": 2277200,
	"category": "Sports Team",
	"websiteUrl": "https://www.snapchat.com/discover/Take_a_Break_with_Barca/2987290154",
	"snapcodeImageUrl": "https://app.snapchat.com/web/deeplink/snapcode?username=fcbarcelona&type=SVG&bitmoji=enable",
	"stories": [
		{
			"id": "2a7f32ab",
			"storyTitle": "ALONSO IS A CULER! 💙❤️",
			"thumbnailUrl": "https://cf-st.sc-cdn.net/d/VitNIchnb9sveWRnOABqp.410.IRZXSOY?mo=GkEaGhoAGgAyAQQ6AX1CBgjbxc2eBkgEUF5gAXABWhBEZkxhcmdlVGh1bWJuYWlsogEQCJoDIgsSACoHSVJaWFNPWQ%3D%3D&uc=94",
			"snaps": [
				{
					"id": "9512863d",
					"mediaUrl": "https://cf-st.sc-cdn.net/d/XoBPk8rIqJCPtdBIpCVjg.1325.IRZXSOY?mo=GuECGg4aABoAMgEEOgF9UF5gAVoHRGZNZWRpYaIBWQitChI7CjkgAUoeChmqAWJYT2JpZmyMAZkBbW5uY2VwkwGGAYQBEPQDWgMQmUpaBwjSJBC29T5aBwiEQhDNzHQiFwoKQgYI48XNngZIAhIAKgdJUlpYU09ZogFNCJEKEi0KKyABShkKFJMBUD5BS1ZPV2NfSUlPQE1LYllfEPQDWgMQq05aBwj4QBCfh1QiGQoMQgYI2sXNngZIBHABEgAqB0lSWlhTT1miAUwIgQoSLAoqIAFKGAoTRiciHyclJi0zMCkmJiMlKDUzMBD0A1oDEJpOWgcI-EAQz7wqIhkKDEIGCNrFzZ4GSARwARIAKgdJUlpYU09ZogFKCJ4KEiwKKiABShgKE0QmIiElJyIuNTsnMSomKDM5MTYQ9ANaAxDQSloHCOI-EL_cKiIXCgpCBgjjxc2eBkgCEgAqB0lSWlhTT1k%3D&uc=94",
					"previewUrl": "https://cf-st.sc-cdn.net/d/XoBPk8rIqJCPtdBIpCVjg.410.IRZXSOY?mo=GkEaGhoAGgAyAQQ6AX1CBgjaxc2eBkgEUF5gAXABWhBEZkxhcmdlVGh1bWJuYWlsogEQCJoDIgsSACoHSVJaWFNPWQ%3D%3D&uc=94",
					"timestamp": "2022-09-02T19:13:37.000Z"
				},
				*
                *
                *
            ]
		},
        *
        *
        *
	],
	"spotlights": [
		{
			"id": "0a5e38ea",
			"title": null,
			"description": "Anitta and Fuerza Regida challenge our players 🤩  #fcbarcelona ",
			"views": 1620,
			"thumbnailUrl": "https://cf-st.sc-cdn.net/d/L3jgJH9UlTf1N8NToYTD3.256.IRZXSOY?mo=GkcaDRoAGgAyAQRIAlAuYAFaEERmTGFyZ2VUaHVtYm5haWyiARAIgAIiCxIAKgdJUlpYU09ZogEQCJoKIgsSACoHSVJaWFNPWQ%3D%3D&uc=46",
			"videoName": "Spotlight Snap",
			"videoDescription": "#fcbarcelona",
			"hashtags": [
				"#fcbarcelona"
			],
			"snaps": [
				{
					"id": "4ae449bc",
					"mediaUrl": "https://cf-st.sc-cdn.net/d/L3jgJH9UlTf1N8NToYTD3.1034.IRZXSOY?mo=GkIaDRoAGgAyAQRIAlAuYAGiATAIiggSHgocIAFKGAoTYD01MTw9RlEyQDlpTywpJyUyQhD0AyILEgAqB0lSWlhTT1k%3D&uc=46",
					"previewUrl": "https://cf-st.sc-cdn.net/d/L3jgJH9UlTf1N8NToYTD3.256.IRZXSOY?mo=GkcaDRoAGgAyAQRIAlAuYAFaEERmTGFyZ2VUaHVtYm5haWyiARAIgAIiCxIAKgdJUlpYU09ZogEQCJoKIgsSACoHSVJaWFNPWQ%3D%3D&uc=46",
					"timestamp": "2023-07-31T18:13:04.000Z"
				},
                *
                *
                *
			]
		},
        *
        *
        *
	]
}
```

### How much will scraping Snapchat profiles cost you?

This Actor is paid per result with a cost of $5.00 / 1,000 profiles. You are not charged for the Apify platform usage, but only a fixed price for each dataset of 1,000 items in the Actor outputs. [Learn more](https://docs.apify.com/platform/actors/running/actors-in-store#actors-paid-per-result).

### Is it legal to scrape Snapchat?

Read: [is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `profilesInput` (type: `array`):

Add one or multiple Snapchat profile usernames or URLs you want to scrape. (e.g. `fcbarcelona` or `https://www.snapchat.com/add/fcbarcelona`)

## Actor input object example

```json
{
  "profilesInput": [
    "https://www.snapchat.com/add/fcbarcelona"
  ]
}
```

# 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 = {
    "profilesInput": [
        "https://www.snapchat.com/add/fcbarcelona"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tri_angle/snapchat-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 = { "profilesInput": ["https://www.snapchat.com/add/fcbarcelona"] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Snapchat Scraper",
        "description": "Actor for scraping public profile data from Snapchat.",
        "version": "0.0",
        "x-build-id": "KIYxoqrBc0xTMDg7X"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/tri_angle~snapchat-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-tri_angle-snapchat-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/tri_angle~snapchat-scraper/runs": {
            "post": {
                "operationId": "runs-sync-tri_angle-snapchat-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/tri_angle~snapchat-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-tri_angle-snapchat-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",
                "properties": {
                    "profilesInput": {
                        "title": "Profile usernames or URLs",
                        "type": "array",
                        "description": "Add one or multiple Snapchat profile usernames or URLs you want to scrape. (e.g. `fcbarcelona` or `https://www.snapchat.com/add/fcbarcelona`)",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
