# Snapchat Ads Scraper (`maximedupre/snapchat-ads`) Actor

Search Snapchat's public Ads Gallery by advertiser, country, dates, or status. Search its political and advocacy archive by year, country, advertiser, or keyword, or sponsored content by creator name. Get structured ad, impression, targeting, creative, spend, and source-link data when published.

- **URL**: https://apify.com/maximedupre/snapchat-ads.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Marketing, Social media, Business
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 commercial ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### 👻 Read Snapchat ads across three public surfaces

Marketers, analysts, journalists, and creator teams can use Snapchat Ads Scraper to research public ads and creator content. Choose Commercial ads, Political and advocacy ads, or Sponsored creator content, then get structured rows with public ad identity, advertiser, dates, impressions, targeting, creative links, spend, or creator links when Snapchat publishes them. This puts the published facts in one dataset and can reduce manual research.

- Collect matching public Snapchat ad records with **[Snapchat Ads Scraper](https://apify.com/maximedupre/snapchat-ads/examples/snapchat-ads-scraper)**.
- Find sponsored creator content by creator name with **[Snapchat Sponsored Content](https://apify.com/maximedupre/snapchat-ads/examples/snapchat-sponsored-content)**.
- Review political and advocacy archive ads by year with **[Snapchat Political Ads](https://apify.com/maximedupre/snapchat-ads/examples/snapchat-political-ads)**.
- Filter commercial Ads Gallery records by advertiser and country with **[Snapchat Commercial Ads](https://apify.com/maximedupre/snapchat-ads/examples/snapchat-commercial-ads)**.
- Search the public Snapchat ads library for a focused query with **[Snapchat Ads Library](https://apify.com/maximedupre/snapchat-ads/examples/snapchat-ads-library)**.

#### 📊 See one row for each public Snapchat match

Each saved row has a `resultType` that shows which public Snapchat surface produced it. Commercial ads use ad and delivery fields. Political and advocacy ads use archive, spend, targeting, and original-row fields. Sponsored creator content uses creator and content links. Optional values stay absent when Snapchat does not publish them.

Rows are saved as eligible source items are found. If the same source item appears again during a run, the Actor keeps the first eligible row and ignores later matches. The saved row shows the first match.

#### ▶️ Choose a Snapchat surface and start a run

**Run steps**

1. Choose `Commercial ads`, `Political and advocacy ads`, or `Sponsored creator content` in **Result type**.
2. Fill in the fields for that surface. Shared advertiser and country filters apply to the ad searches. Fields for other surfaces are ignored.
3. Set **Maximum results** when you want to stop after a chosen number of rows. Leave it empty to return all available results until the source is exhausted.
4. Start the run and open the default dataset.

Use a date window or status for a commercial ad search. Choose archive years, a country, an advertiser, or a political keyword for political and advocacy ads. Enter a creator name for sponsored creator content.

#### ⚙️ Input

**Input fields**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Selects the public Snapchat surface: `commercialAds`, `politicalAds`, or `sponsoredCreatorContent`. |
| `commercialDateFrom` | string | Optional first date in the commercial ad activity window. Use `YYYY-MM-DD`. |
| `commercialDateTo` | string | Optional last date in the commercial ad activity window. Use `YYYY-MM-DD`. |
| `commercialStatus` | string | Chooses `active`, `paused`, or `both` for commercial ads. |
| `politicalYears` | string\[] | Adds one or more four-digit years for the published political and advocacy ad archive. |
| `politicalKeyword` | string | Optionally searches the published political or advocacy ad record with free text. |
| `creatorName` | string | Searches public sponsored or branded Snapchat content for one creator name. |
| `advertiser` | string | Sets one advertiser, brand, or organization for an ad search. It is used for Commercial ads and is optional for Political and advocacy ads. |
| `countries` | string\[] | Adds supported EU/EEA countries for Commercial ads or one country for Political and advocacy ads. Sponsored creator content ignores this field. Leave it empty to use the source's full country scope. |
| `maxItems` | integer | Sets the maximum rows to save for the selected surface. Leave it empty to return all available results until the source is exhausted. |

**How the options work**

Commercial ads use the public EU/EEA Ads Gallery. Political and advocacy ads use the published archive for the years you enter. Sponsored creator content searches the public creator surface by name. The form's shared filters do not configure more than one independent search in the same run.

This example is the smallest successful common input from a current beta run:

```json
{
  "resultType": "commercialAds",
  "commercialStatus": "both",
  "advertiser": "Amazon",
  "countries": [
    "de"
  ],
  "maxItems": 1
}
```

#### 🧾 Output

The output panel provides `datasetUrl`, which opens the saved rows in the default dataset.

**Output link**

| Field | Type | What it does |
|---|---|---|
| `datasetUrl` | string | Opens the saved rows in the default dataset. |

**Commercial ad rows**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Always `commercialAds` for this row. |
| `adId` | string | Public identifier of the commercial ad. |
| `advertiser` | string | Paying advertiser or brand published for the ad. |
| `headline` | string | Published ad headline, when available. |
| `callToAction` | string | Published call to action, when available. |
| `adType` | string | Commercial ad type published by Snapchat, when available. |
| `creativeType` | string | Creative type published for the ad, when available. |
| `reviewStatus` | string | Review status published for the ad, when available. |
| `adStatus` | string | Published active or paused status, when available. |
| `startDate` | string | Campaign start date published for the ad, when available. |
| `countries` | string\[] | Countries in the ad's published delivery scope. |
| `totalImpressions` | integer | Total impressions published for the ad. |
| `impressionsByCountry` | object\[] | Published impression counts for each country, when available. |
| `impressionsByCountry.country` | string | Country for one published impression count. |
| `impressionsByCountry.impressions` | integer | Number of impressions published for that country. |
| `targeting` | object | Published audience targeting context. |
| `targeting.geography` | string\[] | Published geographic targeting values. |
| `targeting.ageRanges` | string\[] | Published target age ranges. |
| `targeting.genders` | string\[] | Published target gender values. |
| `targeting.languages` | string\[] | Published target language values. |
| `targeting.interests` | string\[] | Published target interest values. |
| `targeting.segments` | string\[] | Published target audience segment values. |
| `targeting.devices` | string\[] | Published target device values. |
| `creativeLanguages` | string\[] | Languages published for the commercial creative. |
| `destinationUrls` | string\[] | Public landing or destination links published for the ad. |
| `mediaUrls` | string\[] | Direct public media or creative links published for the ad. |

**Commercial ad row**

This complete row is from a successful run of the current beta build.

```json
{
  "resultType": "commercialAds",
  "adId": "b15f8896-3777-4103-aebb-b71cfa4c5eca",
  "advertiser": "Amazon Snapchat EU WPP",
  "headline": "Die Stimmen in deinem Kopf so",
  "callToAction": "MORE",
  "adType": "REMOTE_WEBPAGE",
  "creativeType": "WEB_VIEW",
  "reviewStatus": "APPROVED",
  "adStatus": "ACTIVE",
  "startDate": "2026-01-18",
  "totalImpressions": 2927752,
  "countries": [
    "de",
    "be",
    "fi",
    "pt",
    "bg",
    "dk",
    "lt",
    "lu",
    "hr",
    "lv",
    "fr",
    "hu",
    "se",
    "si",
    "sk",
    "ie",
    "ee",
    "el",
    "mt",
    "it",
    "es",
    "at",
    "cy",
    "cz",
    "pl",
    "ro",
    "nl",
    "tr"
  ],
  "impressionsByCountry": [
    {
      "country": "de",
      "impressions": 2927752
    },
    {
      "country": "be",
      "impressions": 0
    },
    {
      "country": "fi",
      "impressions": 0
    },
    {
      "country": "pt",
      "impressions": 0
    },
    {
      "country": "bg",
      "impressions": 0
    },
    {
      "country": "dk",
      "impressions": 0
    },
    {
      "country": "lt",
      "impressions": 0
    },
    {
      "country": "lu",
      "impressions": 0
    },
    {
      "country": "hr",
      "impressions": 0
    },
    {
      "country": "lv",
      "impressions": 0
    },
    {
      "country": "fr",
      "impressions": 0
    },
    {
      "country": "hu",
      "impressions": 0
    },
    {
      "country": "se",
      "impressions": 0
    },
    {
      "country": "si",
      "impressions": 0
    },
    {
      "country": "sk",
      "impressions": 0
    },
    {
      "country": "ie",
      "impressions": 0
    },
    {
      "country": "ee",
      "impressions": 0
    },
    {
      "country": "el",
      "impressions": 0
    },
    {
      "country": "mt",
      "impressions": 0
    },
    {
      "country": "it",
      "impressions": 0
    },
    {
      "country": "es",
      "impressions": 0
    },
    {
      "country": "at",
      "impressions": 0
    },
    {
      "country": "cy",
      "impressions": 0
    },
    {
      "country": "cz",
      "impressions": 0
    },
    {
      "country": "pl",
      "impressions": 0
    },
    {
      "country": "ro",
      "impressions": 0
    },
    {
      "country": "nl",
      "impressions": 0
    },
    {
      "country": "tr",
      "impressions": 0
    }
  ],
  "targeting": {
    "ageRanges": [
      "18-34"
    ],
    "languages": [
      "de"
    ]
  },
  "creativeLanguages": [
    "de"
  ],
  "destinationUrls": [
    "https://www.amazon.de/gp/video/storefront?contentId=IncludedwithPrime&contentType=merch&merchId=IncludedwithPrime&ref_=dvm_pds_gen_de_s_q125brand"
  ],
  "mediaUrls": [
    "https://cf-st.sc-cdn.net/d/ftXWptD2iSy3WuNMrHLoc.67?mo=GpUCGggyAgR9UA9gAVAvWghBZHNNZWRpYaIBOwhDEi8KLQi-zCUgATDgAzjUBkABSg4KCT9IPjIfLS5DXhD0A1DwLmgCdTQ9MEB9AACAPyIGCgJIAhIAogE8CLoKEi8KLQj_wBwgATDQBTiACkACSg4KCUEvKyAaHR8yTBD0A1DwLmgCddpSKkB9AACAPyIGCgJIAxIAogE8CJIKEi8KLQjYoxYgATDgAzjUBkACSg4KCSctIhcQGRcqOBD0A1DwLmgCdS8GH0B9AACAPyIGCgJIAhIAogE8CNIKEi8KLQjyhBMgATDgAzjUBkACSg4KCS4dGhUSEhQiMxD0A1DwLmgCdW35I0B9AACAPyIGCgJIAhIAkAPwLg%3D%3D&uc=15"
  ]
}
```

**Political or advocacy ad rows**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Always `politicalAds` for this row. |
| `sourceRecordUrl` | string | Public Snapchat URL for the archive record, when published. |
| `archiveYear` | string | Published archive year. |
| `adId` | string | Public identifier of the political or advocacy ad. |
| `advertiser` | string | Paying advertiser published for the ad, when available. |
| `organization` | string | Organization published for the ad, when available. |
| `country` | string | Country published for the ad, when available. |
| `spend` | object | Reported spend and currency, when published. |
| `spend.amount` | number | Reported spend amount. |
| `spend.currency` | string | Currency for the reported spend. |
| `impressions` | integer | Reported impressions, when published. |
| `startDate` | string | Published start date of the ad run, when available. |
| `endDate` | string | Published end date of the ad run, when available. |
| `creative` | object | Published creative details. |
| `creative.url` | string | Public creative URL, when available. |
| `creative.type` | string | Published creative type, when available. |
| `creative.title` | string | Published creative title, when available. |
| `creative.text` | string | Published creative text, when available. |
| `creative.language` | string | Published creative language, when available. |
| `creative.thumbnailUrl` | string | Public creative thumbnail URL, when available. |
| `candidate` | object | Published candidate details, when available. |
| `candidate.name` | string | Published candidate name. |
| `candidate.party` | string | Published candidate party, when available. |
| `candidate.office` | string | Published office sought, when available. |
| `ballot` | object | Published ballot information, when available. |
| `ballot.measure` | string | Published ballot measure. |
| `ballot.option` | string | Published ballot option, when available. |
| `targeting` | object | Published audience targeting context. |
| `targeting.geography` | string\[] | Published geographic targeting values. |
| `targeting.ageRanges` | string\[] | Published target age ranges. |
| `targeting.genders` | string\[] | Published target gender values. |
| `targeting.languages` | string\[] | Published target language values. |
| `targeting.interests` | string\[] | Published target interest values. |
| `targeting.segments` | string\[] | Published target audience segment values. |
| `targeting.devices` | string\[] | Published target device values. |
| `originalRecord` | object | Useful values from the original published archive row. |
| `originalRecord.adId` | string | Ad ID exactly as published in the archive row. |
| `originalRecord.archiveYear` | string | Archive year exactly as published in the archive row. |
| `originalRecord.advertiser` | string | Advertiser exactly as published in the archive row. |
| `originalRecord.organization` | string | Organization exactly as published in the archive row. |
| `originalRecord.country` | string | Country exactly as published in the archive row. |
| `originalRecord.spend` | string | Spend exactly as published in the archive row. |
| `originalRecord.currency` | string | Currency exactly as published in the archive row. |
| `originalRecord.impressions` | string | Impressions exactly as published in the archive row. |
| `originalRecord.startDate` | string | Start date exactly as published in the archive row. |
| `originalRecord.endDate` | string | End date exactly as published in the archive row. |
| `originalRecord.creativeUrl` | string | Creative URL exactly as published in the archive row. |
| `originalRecord.creativeType` | string | Creative type exactly as published in the archive row. |
| `originalRecord.creativeText` | string | Creative text exactly as published in the archive row. |
| `originalRecord.candidate` | string | Candidate exactly as published in the archive row. |
| `originalRecord.ballot` | string | Ballot value exactly as published in the archive row. |

**Political or advocacy ad row**

This complete row is from a successful run of the current beta build.

```json
{
  "resultType": "politicalAds",
  "archiveYear": "2024",
  "adId": "32bb11584eadd817ff93244e656e2348fee05114ee3495a592de1fb0bea22191",
  "sourceRecordUrl": "https://www.snap.com/political-ads/asset/3a01dd25a7e0e988b15281b97dc77e947d5be15544984b03b559e539027eeb24?mediaType=mp4",
  "advertiser": "Harris for President",
  "organization": "Harris for President",
  "country": "united states",
  "spend": {
    "amount": 221,
    "currency": "USD"
  },
  "impressions": 19806,
  "startDate": "2024-08-24",
  "endDate": "2024-08-31",
  "creative": {
    "url": "https://www.snap.com/political-ads/asset/3a01dd25a7e0e988b15281b97dc77e947d5be15544984b03b559e539027eeb24?mediaType=mp4",
    "type": "mp4"
  },
  "candidate": {
    "name": "Kamala Harris"
  },
  "targeting": {
    "geography": [
      "united states",
      "89014",
      "89031",
      "89074",
      "89081",
      "89084",
      "89085",
      "89086",
      "89102",
      "89103",
      "89106",
      "89113",
      "89117",
      "89118",
      "89119",
      "89120",
      "89121",
      "89123",
      "89128",
      "89129",
      "89130",
      "89138",
      "89139",
      "89141",
      "89143",
      "89144",
      "89145",
      "89146",
      "89147",
      "89148",
      "89149",
      "89166",
      "89178",
      "89179",
      "89183",
      "89427",
      "89502",
      "89503",
      "89506",
      "89509",
      "89512"
    ],
    "ageRanges": [
      "18-29"
    ],
    "segments": [
      "Provided by Advertiser"
    ]
  },
  "originalRecord": {
    "adId": "32bb11584eadd817ff93244e656e2348fee05114ee3495a592de1fb0bea22191",
    "archiveYear": "2024",
    "advertiser": "Harris for President",
    "organization": "Harris for President",
    "country": "united states",
    "spend": "221",
    "currency": "USD",
    "impressions": "19806",
    "startDate": "2024/08/24 22:00:10Z",
    "endDate": "2024/08/31 03:59:59Z",
    "creativeUrl": "https://www.snap.com/political-ads/asset/3a01dd25a7e0e988b15281b97dc77e947d5be15544984b03b559e539027eeb24?mediaType=mp4",
    "candidate": "Kamala Harris"
  }
}
```

**Sponsored creator content rows**

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Always `sponsoredCreatorContent` for this row. |
| `sourceRecordUrl` | string | Public Snapchat URL for the content record, when published. |
| `creator` | object | Public creator identity associated with the content. |
| `creator.name` | string | Public creator name, when available. |
| `creator.username` | string | Public creator username, when available. |
| `creator.profileUrl` | string | Public creator profile URL, when available. |
| `content` | object | Public sponsored or branded content details. |
| `content.url` | string | Public URL of the content. |
| `content.type` | string | Published content type, when available. |
| `content.title` | string | Published content title, when available. |
| `content.thumbnailUrl` | string | Public thumbnail URL, when available. |

**Sponsored creator content row**

This complete row is from a successful run of the current beta build.

```json
{
  "resultType": "sponsoredCreatorContent",
  "sourceRecordUrl": "https://www.snapchat.com/spotlight/W7_EDlXWTBiXAEEniNoMPwAAYb3l1Z3VscGZtAaAfitESAaAfitD5AAAAAQ",
  "creator": {
    "name": "mrbeast1383",
    "username": "mrbeast1383",
    "profileUrl": "https://www.snapchat.com/add/mrbeast1383"
  },
  "content": {
    "url": "https://www.snapchat.com/spotlight/W7_EDlXWTBiXAEEniNoMPwAAYb3l1Z3VscGZtAaAfitESAaAfitD5AAAAAQ",
    "type": "SPOTLIGHT",
    "thumbnailUrl": "https://cf-st.sc-cdn.net/i/ayUWzf62kD1nDUubHYhIw.256.IRZXSOY?mo=GkYaCTIBCUgCUC5gAVCgAVoQRGZMYXJnZVRodW1ibmFpbKIBEAiAAiILEgAqB0lSWlhTT1miARAImgoiCxIAKgdJUlpYU09Z&uc=46"
  }
}
```

#### 💳 Pricing

Pricing is pay per event. Each saved row uses the event for its selected surface. See the Apify Pricing tab for the current price of each event.

**Buyer-facing events**

| Event | What it covers |
|---|---|
| Commercial Ad | One commercial ad saved to your dataset. |
| Political Ad | One political or advocacy ad saved to your dataset. |
| Sponsored Content | One sponsored creator content match saved to your dataset. |

#### 🔌 Integrations

Use the Apify API to start a run and read `datasetUrl` or the saved dataset rows. You can also schedule runs in Apify and export the dataset for later analysis.

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Which public surface should I choose?

Choose Commercial ads for the public EU/EEA Ads Gallery. Choose Political and advocacy ads for published archive years. Choose Sponsored creator content when you want public sponsored or branded content for one creator name.

##### Can I run commercial and political searches together?

No. Choose one result type for each run. Run a separate search for each independent advertiser, creator, or political search you need.

##### Is this Snapchat Ads Manager?

No. This Actor searches public Snapchat sources. It does not manage campaigns or return private ad-account reports.

##### Does it search the Snapchat ads library?

Yes. Choose Commercial ads to search Snapchat's public Ads Gallery. The commercial archive covers supported EU/EEA delivery data and the history Snapchat makes available.

##### What happens when I leave Maximum results empty?

The Actor returns all available results for the selected surface until the source is exhausted. Set a positive number when you want a shorter run.

##### What happens when Snapchat does not publish a field?

That field is absent when the schema allows it. The Actor keeps source-provided values and does not invent missing details.

##### What happens when no records match?

The run ends with no matching dataset rows for that search. An empty match is different from a run error.

##### Does the Actor download ad or creator media?

No. It returns public destination, media, creative, content, or source links when Snapchat publishes them. It does not promise a downloaded media file.

##### How are repeated source items handled?

The first eligible occurrence is saved. A later appearance of the same source item is ignored, and the first saved row is not rewritten.

### 📝 Changelog

**0.0: Initial release**

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~snapchat-ads/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Google Ads Scraper](https://apify.com/maximedupre/google-ads-scraper) - Compare public Google Ads Transparency Center creatives by advertiser, domain, keyword, or ID.
- [Facebook Page Transparency Scraper](https://apify.com/maximedupre/facebook-page-transparency-scraper) - Review Meta Ad Library creatives and Page transparency for a brand.
- [FEC Campaign Finance Scraper](https://apify.com/maximedupre/fec-campaign-finance-scraper) - Check official campaign contributions, spending, and independent expenditures.
- [Influencer Scraper](https://apify.com/maximedupre/influencer-scraper) - Build public creator lists across TikTok, Instagram, and YouTube.
- [Snapchat User Spotlight Scraper](https://apify.com/maximedupre/snapchat-user-spotlight-scraper) - Review public Snapchat Spotlight videos from creator profiles.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `resultType` (type: `string`):

Choose the public Snapchat surface to search: commercial ads, political and advocacy ads, or sponsored creator content.

## `commercialDateFrom` (type: `string`):

Optional first date in the commercial ad activity window. Use YYYY-MM-DD.

## `commercialDateTo` (type: `string`):

Optional last date in the commercial ad activity window. Use YYYY-MM-DD.

## `commercialStatus` (type: `string`):

Choose active ads, paused ads, or both. If you leave this as both, active and paused ads are included.

## `politicalYears` (type: `array`):

Add one or more four-digit years for the published political and advocacy ad archive.

## `politicalKeyword` (type: `string`):

Optionally search the published political or advocacy ad record with free text.

## `creatorName` (type: `string`):

Enter one creator name to search public sponsored or branded Snapchat content.

## `advertiser` (type: `string`):

For Commercial ads or Political and advocacy ads, enter one advertiser, brand, or organization. It is required for Commercial ads and optional for Political and advocacy ads.

## `countries` (type: `array`):

For Commercial ads, add one or more supported EU/EEA countries. For Political and advocacy ads, add one country. Sponsored creator content ignores this field. Leave it empty to use the source's full country scope.

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

Maximum results to save for the selected surface. Leave it empty to return all available results until the source is exhausted.

## Actor input object example

```json
{
  "resultType": "commercialAds",
  "commercialStatus": "both",
  "advertiser": "Amazon",
  "countries": [
    "de"
  ],
  "maxItems": 1
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

Open the result rows in the default dataset.

# 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 = {
    "resultType": "commercialAds",
    "maxItems": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/snapchat-ads").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 = {
    "resultType": "commercialAds",
    "maxItems": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/snapchat-ads").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 '{
  "resultType": "commercialAds",
  "maxItems": 1
}' |
apify call maximedupre/snapchat-ads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maximedupre/snapchat-ads"
        }
    }
}

```

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/NNCgEwFqDWVr9t4xm/builds/QZhhelZ5kfzjSZgEb/openapi.json
