{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat Ads Scraper",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "Bz3yyTs1bj5SHhd0H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~snapchat-ads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-snapchat-ads",
        "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/maximedupre~snapchat-ads/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-snapchat-ads",
        "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/maximedupre~snapchat-ads/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-snapchat-ads",
        "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",
        "required": [
          "resultType"
        ],
        "properties": {
          "maxItems": {
            "title": "Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum results to save for the selected surface. Leave it empty or enter 0 to return all available results until the source is exhausted."
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "commercialAds",
              "politicalAds",
              "sponsoredCreatorContent"
            ],
            "type": "string",
            "description": "Choose the public Snapchat surface to search: commercial ads, political and advocacy ads, or sponsored creator content."
          },
          "commercialDateFrom": {
            "title": "Commercial ads: Activity date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional first date in the commercial ad activity window. Use YYYY-MM-DD in UTC."
          },
          "commercialDateTo": {
            "title": "Commercial ads: Activity date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional last date in the commercial ad activity window. Use YYYY-MM-DD in UTC."
          },
          "commercialStatus": {
            "title": "Commercial ads: Ad status",
            "enum": [
              "active",
              "paused",
              "both"
            ],
            "type": "string",
            "description": "Choose active ads, paused ads, or both. If you leave this as both, active and paused ads are included.",
            "default": "both"
          },
          "commercialStartDateFrom": {
            "title": "Commercial ads: Campaign start date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional. Keep ads whose campaign start date is on or after this date. Use YYYY-MM-DD in UTC."
          },
          "commercialStartDateTo": {
            "title": "Commercial ads: Campaign start date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional. Keep ads whose campaign start date is on or before this date. Use YYYY-MM-DD in UTC."
          },
          "commercialMediaKinds": {
            "title": "Commercial ads: Creative media kinds",
            "type": "array",
            "description": "Optional. Keep only ads whose main creative is one of the chosen kinds. Leave empty to include all kinds.",
            "items": {
              "type": "string",
              "enum": [
                "video",
                "image",
                "productCatalogue"
              ],
              "enumTitles": [
                "Video",
                "Image",
                "Product catalogue"
              ]
            }
          },
          "commercialMinImpressions": {
            "title": "Commercial ads: Minimum total impressions",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Keep only ads with at least this many total impressions."
          },
          "commercialAdvertiserMatch": {
            "title": "Commercial ads: Advertiser name match",
            "enum": [
              "contains",
              "exact"
            ],
            "type": "string",
            "description": "Contains returns every ad whose advertiser name contains the text. Exact returns only ads whose paying advertiser name matches the text exactly.",
            "default": "contains"
          },
          "politicalYears": {
            "title": "Political and advocacy ads: Archive years",
            "minItems": 1,
            "type": "array",
            "description": "Add one or more archive years. Available years are 2018 to 2026.",
            "items": {
              "type": "string",
              "enum": [
                "2018",
                "2019",
                "2020",
                "2021",
                "2022",
                "2023",
                "2024",
                "2025",
                "2026"
              ]
            }
          },
          "politicalKeyword": {
            "title": "Political and advocacy ads: Keyword",
            "minLength": 1,
            "type": "string",
            "description": "Optionally search the published political or advocacy ad record with free text."
          },
          "creatorName": {
            "title": "Sponsored creator content: Creator name",
            "type": "string",
            "description": "Enter one creator name to search public sponsored or branded Snapchat content."
          },
          "advertisers": {
            "title": "Advertisers, brands, or organizations",
            "type": "array",
            "description": "Add one or more advertiser, brand, or organization names. Required for Commercial ads. Optional for Political and advocacy ads. Sponsored creator content ignores this field.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": [
              "Amazon"
            ]
          },
          "countries": {
            "title": "Country scope",
            "type": "array",
            "description": "For Commercial ads, add one or more two-letter country codes, such as de, fr, or it. Supported codes are 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, and tr. Greece is el. For Political and advocacy ads, add one country as its full lowercase name, such as united states, germany, or united kingdom. The available names depend on the archive year. Sponsored creator content ignores this field. Leave it empty to use the source's full country scope.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}