{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat Ads Library Scraper - Snap Ads Gallery, No Login",
    "description": "[Limited Launch Offer $0.75/1K] Snapchat Ads Library API: EU ads by brand (creative, landing page, impressions, targeting) plus political ads with spend. Many brands per run. No login.",
    "version": "0.1",
    "x-build-id": "Nk9KA2gCRAzUG1PGT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kalilfagundes.w~snapchat-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kalilfagundes.w-snapchat-ads-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/kalilfagundes.w~snapchat-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kalilfagundes.w-snapchat-ads-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/kalilfagundes.w~snapchat-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kalilfagundes.w-snapchat-ads-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": {
          "library": {
            "title": "Ad library (library)",
            "enum": [
              "gallery",
              "political"
            ],
            "type": "string",
            "description": "gallery = every commercial ad shown in the EU, found by advertiser name (needs advertisers). political = Snap's archive of political and advocacy ads worldwide with spend and impressions; advertisers is optional there.",
            "default": "gallery"
          },
          "advertisers": {
            "title": "Advertiser or brand names (advertisers)",
            "type": "array",
            "description": "One advertiser, brand, committee or candidate per line, e.g. \"Spotify\". Gallery: Snap matches the paying advertiser (a company such as \"Spotify USA Inc.\"). Political: matches the organisation, paying advertiser, committee and ballot text. Many names per run are fine.",
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerAdvertiser": {
            "title": "Max ads per advertiser (maxAdsPerAdvertiser)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many ads for each name above (0 = all of them; big brands have thousands). The gallery returns 10 ads per page; the political library keeps the biggest spenders first.",
            "default": 100
          },
          "maxItems": {
            "title": "Max ads in total (maxItems)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap for the whole run (0 = no cap). Keeps the cost predictable.",
            "default": 1000
          },
          "countries": {
            "title": "Countries, gallery (countries)",
            "type": "array",
            "description": "Gallery library only: ads delivered in these EU countries. Leave empty for all 27 (Greece is \"el\"). For the political library use politicalCountries.",
            "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"
              ],
              "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"
              ]
            }
          },
          "matchMode": {
            "title": "Name matching (matchMode)",
            "enum": [
              "word",
              "snap"
            ],
            "type": "string",
            "description": "Snap matches any part of a name (\"Uber\" also finds \"Hubert\"). Exact keeps only advertisers whose name contains your name as a whole word. Loose returns everything Snap returns.",
            "default": "word"
          },
          "years": {
            "title": "Years, political library (years)",
            "type": "array",
            "description": "Political library only: which yearly archives to read, 2018 to now. Empty = this year and last year. Each year is a 0.15-5 MB file.",
            "items": {
              "type": "string",
              "enum": [
                "2026",
                "2025",
                "2024",
                "2023",
                "2022",
                "2021",
                "2020",
                "2019",
                "2018"
              ]
            }
          },
          "politicalCountries": {
            "title": "Countries, political library (politicalCountries)",
            "type": "array",
            "description": "Political library only: keep ads shown in these countries. ISO codes (US, GB, DE) or names (united states). Empty = every country.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Ad status (status)",
            "enum": [
              "",
              "ACTIVE",
              "PAUSED"
            ],
            "type": "string",
            "description": "ACTIVE = still running, PAUSED = stopped. Empty returns both.",
            "default": ""
          },
          "dateFrom": {
            "title": "Running from (dateFrom)",
            "type": "string",
            "description": "Only ads that ran at some point between dateFrom and dateTo (YYYY-MM-DD). The gallery keeps 12 months. If dateTo is empty, today is used."
          },
          "dateTo": {
            "title": "Running until (dateTo)",
            "type": "string",
            "description": "End of the date window (YYYY-MM-DD). Used together with dateFrom."
          },
          "includeRaw": {
            "title": "Include Snap's raw record (includeRaw)",
            "type": "boolean",
            "description": "Adds the untouched record from Snap as a \"raw\" field (gallery: story frames, catalog items and every targeting field; political: the CSV row). Makes rows much larger.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Advertisers in parallel (maxConcurrency)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many advertiser names are fetched at the same time. Each page of one advertiser is fetched in order.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy (proxyConfiguration)",
            "type": "object",
            "description": "Snap limits how many requests one IP may make; the scraper takes a fresh IP for every request when Apify Proxy is on.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}