{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Ads Advertiser Leads - Businesses Running Meta Ads",
    "description": "Find businesses that run Facebook and Instagram ads now. Search the Meta Ad Library by niche and get each advertiser's website, email, phone, WhatsApp, address, social profiles, website platform and ad activity. No login. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "rrcozCiCbRiiVGPVJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hgservices~facebook-ads-advertiser-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hgservices-facebook-ads-advertiser-leads",
        "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/hgservices~facebook-ads-advertiser-leads/runs": {
      "post": {
        "operationId": "runs-sync-hgservices-facebook-ads-advertiser-leads",
        "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/hgservices~facebook-ads-advertiser-leads/run-sync": {
      "post": {
        "operationId": "run-sync-hgservices-facebook-ads-advertiser-leads",
        "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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Words that the ads contain, for example a niche (\"roofing\", \"dentist\", \"med spa\") or a product (\"skincare\", \"solar panels\"). Each keyword is one Ad Library search. The Actor finds the businesses that run these ads.",
            "items": {
              "type": "string"
            }
          },
          "adLibraryUrls": {
            "title": "Ad Library search URLs",
            "type": "array",
            "description": "Keyword search URLs copied from facebook.com/ads/library. Each URL is one search. Its country, language and platform filters are used. The Actor always searches active ads.",
            "items": {
              "type": "string"
            }
          },
          "exactPhrase": {
            "title": "Exact phrase",
            "type": "boolean",
            "description": "Find only ads that contain the keyword words in this order, for example \"metal roof replacement\".",
            "default": false
          },
          "country": {
            "title": "Country",
            "enum": [
              "ALL",
              "AF",
              "AX",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AI",
              "AG",
              "AR",
              "AM",
              "AW",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BM",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "VG",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "BQ",
              "KY",
              "CF",
              "TD",
              "CL",
              "CN",
              "CX",
              "CC",
              "CO",
              "KM",
              "CG",
              "CD",
              "CK",
              "CR",
              "CI",
              "HR",
              "CU",
              "CW",
              "CY",
              "CZ",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "GQ",
              "ER",
              "EE",
              "SZ",
              "ET",
              "FK",
              "FO",
              "FJ",
              "FI",
              "FR",
              "GF",
              "PF",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GD",
              "GP",
              "GU",
              "GT",
              "GG",
              "GN",
              "GW",
              "GY",
              "HT",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IR",
              "IQ",
              "IE",
              "IM",
              "IL",
              "IT",
              "JM",
              "JP",
              "JE",
              "JO",
              "KZ",
              "KE",
              "KI",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MO",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MH",
              "MQ",
              "MR",
              "MU",
              "YT",
              "MX",
              "FM",
              "MD",
              "MC",
              "MN",
              "ME",
              "MS",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "NC",
              "NZ",
              "NI",
              "NE",
              "NG",
              "NU",
              "NF",
              "KP",
              "MK",
              "MP",
              "NO",
              "OM",
              "PK",
              "PW",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PN",
              "PL",
              "PT",
              "PR",
              "QA",
              "RE",
              "RO",
              "RU",
              "RW",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SX",
              "SK",
              "SI",
              "SB",
              "SO",
              "ZA",
              "KR",
              "SS",
              "ES",
              "LK",
              "KN",
              "LC",
              "VC",
              "SD",
              "SR",
              "SJ",
              "SE",
              "CH",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TL",
              "TG",
              "TK",
              "TO",
              "TT",
              "TN",
              "TR",
              "TM",
              "TC",
              "TV",
              "VI",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "UZ",
              "VU",
              "VA",
              "VE",
              "VN",
              "EH",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Country where the ads were shown. Select \"All countries\" to search everywhere.",
            "default": "US"
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Find only ads in these languages. Leave empty for all languages.",
            "items": {
              "type": "string",
              "enum": [
                "af",
                "sq",
                "am",
                "ar",
                "hy",
                "az",
                "bn",
                "eu",
                "be",
                "bs",
                "bg",
                "my",
                "ca",
                "zh",
                "hr",
                "cs",
                "da",
                "nl",
                "en",
                "et",
                "tl",
                "fi",
                "fr",
                "gl",
                "ka",
                "de",
                "el",
                "gu",
                "ha",
                "he",
                "hi",
                "hu",
                "is",
                "id",
                "ga",
                "it",
                "ja",
                "kn",
                "kk",
                "km",
                "ko",
                "lo",
                "lv",
                "lt",
                "mk",
                "ms",
                "ml",
                "mr",
                "mn",
                "ne",
                "no",
                "ps",
                "fa",
                "pl",
                "pt",
                "pa",
                "ro",
                "ru",
                "sr",
                "si",
                "sk",
                "sl",
                "so",
                "es",
                "sw",
                "sv",
                "ta",
                "te",
                "th",
                "tr",
                "uk",
                "ur",
                "uz",
                "vi",
                "cy",
                "xh",
                "yo",
                "zu"
              ],
              "enumTitles": [
                "Afrikaans",
                "Albanian",
                "Amharic",
                "Arabic",
                "Armenian",
                "Azerbaijani",
                "Bangla",
                "Basque",
                "Belarusian",
                "Bosnian",
                "Bulgarian",
                "Burmese",
                "Catalan",
                "Chinese",
                "Croatian",
                "Czech",
                "Danish",
                "Dutch",
                "English",
                "Estonian",
                "Filipino",
                "Finnish",
                "French",
                "Galician",
                "Georgian",
                "German",
                "Greek",
                "Gujarati",
                "Hausa",
                "Hebrew",
                "Hindi",
                "Hungarian",
                "Icelandic",
                "Indonesian",
                "Irish",
                "Italian",
                "Japanese",
                "Kannada",
                "Kazakh",
                "Khmer",
                "Korean",
                "Lao",
                "Latvian",
                "Lithuanian",
                "Macedonian",
                "Malay",
                "Malayalam",
                "Marathi",
                "Mongolian",
                "Nepali",
                "Norwegian",
                "Pashto",
                "Persian",
                "Polish",
                "Portuguese",
                "Punjabi",
                "Romanian",
                "Russian",
                "Serbian",
                "Sinhala",
                "Slovak",
                "Slovenian",
                "Somali",
                "Spanish",
                "Swahili",
                "Swedish",
                "Tamil",
                "Telugu",
                "Thai",
                "Turkish",
                "Ukrainian",
                "Urdu",
                "Uzbek",
                "Vietnamese",
                "Welsh",
                "Xhosa",
                "Yoruba",
                "Zulu"
              ]
            }
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Find only ads that ran on these platforms. Leave empty for all platforms.",
            "items": {
              "type": "string",
              "enum": [
                "facebook",
                "instagram",
                "messenger",
                "audience_network",
                "threads",
                "whatsapp"
              ],
              "enumTitles": [
                "Facebook",
                "Instagram",
                "Messenger",
                "Audience Network",
                "Threads",
                "WhatsApp"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "impressions",
              "newest"
            ],
            "type": "string",
            "description": "Order of the ads in the search. \"Most impressions first\" finds the advertisers that spend the most. \"Newest first\" finds advertisers that started new ads recently.",
            "default": "impressions"
          },
          "maxAdvertisersPerSearch": {
            "title": "Maximum advertisers per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The search stops when it finds this many new advertisers. Big brands (see \"Maximum page likes\") do not count. Each advertiser is one lead before the contact filters.",
            "default": 50
          },
          "maxAdsPerSearch": {
            "title": "Maximum ads to scan per search",
            "minimum": 10,
            "maximum": 20000,
            "type": "integer",
            "description": "The search also stops after this many ads. Many advertisers run several ads, so you scan more ads than you find advertisers.",
            "default": 1000
          },
          "maxPageLikes": {
            "title": "Maximum page likes",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Skip advertisers whose Facebook page has more likes than this, for example national brands. Set 0 to keep all advertisers.",
            "default": 1000000
          },
          "minAdsFound": {
            "title": "Minimum ads per advertiser",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Keep only advertisers with at least this many active ads in the search results. A higher number finds businesses that spend more on ads.",
            "default": 1
          },
          "requireWebsite": {
            "title": "Only advertisers with a website",
            "type": "boolean",
            "description": "Skip advertisers whose ads go only to Messenger, WhatsApp, a call button, a lead form or a marketplace.",
            "default": false
          },
          "requireContact": {
            "title": "Only leads with contact data",
            "enum": [
              "none",
              "email",
              "phone",
              "email_or_phone"
            ],
            "type": "string",
            "description": "Save only leads with this contact data. You pay only for saved leads.",
            "default": "none"
          },
          "excludeDomains": {
            "title": "Exclude websites",
            "type": "array",
            "description": "Skip advertisers with these website domains, for example your current clients or competitors (\"example.com\").",
            "items": {
              "type": "string"
            }
          },
          "crawlWebsites": {
            "title": "Find contacts on websites",
            "type": "boolean",
            "description": "Visit each advertiser's website to find the email, phone, address, social profiles and website platform. Turn off to get only the advertiser and ad data, which is faster.",
            "default": true
          },
          "maxPagesPerWebsite": {
            "title": "Maximum pages per website",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "The home page plus contact, about, imprint, location, privacy and terms pages, in this order.",
            "default": 5
          },
          "onlyRoleEmails": {
            "title": "Only company emails",
            "type": "boolean",
            "description": "Keep only role emails such as info@, sales@ or support@, and drop emails that can belong to one person.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}