{
  "openapi": "3.0.1",
  "info": {
    "title": "Microsoft Ads Library Scraper: Bing Ads, EU DSA Repository",
    "description": "Bing ads from Microsoft's Ad Library, its EU ad repository under the DSA (EEA only), by advertiser or keyword: ad text, landing page, images where shown; optional dates, impression ranges and country shares at no extra charge. Watch for new ads. $0.40 per 1,000 ads on Free, $0.30 on Business.",
    "version": "0.1",
    "x-build-id": "2Tb2kH2uxqaQCKiUs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchwright~microsoft-ads-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchwright-microsoft-ads-library-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/fetchwright~microsoft-ads-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchwright-microsoft-ads-library-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/fetchwright~microsoft-ads-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchwright-microsoft-ads-library-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": {
          "advertisers": {
            "title": "Advertisers",
            "type": "array",
            "description": "Required, unless you search by keyword below. One per line: the advertiser's name as Microsoft's Ad Library lists it, often the legal name (for example **Booking.com B.V.**), or Microsoft's numeric advertiser ID (**4295086664**), or a link to an advertiser in the Ad Library. You can also paste an ad's Ad Library link (or ad:<id>) to fetch that one ad with details. A website such as booking.com cannot be searched: it is reported for that line, not charged.",
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerAdvertiser": {
            "title": "Maximum ads per advertiser or keyword",
            "minimum": 1,
            "maximum": 31000,
            "type": "integer",
            "description": "A hard cap: the run never saves more than this many ads for each advertiser account or keyword search, for example **100**. You pay per ad saved, so this caps the cost of a run. Microsoft serves about 1,000 ads per advertiser and query at most; to read past that with **Read past the 1,000-ad limit country by country**, set this above 1,000 (at most 31,000: about 1,000 from the plain list and about 1,000 from each of the 30 EEA countries). Default: 100.",
            "default": 100
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Keep only ads shown in these countries of the European Economic Area, for example **DE** and **FR**. Leave empty for all EEA countries (the default). Microsoft publishes EEA ads only: a country outside the EEA sent through the API, such as US, is left out and the run log and summary say so.",
            "items": {
              "type": "string",
              "enum": [
                "AT",
                "BE",
                "BG",
                "HR",
                "CY",
                "CZ",
                "DK",
                "EE",
                "FI",
                "FR",
                "DE",
                "GR",
                "HU",
                "IS",
                "IE",
                "IT",
                "LV",
                "LI",
                "LT",
                "LU",
                "MT",
                "NL",
                "NO",
                "PL",
                "PT",
                "RO",
                "SK",
                "SI",
                "ES",
                "SE"
              ],
              "enumTitles": [
                "Austria",
                "Belgium",
                "Bulgaria",
                "Croatia",
                "Cyprus",
                "Czechia",
                "Denmark",
                "Estonia",
                "Finland",
                "France",
                "Germany",
                "Greece",
                "Hungary",
                "Iceland",
                "Ireland",
                "Italy",
                "Latvia",
                "Liechtenstein",
                "Lithuania",
                "Luxembourg",
                "Malta",
                "Netherlands",
                "Norway",
                "Poland",
                "Portugal",
                "Romania",
                "Slovakia",
                "Slovenia",
                "Spain",
                "Sweden"
              ]
            }
          },
          "keywords": {
            "title": "Keywords in ad text",
            "type": "array",
            "description": "Optional. With advertisers listed: one word or phrase, and only their ads whose text contains it are saved, for example **DJ**. With no advertisers: one search per keyword across all advertisers, for example **hotel** or **car insurance**, each up to your maximum. Matching is Microsoft's own.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Shown on or after",
            "type": "string",
            "description": "Optional start of a date window, for example **2026-10-01**. Microsoft applies the window and decides which ads match it. Microsoft's library records EEA impressions since June 2023. Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "Shown on or before",
            "type": "string",
            "description": "Optional end of a date window, for example **2026-10-31**. Microsoft applies the window and decides which ads match it; its data can be 1 to 3 days behind. Leave empty for no upper bound."
          },
          "includeDetails": {
            "title": "Include dates, impressions, countries, targeting and payer",
            "type": "boolean",
            "description": "Adds each ad's first and last shown dates, its impression range (such as **100K - 250K**), its share of impressions per EEA country, the targeting types the advertiser used and who paid. One extra lookup per ad, so runs with details are slower: allow about 20 seconds per Microsoft request before source response time and any slowdown; this is not a guaranteed quota. No extra charge. Default: off.",
            "default": false
          },
          "maxAdvertisersPerName": {
            "title": "Advertiser accounts per name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "A name such as **Booking.com B.V.** can match several advertiser accounts. This sets how many to read, starting with an exact name match; the others are listed in the run summary. Default: 1.",
            "default": 1
          },
          "splitByCountry": {
            "title": "Read past the 1,000-ad limit country by country",
            "type": "boolean",
            "description": "Microsoft serves at most about 1,000 ads per search. With this on, an advertiser or keyword whose list reaches that limit is read again country by country (Germany, France, Italy, Spain, the Netherlands, Poland, Sweden, Belgium, Austria, then the rest of the EEA), each country again up to about 1,000 ads. It stops at your maximum per advertiser or keyword, the run-wide maximum, your maximum charge and before the run timeout, and as soon as Microsoft asks the run to slow down or refuses it, keeping what was read. An ad found in several countries is saved and charged once. Slow: roughly 14 minutes of pacing per country read to its limit, without details, plus source response time and any slowdown. Off by default; no effect with a country filter, an advertiser summary or an only-new watch.",
            "default": false
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "ads",
              "advertisers"
            ],
            "type": "string",
            "description": "**Ads** (default) saves one row per ad. **Advertiser summary** saves one row per advertiser account you list instead, with its country, verified badge and the number of ads Microsoft states for it under your country, date and keyword filters, such as **77**; 1,000 means 1,000 or more, the most Microsoft counts. One lookup per advertiser, no ad rows. Each summary row is one row of the dataset, charged like an ad row.",
            "default": "ads"
          },
          "onlyNewAds": {
            "title": "Only ads not returned in earlier runs",
            "type": "boolean",
            "description": "For scheduled monitoring, for example a daily run on your competitors. The Actor records which ads it returned for each advertiser, with the countries and keyword you chose. With one run of a watch at a time, it returns and charges only ads it has not recorded as returned; ads it already returned or remembered are skipped and not charged. A watch run stops once it has returned your maximum; new ads it has not reached are returned by later runs. Two overlapping runs of the same watch can return an ad again. Works for the advertisers you list, not for a keyword search across all advertisers. Default: off.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Give each scheduled watch its own name, for example **travel-de**, so several watches in one account keep separate memories. Leave empty to identify the watch by advertiser, countries and keyword."
          },
          "firstRunBehaviour": {
            "title": "On a watch's first run",
            "enum": [
              "return_current",
              "remember_only"
            ],
            "type": "string",
            "description": "Applies with **Only ads not returned in earlier runs**. **Return current ads** returns each advertiser's current ads up to your maximum on the first run. **Only remember** returns nothing on the first run, so the next run starts from new ads only. In both cases every other ad Microsoft serves for the advertiser is remembered without charge and is never returned as new later.",
            "default": "return_current"
          },
          "notifyWebhookUrl": {
            "title": "Send an alert to Slack, Discord or a webhook",
            "type": "string",
            "description": "Optional. Paste a Slack or Discord incoming-webhook address, or any https:// address that accepts JSON. When the run saves ads, a short message is posted there: ads per advertiser, the first three headlines and a link to all rows. No extra charge."
          },
          "notifyWhenNothingFound": {
            "title": "Alert even when nothing was saved",
            "type": "boolean",
            "description": "Also post the alert when the run saved no ads, for example to confirm that a scheduled check ran. Off by default, so a quiet run sends nothing.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed: the Actor paces its requests by itself and slows down when Microsoft asks it to. Set a proxy only if you have a specific reason to. A run uses one address throughout."
          },
          "identityLookupLimit": {
            "title": "Advertiser country and verification lookups (keyword searches)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "For a keyword search without advertisers: how many different advertisers get their registered country and verified status filled in, for example **10**. Each one adds about 20 seconds before source response time and any slowdown; no extra charge. Advertisers beyond this number keep both fields empty. **0** turns this off. Searches by advertiser always include them. Default: 10.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}