# Snapchat for Business Success Story Gallery (`w3crawler/snapchat-ads-gallery-scraper`) Actor

Read public Snapchat for Business inspiration/success-story gallery state, extract campaign tiles and creative metadata, and optionally enrich a bounded set of public story pages.

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

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

Extract public campaign success stories and creative metadata from Snapchat for Business gallery pages. Despite the legacy Actor name, this is not a private Snapchat Ads Library API client: it reads only public `forbusiness.snapchat.com` HTML and embedded gallery state.

### What it returns

Each dataset row is one complete public success-story tile and can include:

- Content ID, title, summary, publication value, tags, and success-story URL
- Public gallery, locale, country, device, and platform metadata
- Creative image URL, content type, dimensions, size, quality, and high-DPI flag
- Optional public story-page title, description, headings, and paragraphs
- Gallery and detail source URLs, HTTP status, proxy use, extraction method, and timestamp

Bulky raw Contentful objects are not retained. Missing fields are omitted, and incomplete tiles are not represented as successful data.

### Input

```json
{
  "startUrls": [
    { "url": "https://forbusiness.snapchat.com/success-stories" }
  ],
  "maxItems": 5,
  "fetchDetails": true,
  "requestDelayMs": 250,
  "timeoutMs": 45000,
  "maxResponseBytes": 4000000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

The Actor accepts one to 10 exact public `/inspiration` or `/success-stories` gallery URLs and emits at most 50 records. Unknown fields and off-scope URLs fail before requests begin. Disable `fetchDetails` to make only the gallery requests.

### Access failures and empty galleries

Network failures, access challenges, changed embedded state, and incomplete tiles are reported in the `OUTPUT` key’s bounded `failures` array and counters. They are never mixed into dataset rows. Empty runs are explicitly labeled `blocked`, `failed`, or `no_data`; they are not reported as success.

Requests use a transparent Actor user agent, no retries, bounded response sizes and timeouts, and direct public HTTP by default. Standard Apify Proxy can be enabled when justified. The Actor does not log in, solve CAPTCHAs, patch fingerprints, or bypass access controls.

### Cost and responsible use

The base request count is the number of gallery URLs. When detail enrichment is enabled, up to one additional request is made for each selected story. Actual Apify compute, proxy, and storage costs depend on the selected plan and run settings.

Use public data only for lawful advertising research. Follow Snap terms, robots guidance, intellectual-property rules, and content-owner rights. Returned creative URLs do not grant reuse rights, and campaign claims should be independently verified.

### Local validation

Run `npm test`, `apify validate-schema`, and then a bounded live sample with `apify run --purge --input-file qa-inputs/snapchat-ads-gallery-scraper/local-validation.json`. Inspect both the default dataset and the `OUTPUT` key.

# Actor input Schema

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

Public forbusiness.snapchat.com inspiration or success-stories gallery URLs.

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

Maximum complete gallery records saved.

## `fetchDetails` (type: `boolean`):

Enrich gallery tiles with public story-page title, description, headings, and paragraphs.

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

Delay before each direct request attempt.

## `timeoutMs` (type: `integer`):

Per-request timeout for direct public HTML requests.

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

Maximum HTML response size to read per gallery or detail request.

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

Optional Apify Proxy configuration. Direct public requests are used by default.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://forbusiness.snapchat.com/success-stories"
    }
  ],
  "maxItems": 5,
  "fetchDetails": true,
  "requestDelayMs": 250,
  "timeoutMs": 45000,
  "maxResponseBytes": 4000000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/snapchat-ads-gallery-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 = {}

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

```

## MCP server setup

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