{
  "openapi": "3.0.1",
  "info": {
    "title": "Snapchat EU Ads Library Impressions & Targeting Extractor",
    "description": "Search Snapchat's EU ad transparency library by advertiser or creator, or browse all sponsored content, returning headline, creative, call to action, per-country impressions and targeting for each ad.",
    "version": "1.0",
    "x-build-id": "ztQb0gIwbdWyF5gK7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~snapchat-eu-ads-library-impressions-and-targeting/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-snapchat-eu-ads-library-impressions-and-targeting",
        "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/nimbryxo-studio~snapchat-eu-ads-library-impressions-and-targeting/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-snapchat-eu-ads-library-impressions-and-targeting",
        "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/nimbryxo-studio~snapchat-eu-ads-library-impressions-and-targeting/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-snapchat-eu-ads-library-impressions-and-targeting",
        "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": "Scraping Mode",
            "enum": [
              "adSearch",
              "sponsoredContent",
              "creatorSearch"
            ],
            "type": "string",
            "description": "adSearch searches ads by paying advertiser, sponsoredContent browses all live sponsored content, and creatorSearch searches sponsored content by creator.",
            "default": "adSearch"
          },
          "payingAdvertiserNames": {
            "title": "Advertiser Names",
            "type": "array",
            "description": "For adSearch mode: one or more paying-advertiser names, e.g. Nike, Amazon, Zalando. The API matches partial names case-insensitively; set Advertiser Match to exact for case-insensitive exact payer matching.",
            "items": {
              "type": "string"
            }
          },
          "payingAdvertiserName": {
            "title": "Advertiser Name (single, legacy)",
            "type": "string",
            "description": "Single-advertiser legacy input, still supported. Prefer Advertiser Names. If both are set, the names are merged and deduplicated."
          },
          "advertiserMatch": {
            "title": "Advertiser Match",
            "enum": [
              "contains",
              "exact"
            ],
            "type": "string",
            "description": "contains (default) uses Snap's partial payer-name search. exact keeps only ads whose paying advertiser exactly equals one of your names, ignoring case and extra whitespace.",
            "default": "contains"
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "2-letter country codes to filter ads by. Leave empty for all. Supported: the 27 EU codes at, be, bg, cy, cz, de, dk, ee, el (Greece), es, fi, fr, hr, hu, ie, it, lt, lu, lv, mt, nl, pl, pt, ro, se, si, sk, tr (Turkey). gr is accepted as an alias for el. UK (gb/uk) and US are not in the library.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start Date",
            "type": "string",
            "description": "Filter ads that ran on or after this date (ISO 8601 or YYYY-MM-DD). The library only covers the last 12 months; older dates may return nothing."
          },
          "endDate": {
            "title": "End Date",
            "type": "string",
            "description": "Filter ads that ran on or before this date (ISO 8601 or YYYY-MM-DD). The API does not publish an ad end date in records."
          },
          "status": {
            "title": "Ad Status",
            "enum": [
              "ACTIVE",
              "PAUSED",
              "ALL"
            ],
            "type": "string",
            "description": "Filter ads by current status: ACTIVE, PAUSED, or ALL.",
            "default": "ALL"
          },
          "creatorName": {
            "title": "Creator Name",
            "type": "string",
            "description": "For creatorSearch mode: creator username or display name used to search sponsored content."
          },
          "maxResults": {
            "title": "Max Results per Advertiser",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum records to save per advertiser in adSearch, or total records in sponsoredContent/creatorSearch. The actor paginates the public API automatically (10 ads per request for adSearch, up to 200 items per page for sponsored content).",
            "default": 200
          },
          "includeCoverage": {
            "title": "Include Coverage Rows",
            "type": "boolean",
            "description": "Add one coverage row per advertiser/creator listing matched payer names, status, pages fetched, duplicates removed, countries, and impression coverage.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy. The Ads Library API is public and normally works without a proxy; enable one only if your runs keep hitting rate limits."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}