{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat Ads Library Scraper | by Brand, from $0.50/1K Ads",
    "description": "Scrape the Snap Ads Gallery (EU) by brand, not only by paying entity: Temu, Samsung or Betclic ads bought through agencies, which a plain search returns as 0. Impressions per country, targeting, media, app IDs. Plain HTTP, no login.",
    "version": "0.1",
    "x-build-id": "DNcIUiVumdxaLWIaD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~snapchat-ads-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-snapchat-ads-library-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/alexmorain~snapchat-ads-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-snapchat-ads-library-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/alexmorain~snapchat-ads-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-snapchat-ads-library-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": {
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Brands as you see them on Snapchat, one per line: <code>Temu</code>, <code>Samsung</code>, <code>McDonald's</code>. Each brand is resolved to the entities that pay for its ads (the log lists them) and only ads signed by the brand come out. A brand the directory does not know yet is searched as a payer name only, and the run says so.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertisers (paying entity)",
            "type": "array",
            "description": "Name of the paying entity, passed as is to Snapchat, which matches it as a case-insensitive part of the name: <code>Nike</code> also returns <code>Oya Nike Botanica</code>. Use it when you know the payer (<code>TECDO HONG KONG LIMITED</code>), or to follow an agency.",
            "items": {
              "type": "string"
            }
          },
          "exactAdvertiserMatch": {
            "title": "Exact advertiser match",
            "type": "boolean",
            "description": "Keep only ads whose paying entity is the term you typed, ignoring case, punctuation and legal forms (<code>Inc.</code>, <code>Ltd</code>, <code>SE</code>...). Removes <code>Oya Nike Botanica</code> from a search for <code>Nike</code>. Applies to Advertisers.",
            "default": false
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Only ads delivered in these countries. Leave empty for all EU countries and Türkiye. Snapchat lists no ad outside them (no US). Greece is <code>el</code>.",
            "items": {
              "type": "string",
              "enum": [
                "at",
                "be",
                "bg",
                "cy",
                "cz",
                "de",
                "dk",
                "ee",
                "el",
                "es",
                "fi",
                "fr",
                "hr",
                "hu",
                "ie",
                "it",
                "lt",
                "lu",
                "lv",
                "mt",
                "nl",
                "pl",
                "pt",
                "ro",
                "se",
                "si",
                "sk",
                "tr"
              ],
              "enumTitles": [
                "Austria",
                "Belgium",
                "Bulgaria",
                "Cyprus",
                "Czechia",
                "Germany",
                "Denmark",
                "Estonia",
                "Greece",
                "Spain",
                "Finland",
                "France",
                "Croatia",
                "Hungary",
                "Ireland",
                "Italy",
                "Lithuania",
                "Luxembourg",
                "Latvia",
                "Malta",
                "Netherlands",
                "Poland",
                "Portugal",
                "Romania",
                "Sweden",
                "Slovenia",
                "Slovakia",
                "Türkiye"
              ]
            }
          },
          "startDate": {
            "title": "Active from",
            "type": "string",
            "description": "Only ads that ran during the period <code>YYYY-MM-DD</code>. Snapchat keeps ads from 2024. If only one of the two dates is filled, the other is completed (today, or 2024-01-01) and the log says so."
          },
          "endDate": {
            "title": "Active until",
            "type": "string",
            "description": "End of the period, <code>YYYY-MM-DD</code>. See <b>Active from</b>."
          },
          "status": {
            "title": "Ad status",
            "enum": [
              "ALL",
              "ACTIVE",
              "PAUSED"
            ],
            "type": "string",
            "description": "Active ads run now, paused ads have stopped.",
            "default": "ALL"
          },
          "maxAdsPerSearch": {
            "title": "Max ads per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stops each brand or advertiser after this many ads. <code>0</code> means no limit: a big brand can have tens of thousands of ads, and you pay per ad.",
            "default": 0
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "new-only"
            ],
            "type": "string",
            "description": "<b>All</b> returns every ad found. <b>New only</b> returns only ads never returned before for the same searches (a registry is kept in your account), for monitoring on a schedule. Each run still reads the whole search, but only new ads are returned and charged.",
            "default": "all"
          },
          "registryKey": {
            "title": "Registry key",
            "type": "string",
            "description": "New-only mode: name of the registry. Leave empty to get one registry per set of searches and filters; set it to share one registry between runs or tasks."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "At the end of a run that returned ads, a summary (<code>actor</code>, <code>runId</code>, <code>mode</code>, <code>items</code>, <code>searches</code>) is POSTed here as JSON. Slack and Discord URLs work. A failure never fails the run."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: Snapchat answers a plain connection. Leave empty. If Snapchat rate-limits the run persistently, the Actor switches to the Apify datacenter proxy by itself."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}