# Microsoft Ads Library Scraper (Bing Ads) (`weirworks/microsoft-ads-library`) Actor

Get Microsoft Advertising (Bing) ads from the official Ad Library: ad copy, landing pages, advertisers, run dates, EU impression ranges, country share and targeting. Search by keyword, advertiser or domain.

- **URL**: https://apify.com/weirworks/microsoft-ads-library.md
- **Developed by:** [Weirworks](https://apify.com/weirworks) (community)
- **Categories:** SEO tools, Lead generation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Microsoft Ads Library Scraper (Bing Ads)

Get ads from the official **Microsoft Advertising Ad Library**, which covers ads served on Bing and the Microsoft network. Search by keyword in the ad copy, by advertiser name or ID, or by **landing-page domain**, and get clean ad copy, landing pages and advertiser details. Add run dates, impression ranges, impressions by country and targeting types for each ad.

Useful for competitor research, PPC ad-copy inspiration, agency audits, brand-protection checks (who is bidding on your brand?) and DSA transparency research. It pairs with our [Google Ads Transparency Scraper](https://apify.com/weirworks/google-ads-transparency) for a fuller view of a brand's search ads.

### Features

- **Search four ways:** keywords in the ad copy, advertiser names (matched to Ad Library accounts), advertiser IDs, or landing-page domains (`nike.com` returns ads that link to nike.com).
- **Ad copy:** title, description, display URL, destination URL and landing domain.
- **Optional details:** first and last date shown, EU impression range (e.g. `25K - 50K`), impression share by country, targeting types used (location, age, gender, audiences) and paid-for-by.
- **Filters:** EU/EEA countries and date range.
- **Monitoring mode:** returns only ads not seen in earlier runs.
- **Official public API:** no login, no proxy, nothing to break. Rate limits are handled automatically.

### New: promotion detection

Every ad with copy now includes a `promo` object, at no extra cost:

- `hasPromo`
- `discountPercentMax`, `discountAmountsUsd`
- `promoCodes`
- `saleEvents` (Black Friday, Cyber Monday, holiday...)
- `offers` (free shipping, BOGO)
- `urgency`, `deadlineText`

To track only competitors' promotions across Google and Microsoft, see [Black Friday & Holiday Promo Ad Tracker](https://apify.com/weirworks/holiday-promo-ad-tracker).

### Coverage

Microsoft's Ad Library contains **ads served in the EU and EEA** (since June 2023). That's what the EU Digital Services Act requires it to publish. US-only ads aren't included.

### Input

```json
{
  "searchTerms": ["running shoes"],
  "advertiserNames": ["Booking.com"],
  "domains": ["nike.com"],
  "maxAdsPerQuery": 100,
  "countries": ["DE", "FR"],
  "includeDetails": true
}
```

### Output

```json
{
  "adId": 72705682512059,
  "advertiserId": 4295008207,
  "advertiserName": "Bergfreunde GmbH",
  "title": "Buy Running shoes - Campz.ie Online Shop - Top Running shoes",
  "description": "Shop Running shoes online - the best selection at Campz.ie...",
  "displayUrl": "www.campz.ie/Running_shoes/Shop",
  "destinationUrl": "https://www.campz.ie/running-shoes/?pid=10004",
  "landingDomain": "campz.ie",
  "query": "running shoes",
  "startDate": "2026-07-21",
  "endDate": "2026-10-01",
  "impressionsRange": "25K - 50K",
  "impressionsByCountry": {"Ireland": "99.4%", "Spain": "0.1%"},
  "targeting": [{"type": "Location", "usedForExclusion": true}],
  "scrapedAt": "2026-10-03T05:00:00Z"
}
```

### Speed

- **Listing:** about 1–2 ads per second per query, because Microsoft rate-limits the public API.
- **Details:** one extra lookup per ad, so about 2 seconds per ad. Turn details off for big pulls.

### Pricing

- **$1.00 per 1,000 ads**
- **+$2.00 per 1,000 ads** with details turned on

No start fee. You can set a maximum cost per run.

Questions or requests: open an issue or email **hello@weirworks.com**.

*Independent tool by weirworks. Not affiliated with Microsoft.*

# Actor input Schema

## `searchTerms` (type: `array`):

Find ads whose title, description or display URL contains these words, e.g. <code>hotel</code>, <code>crm software</code>.

## `advertiserNames` (type: `array`):

Brand or company names, e.g. <code>Booking.com</code>. Matched to advertiser accounts in the library.

## `domains` (type: `array`):

Ads that link to these domains, e.g. <code>nike.com</code>.

## `advertiserIds` (type: `array`):

Microsoft Ad Library advertiser IDs.

## `maxAdvertisersPerName` (type: `integer`):

Brands often have several accounts (per country or agency).

## `maxAdsPerQuery` (type: `integer`):

Upper limit for each keyword, name, domain or ID.

## `countries` (type: `array`):

Two-letter codes, e.g. <code>DE</code>, <code>FR</code>. The library covers EU and EEA countries only.

## `startDate` (type: `string`):

Only ads shown on or after this date.

## `endDate` (type: `string`):

Only ads shown on or before this date.

## `includeDetails` (type: `boolean`):

First and last shown dates, EU impression range, impression share by country, targeting types used and paid-for-by. One extra lookup per ad, charged separately.

## `onlyNewAds` (type: `boolean`):

Return only ads not returned by earlier runs with the same input.

## `proxyConfiguration` (type: `object`):

Not needed: this is Microsoft's official public API.

## Actor input object example

```json
{
  "searchTerms": [
    "running shoes"
  ],
  "maxAdvertisersPerName": 3,
  "maxAdsPerQuery": 100,
  "includeDetails": false,
  "onlyNewAds": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

The dataset rows.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "running shoes"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("weirworks/microsoft-ads-library").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["running shoes"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("weirworks/microsoft-ads-library").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "running shoes"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call weirworks/microsoft-ads-library --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,weirworks/microsoft-ads-library"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/d0uAwUKPWtbTxHo2D/builds/rTrRPELcq0qmplLnS/openapi.json
