{
  "openapi": "3.0.1",
  "info": {
    "title": "Ad Library Scraper: Google Ads Transparency, Bing & Snapchat",
    "description": "Every competitor ad from Google Ads Transparency Center, Microsoft (Bing) Ad Library and Snapchat Ads Gallery (+ Meta with your token) in one EU-DSA schema: ad copy, images/videos, EU reach per country, targeting, payer. Built-in new/stopped-ad monitor; unchanged ads and errors are free.",
    "version": "0.3",
    "x-build-id": "dRPueJzCKq5tGn4D8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pegton~ad-library-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pegton-ad-library-monitor",
        "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/pegton~ad-library-monitor/runs": {
      "post": {
        "operationId": "runs-sync-pegton-ad-library-monitor",
        "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/pegton~ad-library-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-pegton-ad-library-monitor",
        "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": {
          "advertisers": {
            "title": "Advertisers (brands, domains or IDs)",
            "type": "array",
            "description": "One per line: brand name (<code>Otto</code>), website domain (<code>zalando.de</code>), Google Ads Transparency advertiser ID (<code>AR…</code>) or URL, Microsoft Ad Library advertiser ID or URL, or Meta page ID. Bulk lists welcome (hundreds of brands). Names are resolved to the matching advertiser accounts automatically. Duplicates (e.g. <code>OTTO.DE</code> and <code>https://www.otto.de/</code>) are merged, and an ad reached via two inputs is delivered and charged once.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Ad libraries",
            "type": "array",
            "description": "Which public ad libraries to search. Google, Microsoft and Snapchat need no account. Meta needs your own free Ad Library API token (see below).",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "microsoft",
                "snapchat",
                "meta"
              ],
              "enumTitles": [
                "Google Ads Transparency Center (Search, YouTube, Shopping, Maps, Play, Display)",
                "Microsoft Advertising Ad Library (Bing, EEA)",
                "Snapchat Ads Gallery (EU + Turkey, official API)",
                "Meta Ad Library (Facebook, Instagram) – own token required"
              ]
            },
            "default": [
              "google",
              "microsoft"
            ]
          },
          "countries": {
            "title": "Countries (optional)",
            "type": "array",
            "description": "ISO country codes like <code>DE</code>, <code>FR</code> (<code>UK</code> and <code>EL</code> are accepted). Shortcuts: <code>EU</code> (27 member states), <code>EEA</code>. Only ads shown in these countries. Empty = all countries.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerAdvertiser": {
            "title": "Max ads per advertiser and platform",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap per advertiser and platform. Newest ads first. You are never charged for more than this.",
            "default": 20
          },
          "onlyShownSince": {
            "title": "Only ads shown since",
            "type": "string",
            "description": "Date (<code>2026-10-01</code>) or relative (<code>30 days</code>, <code>2 weeks</code>). Leave empty for all time."
          },
          "adFormats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Only these formats. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "video"
              ],
              "enumTitles": [
                "Text",
                "Image",
                "Video"
              ]
            },
            "default": []
          },
          "googleSurfaces": {
            "title": "Google surfaces",
            "type": "array",
            "description": "Only Google ads that were shown on these surfaces (uses the per-ad details). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "SEARCH",
                "YOUTUBE",
                "SHOPPING",
                "MAPS",
                "PLAY"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube",
                "Google Shopping",
                "Google Maps",
                "Google Play"
              ]
            },
            "default": []
          },
          "includeDetails": {
            "title": "Include EU reach, countries & targeting",
            "type": "boolean",
            "description": "EU impressions range, impressions per country, surfaces (Search, YouTube, Shopping…), targeting categories and 'paid by' (DSA data). Included in the per-ad price.",
            "default": true
          },
          "includeAdText": {
            "title": "Include ad copy (Google)",
            "type": "boolean",
            "description": "Headline, long headline, description, call to action, landing page and YouTube video for Google ads, read from the ad's public preview. Included in the per-ad price.",
            "default": true
          },
          "onlyNewAds": {
            "title": "Monitor mode: only new ads",
            "type": "boolean",
            "description": "Monitor mode. The first run stores a baseline; every later run returns only ads that started running since the previous check (changeType = new) and, optionally, ads that stopped. Long-running ads that merely rotate into the newest list are recognised and not reported as new. Schedule the Actor daily or weekly for competitor-ad alerts. Unchanged ads are skipped and never charged.",
            "default": false
          },
          "reportStoppedAds": {
            "title": "Also report stopped ads",
            "type": "boolean",
            "description": "Monitor mode: also return ads that were running at the last check and have stopped since (changeType = stopped).",
            "default": true
          },
          "monitorKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Separate memory for different monitors. Defaults to a key derived from advertisers, platforms and countries."
          },
          "metaAccessToken": {
            "title": "Meta Ad Library API access token",
            "type": "string",
            "description": "Only for Meta. Your own token from <a href='https://www.facebook.com/ads/library/api' target='_blank'>facebook.com/ads/library/api</a> (free, requires identity confirmation by Meta). Stored encrypted."
          },
          "maxItems": {
            "title": "Max ads in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many ads across all advertisers. Also limits how much is fetched, so the run stays fast and cheap. 0 = no limit.",
            "default": 0
          },
          "maxChargeUsd": {
            "title": "Max cost for this run (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Stop before the estimated charge exceeds this. 0 = no extra limit (the platform's max charge still applies).",
            "default": 0
          },
          "maxAdvertisersPerInput": {
            "title": "Advertisers matched per name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "When you enter a brand name, how many matching advertiser accounts to include (e.g. country subsidiaries).",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests per run. Higher is faster but more likely to be rate-limited by Google.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is recommended; the Actor falls back to direct connections automatically.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}