{
  "openapi": "3.0.1",
  "info": {
    "title": "Meta Ad Library Advertiser Disclosure Scraper",
    "description": "Facebook Ad Library scraper: search Facebook ads and Meta Ad Library ads by keyword, advertiser page, country and ad type. Political and issue ads add spend, impressions and reach ranges plus payer byline; every ad carries state-media and AI-media flags and creative-variant counts.",
    "version": "0.1",
    "x-build-id": "u2j8rLDjjwWigvc4d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jungle_synthesizer~meta-ad-library-advertiser-disclosure-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jungle_synthesizer-meta-ad-library-advertiser-disclosure-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/jungle_synthesizer~meta-ad-library-advertiser-disclosure-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jungle_synthesizer-meta-ad-library-advertiser-disclosure-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/jungle_synthesizer~meta-ad-library-advertiser-disclosure-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jungle_synthesizer-meta-ad-library-advertiser-disclosure-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",
        "required": [
          "countries",
          "maxItems"
        ],
        "properties": {
          "sp_intended_usage": {
            "title": "What is the intended usage of this data?",
            "minLength": 1,
            "type": "string",
            "description": "What will this data feed? E.g. lead lists, KYB checks, price tracking."
          },
          "sp_improvement_suggestions": {
            "title": "How can we improve this crawler for you?",
            "minLength": 1,
            "type": "string",
            "description": "Provide any feedback or suggestions for improvements."
          },
          "sp_contact": {
            "title": "Contact Email",
            "minLength": 1,
            "type": "string",
            "description": "We'll personally help with your use case. No spam."
          },
          "resumeCursor": {
            "title": "Resume cursor (continue a previous run)",
            "type": "string",
            "description": "Leave empty for a fresh crawl. To CONTINUE a previous run where it stopped — without paying again for records you already received — paste the `resumeCursor` value from that run's Output (the run's OUTPUT key). Resume promptly: the previous run's data expires with your account's retention window (free tier: your ~10 most recent runs)."
          },
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Free-text keyword searches, matched against ad creative/advertiser name (Meta's own Ad Library search box). Each keyword is a separate query per selected country. Provide this, `pageIds`, or both.",
            "items": {
              "type": "string"
            }
          },
          "pageIds": {
            "title": "Advertiser Page IDs",
            "type": "array",
            "description": "Meta advertiser Page IDs to look up directly (all ads run by that page), instead of or alongside keyword search. Find a Page ID from an ad's advertiser link or Meta's own Ad Library UI.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Facebook Page URLs",
            "type": "array",
            "description": "Public Facebook Page URLs (facebook.com/nike). Each is resolved to its advertiser Page ID, then all of that page's ads are returned for every selected country. A URL that is not a public Page stops the run with an error.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Company Websites",
            "type": "array",
            "description": "Company website domains (nike.com). Each site is read for the Facebook Page it links as its own, then all of that page's ads are returned. A site that links no Page, or several with none named like the domain, stops the run with an error.",
            "items": {
              "type": "string"
            }
          },
          "brandNames": {
            "title": "Brand Names",
            "type": "array",
            "description": "Brand or advertiser names (Nike). Each is matched to the advertiser Page of exactly that name, then all of that page's ads are returned. A name with no matching advertiser stops the run with an error; use a Page ID or Page URL for an exact advertiser.",
            "items": {
              "type": "string"
            }
          },
          "adsLibraryUrls": {
            "title": "Meta Ad Library URLs",
            "type": "array",
            "description": "Search URLs copied from the Meta Ad Library (facebook.com/ads/library/?...). Each runs as pasted, with its own country and filters. A URL with no search term or advertiser stops the run with an error.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Ad Library country scope(s) to search. Each selected country runs as a separate query. Defaults to United States to keep a first run cheap — select more (or every country) for full worldwide coverage; each additional country is one more Bright Data Web Unlocker request per keyword/page.",
            "items": {
              "type": "string",
              "enum": [
                "AD",
                "AE",
                "AG",
                "AI",
                "AL",
                "AM",
                "AO",
                "AQ",
                "AR",
                "AT",
                "AU",
                "AZ",
                "BA",
                "BB",
                "BD",
                "BE",
                "BF",
                "BG",
                "BH",
                "BI",
                "BJ",
                "BM",
                "BN",
                "BO",
                "BR",
                "BS",
                "BT",
                "BV",
                "BW",
                "BY",
                "BZ",
                "CA",
                "CD",
                "CF",
                "CG",
                "CH",
                "CI",
                "CL",
                "CM",
                "CO",
                "CR",
                "CV",
                "CY",
                "CZ",
                "DE",
                "DJ",
                "DK",
                "DM",
                "DO",
                "DZ",
                "EC",
                "EE",
                "EG",
                "ER",
                "ES",
                "ET",
                "FI",
                "FJ",
                "FK",
                "FM",
                "FR",
                "GA",
                "GB",
                "GD",
                "GE",
                "GG",
                "GH",
                "GI",
                "GM",
                "GN",
                "GQ",
                "GR",
                "GS",
                "GT",
                "GW",
                "GY",
                "HN",
                "HR",
                "HT",
                "HU",
                "ID",
                "IE",
                "IL",
                "IM",
                "IN",
                "IO",
                "IQ",
                "IS",
                "IT",
                "JE",
                "JM",
                "JO",
                "JP",
                "KE",
                "KG",
                "KH",
                "KI",
                "KM",
                "KN",
                "KW",
                "KY",
                "KZ",
                "LA",
                "LB",
                "LC",
                "LI",
                "LK",
                "LR",
                "LS",
                "LT",
                "LU",
                "LV",
                "LY",
                "MA",
                "MC",
                "MD",
                "ME",
                "MG",
                "MH",
                "MK",
                "ML",
                "MM",
                "MN",
                "MR",
                "MS",
                "MT",
                "MU",
                "MV",
                "MW",
                "MX",
                "MY",
                "MZ",
                "NA",
                "NE",
                "NG",
                "NI",
                "NL",
                "NO",
                "NP",
                "NR",
                "NZ",
                "OM",
                "PA",
                "PE",
                "PG",
                "PH",
                "PK",
                "PL",
                "PN",
                "PS",
                "PT",
                "PW",
                "PY",
                "QA",
                "RO",
                "RS",
                "RW",
                "SA",
                "SB",
                "SC",
                "SE",
                "SG",
                "SH",
                "SI",
                "SK",
                "SL",
                "SM",
                "SN",
                "SO",
                "SR",
                "SS",
                "ST",
                "SV",
                "SZ",
                "TC",
                "TD",
                "TG",
                "TH",
                "TJ",
                "TL",
                "TM",
                "TN",
                "TO",
                "TR",
                "TT",
                "TV",
                "TW",
                "TZ",
                "UA",
                "UG",
                "US",
                "UY",
                "UZ",
                "VA",
                "VC",
                "VE",
                "VG",
                "VN",
                "VU",
                "WS",
                "XK",
                "YE",
                "ZA",
                "ZM",
                "ZW",
                "ALL"
              ],
              "enumTitles": [
                "Andorra",
                "United Arab Emirates",
                "Antigua and Barbuda",
                "Anguilla",
                "Albania",
                "Armenia",
                "Angola",
                "Antarctica",
                "Argentina",
                "Austria",
                "Australia",
                "Azerbaijan",
                "Bosnia and Herzegovina",
                "Barbados",
                "Bangladesh",
                "Belgium",
                "Burkina Faso",
                "Bulgaria",
                "Bahrain",
                "Burundi",
                "Benin",
                "Bermuda",
                "Brunei",
                "Bolivia",
                "Brazil",
                "Bahamas",
                "Bhutan",
                "Bouvet Island",
                "Botswana",
                "Belarus",
                "Belize",
                "Canada",
                "DR Congo",
                "Central African Republic",
                "Congo",
                "Switzerland",
                "Cote d'Ivoire",
                "Chile",
                "Cameroon",
                "Colombia",
                "Costa Rica",
                "Cape Verde",
                "Cyprus",
                "Czechia",
                "Germany",
                "Djibouti",
                "Denmark",
                "Dominica",
                "Dominican Republic",
                "Algeria",
                "Ecuador",
                "Estonia",
                "Egypt",
                "Eritrea",
                "Spain",
                "Ethiopia",
                "Finland",
                "Fiji",
                "Falkland Islands",
                "Micronesia",
                "France",
                "Gabon",
                "United Kingdom",
                "Grenada",
                "Georgia",
                "Guernsey",
                "Ghana",
                "Gibraltar",
                "Gambia",
                "Guinea",
                "Equatorial Guinea",
                "Greece",
                "South Georgia",
                "Guatemala",
                "Guinea-Bissau",
                "Guyana",
                "Honduras",
                "Croatia",
                "Haiti",
                "Hungary",
                "Indonesia",
                "Ireland",
                "Israel",
                "Isle of Man",
                "India",
                "British Indian Ocean Territory",
                "Iraq",
                "Iceland",
                "Italy",
                "Jersey",
                "Jamaica",
                "Jordan",
                "Japan",
                "Kenya",
                "Kyrgyzstan",
                "Cambodia",
                "Kiribati",
                "Comoros",
                "Saint Kitts and Nevis",
                "Kuwait",
                "Cayman Islands",
                "Kazakhstan",
                "Laos",
                "Lebanon",
                "Saint Lucia",
                "Liechtenstein",
                "Sri Lanka",
                "Liberia",
                "Lesotho",
                "Lithuania",
                "Luxembourg",
                "Latvia",
                "Libya",
                "Morocco",
                "Monaco",
                "Moldova",
                "Montenegro",
                "Madagascar",
                "Marshall Islands",
                "North Macedonia",
                "Mali",
                "Myanmar",
                "Mongolia",
                "Mauritania",
                "Montserrat",
                "Malta",
                "Mauritius",
                "Maldives",
                "Malawi",
                "Mexico",
                "Malaysia",
                "Mozambique",
                "Namibia",
                "Niger",
                "Nigeria",
                "Nicaragua",
                "Netherlands",
                "Norway",
                "Nepal",
                "Nauru",
                "New Zealand",
                "Oman",
                "Panama",
                "Peru",
                "Papua New Guinea",
                "Philippines",
                "Pakistan",
                "Poland",
                "Pitcairn",
                "Palestine",
                "Portugal",
                "Palau",
                "Paraguay",
                "Qatar",
                "Romania",
                "Serbia",
                "Rwanda",
                "Saudi Arabia",
                "Solomon Islands",
                "Seychelles",
                "Sweden",
                "Singapore",
                "Saint Helena",
                "Slovenia",
                "Slovakia",
                "Sierra Leone",
                "San Marino",
                "Senegal",
                "Somalia",
                "Suriname",
                "South Sudan",
                "Sao Tome and Principe",
                "El Salvador",
                "Eswatini",
                "Turks and Caicos Islands",
                "Chad",
                "Togo",
                "Thailand",
                "Tajikistan",
                "Timor-Leste",
                "Turkmenistan",
                "Tunisia",
                "Tonga",
                "Turkey",
                "Trinidad and Tobago",
                "Tuvalu",
                "Taiwan",
                "Tanzania",
                "Ukraine",
                "Uganda",
                "United States",
                "Uruguay",
                "Uzbekistan",
                "Vatican City",
                "Saint Vincent and the Grenadines",
                "Venezuela",
                "British Virgin Islands",
                "Vietnam",
                "Vanuatu",
                "Samoa",
                "Kosovo",
                "Yemen",
                "South Africa",
                "Zambia",
                "Zimbabwe",
                "All countries"
              ]
            }
          },
          "adType": {
            "title": "Ad Type",
            "enum": [
              "all",
              "political_and_issue_ads",
              "housing_ads",
              "employment_ads",
              "financial_products_and_services_ads"
            ],
            "type": "string",
            "description": "Ad Library category filter. \"All ads\" includes political/issue ads; the three special categories return only ads Meta classifies under that disclosure regime."
          },
          "mediaType": {
            "title": "Media Type",
            "enum": [
              "all",
              "image_and_meme",
              "video"
            ],
            "type": "string",
            "description": "Only return ads whose creative is an image or a video. Applies to keywords, Page IDs, Page URLs and brand names.",
            "default": "all"
          },
          "activeStatus": {
            "title": "Active Status",
            "enum": [
              "active",
              "inactive",
              "all"
            ],
            "type": "string",
            "description": "Filter by whether the ad is currently running."
          },
          "fetchPageTransparency": {
            "title": "Fetch Page Transparency (advertiser page creation date)",
            "type": "boolean",
            "description": "When enabled, fetches each unique advertiser's public Page Transparency panel once per run (deduplicated) and adds a separate advertiser-summary row per advertiser (ad_archive_id null, page_id set) carrying the page creation date and, where Meta confirms one, the responsible owner — join it to the ad rows on page_id. Adds roughly one extra request per unique advertiser found, on top of the search requests.",
            "default": false
          },
          "fetchPageProfile": {
            "title": "Fetch Page Profile (category, followers, avatar, alias)",
            "type": "boolean",
            "description": "Adds one profile row per advertiser Page with its category, follower count, avatar URL and alias. Each profile row is billed as one extra result.",
            "default": false
          },
          "maxItems": {
            "title": "Max Items",
            "type": "integer",
            "description": "Maximum number of ad records to return across all keyword/page x country queries."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}