{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat Political Ads Archive: Spend, Targeting & Media",
    "description": "Export Snap's official political and advocacy ad archive with exact spend, impressions, full audience targeting, parsed landing and app destinations, and direct image or video file links. No login required.",
    "version": "1.0",
    "x-build-id": "oz1pKeSn62hKEaXcp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~snapchat-political-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-snapchat-political-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/xyrelith-data~snapchat-political-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-snapchat-political-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/xyrelith-data~snapchat-political-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-snapchat-political-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "adIds"
            ],
            "type": "string",
            "description": "`search` applies the filters below across the selected yearly archives. `adIds` looks up exact ads by their 64-character ad ID, creative asset hash or Snap creative viewer URL; the other filters still apply.",
            "default": "search"
          },
          "years": {
            "title": "Archive years",
            "type": "array",
            "description": "One or more yearly Snap political ads archives (2018 to the current year). Leave the list empty to read every published year. Each ZIP is one yearly snapshot; an ad in a file can have a start date outside that file’s year.",
            "items": {
              "type": "string",
              "enum": [
                "2018",
                "2019",
                "2020",
                "2021",
                "2022",
                "2023",
                "2024",
                "2025",
                "2026"
              ],
              "enumTitles": [
                "2018 archive",
                "2019 archive",
                "2020 archive",
                "2021 archive",
                "2022 archive",
                "2023 archive",
                "2024 archive",
                "2025 archive",
                "2026 archive"
              ]
            },
            "default": [
              "2026"
            ]
          },
          "adIds": {
            "title": "Exact ad IDs or asset URLs (mode=adIds)",
            "type": "array",
            "description": "Ad IDs, creative asset hashes or Snap creative viewer URLs. Exact matching; use the search mode for text filters.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "advertiserNameContains": {
            "title": "Advertiser name contains",
            "type": "string",
            "description": "Case-insensitive text that must appear in the organization name or the paying advertiser name."
          },
          "candidateBallotContains": {
            "title": "Candidate or ballot text contains",
            "type": "string",
            "description": "Case-insensitive text matched against the candidate or ballot information column."
          },
          "keywordContains": {
            "title": "Broad keyword contains",
            "type": "string",
            "description": "Case-insensitive text searched across advertiser names, committee, candidate or ballot information, jurisdiction, landing URL, regions, interests and segments."
          },
          "regionContains": {
            "title": "Target region contains",
            "type": "string",
            "description": "Case-insensitive text matched against included or excluded regions, metros, electoral districts and postal codes."
          },
          "dateField": {
            "title": "Date field to filter",
            "enum": [
              "startDate",
              "endDate",
              "activeWindow"
            ],
            "type": "string",
            "description": "Whether the date window applies to the ad start date, the ad end date, or any ad that overlaps the window. Ads without the selected date are excluded when a window is set.",
            "default": "startDate"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Inclusive lower bound in `YYYY-MM-DD` format. Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Inclusive upper bound in `YYYY-MM-DD` format. Leave empty for no upper bound."
          },
          "status": {
            "title": "Delivery status",
            "enum": [
              "any",
              "active",
              "ended",
              "scheduled"
            ],
            "type": "string",
            "description": "Keep ads by current delivery status, derived from the published start and end dates.",
            "default": "any"
          },
          "minSpend": {
            "title": "Minimum spend",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "number",
            "description": "Keep ads whose reported spend is at least this amount. Spend is in the ad's own currency, so compare within one currency."
          },
          "maxSpend": {
            "title": "Maximum spend",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "number",
            "description": "Keep ads whose reported spend is at most this amount. Spend is in the ad's own currency."
          },
          "minImpressions": {
            "title": "Minimum impressions",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Keep ads with at least this many published impressions."
          },
          "maxImpressions": {
            "title": "Maximum impressions",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Keep ads with at most this many published impressions."
          },
          "currencies": {
            "title": "Currencies",
            "type": "array",
            "description": "Keep ads billed in one of these currencies. Leave empty for all currencies.",
            "items": {
              "type": "string",
              "enum": [
                "AED",
                "AUD",
                "CAD",
                "DKK",
                "EUR",
                "GBP",
                "INR",
                "NOK",
                "NZD",
                "SEK",
                "USD"
              ],
              "enumTitles": [
                "UAE dirham (AED)",
                "Australian dollar (AUD)",
                "Canadian dollar (CAD)",
                "Danish krone (DKK)",
                "Euro (EUR)",
                "British pound (GBP)",
                "Indian rupee (INR)",
                "Norwegian krone (NOK)",
                "New Zealand dollar (NZD)",
                "Swedish krona (SEK)",
                "US dollar (USD)"
              ]
            },
            "default": []
          },
          "countries": {
            "title": "Target countries",
            "type": "array",
            "description": "Keep ads targeted to one of these countries, as ISO two-letter codes. Leave empty for every country.",
            "items": {
              "type": "string",
              "enum": [
                "AE",
                "AR",
                "AT",
                "AU",
                "BE",
                "BH",
                "BR",
                "CA",
                "CH",
                "CL",
                "CZ",
                "DE",
                "DK",
                "EG",
                "ES",
                "FI",
                "FR",
                "GB",
                "GR",
                "HK",
                "HR",
                "HU",
                "ID",
                "IE",
                "IN",
                "IQ",
                "IT",
                "JO",
                "JP",
                "KW",
                "LT",
                "LU",
                "MA",
                "MX",
                "NG",
                "NL",
                "NO",
                "NZ",
                "OM",
                "PH",
                "PK",
                "PL",
                "PR",
                "PT",
                "QA",
                "RO",
                "RS",
                "SA",
                "SE",
                "SI",
                "SK",
                "TR",
                "US",
                "ZA"
              ],
              "enumTitles": [
                "United Arab Emirates",
                "Argentina",
                "Austria",
                "Australia",
                "Belgium",
                "Bahrain",
                "Brazil",
                "Canada",
                "Switzerland",
                "Chile",
                "Czech Republic",
                "Germany",
                "Denmark",
                "Egypt",
                "Spain",
                "Finland",
                "France",
                "United Kingdom",
                "Greece",
                "Hong Kong",
                "Croatia",
                "Hungary",
                "Indonesia",
                "Ireland",
                "India",
                "Iraq",
                "Italy",
                "Jordan",
                "Japan",
                "Kuwait",
                "Lithuania",
                "Luxembourg",
                "Morocco",
                "Mexico",
                "Nigeria",
                "Netherlands",
                "Norway",
                "New Zealand",
                "Oman",
                "Philippines",
                "Pakistan",
                "Poland",
                "Puerto Rico",
                "Portugal",
                "Qatar",
                "Romania",
                "Serbia",
                "Saudi Arabia",
                "Sweden",
                "Slovenia",
                "Slovakia",
                "Turkey",
                "United States",
                "South Africa"
              ]
            },
            "default": []
          },
          "targetingTypes": {
            "title": "Limit to ads using these targeting types",
            "type": "array",
            "description": "Keep ads that use at least one of the selected targeting types. Leave empty for all ads.",
            "items": {
              "type": "string",
              "enum": [
                "gender",
                "age",
                "country",
                "regions",
                "electoralDistricts",
                "radius",
                "metros",
                "postalCodes",
                "locationCategories",
                "interests",
                "os",
                "segments",
                "language",
                "advancedDemographics",
                "connectionType",
                "carrier"
              ],
              "enumTitles": [
                "Gender",
                "Age bracket",
                "Country",
                "Regions (states or provinces)",
                "Electoral districts",
                "Radius targeting",
                "Metros",
                "Postal codes",
                "Location categories",
                "Interests",
                "Operating system",
                "Advertiser segments",
                "Language",
                "Advanced demographics",
                "Connection type",
                "Mobile carrier"
              ]
            },
            "default": []
          },
          "creativeTypes": {
            "title": "Creative media type",
            "type": "array",
            "description": "Keep video or image creatives. Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "video",
                "image"
              ],
              "enumTitles": [
                "Video (MP4 or MOV)",
                "Image (PNG, JPG or JPEG)"
              ]
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "startDateNewest",
              "startDateOldest",
              "spendHigh",
              "spendLow",
              "impressionsHigh",
              "impressionsLow"
            ],
            "type": "string",
            "description": "Order of the returned rows before the result cap is applied.",
            "default": "startDateNewest"
          },
          "maxItems": {
            "title": "Maximum ads",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many matching ads. The cap is applied after sorting.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}