# Google Ads Scraper (`ayen-data/google-ads-scraper`) Actor

Scrape advertiser data, ad creatives, impressions, audience targeting, and ad media from the Google Ads Transparency Center.

- **URL**: https://apify.com/ayen-data/google-ads-scraper.md
- **Developed by:** [Ayen Data](https://apify.com/ayen-data) (community)
- **Categories:** Developer tools, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Google Ads Transparency Center Scraper

Scrape advertiser data, ad creatives, impressions, audience targeting, and ad media from the [Google Ads Transparency Center](https://adstransparency.google.com/). This Apify actor turns Google's public ad disclosures into clean, structured JSON — perfect for competitive intelligence, brand monitoring, ad spend research, and political ad transparency analysis.

---

### Key Features

- Scrape ads by **advertiser ID**, **creative ID**, or **domain**
- Filter by **region**, **platform** (YouTube, Search, Display, Maps, Shopping, Play), **format** (Image, Video, Text), and **date range**
- Extract **audience targeting signals** (demographic, geographic, contextual, topics, customer lists)
- Retrieve **impression ranges** per country and platform
- Collect **ad creatives**: preview URLs, headlines, body text, images, and video links
- Optional: **download media** (images and videos) into the Key-Value Store
- Optional: use **cookies** to access age-restricted ad creatives
- Optional: **write every ad straight into a Notion database** — readable by AI agents via Notion's MCP server
- Optional: **append every ad as a new record in an Airtable base** — duplicate a ready-made template in one click

---

### Why Use This Actor

- ✅ Audit competitor ad creatives, copy, and creative trends at scale
- ✅ Monitor brand impersonation, affiliate ads, and reseller activity
- ✅ Build datasets for **political ad transparency**, market research, and academic studies
- ✅ Track ad longevity (first shown / last shown) and reach by geography
- ✅ Skip the manual click-through — get structured JSON ready for BI tools 

---

### Input

The actor accepts the following input parameters:

| Field                  | Type    | Description                                                                                                            | Required |
| ---------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- | -------- |
| `startUrls`            | array   | List of Google Ads Transparency Center URLs (advertiser search, creative detail, or domain search).                    | ✅       |
| `cookies`              | array   | Optional cookies (JSON) for accessing age-restricted creatives.                                                        | ❌       |
| `maxItems`             | integer | Maximum number of creatives to scrape per advertiser search URL.                                                       | ❌       |
| `proxyConfiguration`   | object  | Apify proxy configuration. Defaults to no proxy.                                                                       | ❌       |
| `downloadMedia`        | boolean | If `true`, downloads previews and variant media into the Key-Value Store and adds storage keys to the output items.    | ❌       |
| `notionConnector`      | string  | Apify MCP Connector authorized to Notion. Every scraped ad becomes a page in the chosen database. See [Notion Output](#-notion-output-optional). | ❌       |
| `notionDatabaseId`     | string  | Target Notion database ID. Required when `notionConnector` is set.                                                      | ❌       |
| `airtableConnector`    | string  | Apify MCP Connector authorized to Airtable. Every scraped ad becomes a record in the chosen table. See [Airtable Output](#-airtable-output-optional). | ❌       |
| `airtableBaseId`       | string  | Target Airtable base ID (starts with `app…`). Required when `airtableConnector` is set.                                 | ❌       |
| `airtableTableId`      | string  | Target Airtable table ID (starts with `tbl…`). Required when `airtableConnector` is set.                                | ❌       |

#### Supported Start URL Formats

- **Advertiser search:** `https://adstransparency.google.com/advertiser/<advertiserId>?region=<region>`
- **Creative detail:** `https://adstransparency.google.com/advertiser/<advertiserId>/creative/<creativeId>?region=<region>`
- **Domain search:** `https://adstransparency.google.com/?region=anywhere&domain=<domain>`

Optional URL query parameters: `region`, `platform`, `format`, `topic`, `start-date`, `end-date`.

#### Example Input

```json
{
  "startUrls": [
    {
      "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
    },
    {
      "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321/creative/CR11104657906815991809?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
    },
    {
      "url": "https://adstransparency.google.com/?region=anywhere&domain=binance.com"
    }
  ],
  "maxItems": 500,
  "downloadMedia": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

***

### Output

Each ad creative is pushed as a single item to the dataset. Example:

```json
  {
    "id": "CR01003845904182018049",
    "adId": "CR01003845904182018049",
    "advertiserId": "AR16735076323512287233",
    "advertiserName": "Nike, Inc.",
    "url": "https://adstransparency.google.com/advertiser/AR16735076323512287233/creative/CR01003845904182018049?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE",
    "sourceUrl": "https://adstransparency.google.com/advertiser/AR16735076323512287233?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE",
    "mediaType": "IMAGE",
    "thumbnail": {
      "url": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?client=ads-integrity-transparency&obfuscatedCustomerId=1472908606&creativeId=467086381842&uiFeatures=12,54&adGroupId=106856862702&itemIds=4478839147005791752&sig=ACiVB_yR2Lkf_akJ84NtyNnL-6xfLCUxbQ&htmlParentId=fletch-render-17824009664593302713&responseCallback=fletchCallback17824009664593302713",
      "key": null
    },
    "firstShownAt": "20211025",
    "lastShownAt": "20240602",
    "daysActive": 952,
    "impressionsRange": "4000",
    "regions": [
      "Finland",
      "Canada",
      "Portugal",
      "Mexico",
      "Poland",
      "Netherlands",
      "Puerto Rico",
      "Belgium",
      "Brazil",
      "United States",
      "Spain",
      "France",
      "Sweden",
      "Indonesia"
    ],
    "regionBreakdown": [
      {
        "code": "FI",
        "name": "Finland",
        "firstShownAt": "2025-09-19T00:00:00.000Z",
        "lastShownAt": "2023-12-30T00:00:00.000Z",
        "impressions": {
          "lowerBound": null,
          "upperBound": "1000"
        },
        "platformStats": [
          {
            "name": "Google Shopping",
            "code": "SHOPPING",
            "impressions": {
              "lowerBound": null,
              "upperBound": "1000"
            }
          }
        ]
      },
      {
        "code": "CA",
        "name": "Canada",
        "firstShownAt": "2025-09-19T00:00:00.000Z",
        "lastShownAt": "2025-10-20T00:00:00.000Z",
        "impressions": {
          "lowerBound": null,
          "upperBound": null
        },
        "platformStats": []
      },
      {
        "code": "PT",
        "name": "Portugal",
        "firstShownAt": "2025-09-19T00:00:00.000Z",
        "lastShownAt": "2024-07-26T00:00:00.000Z",
        "impressions": {
          "lowerBound": null,
          "upperBound": "1000"
        },
        "platformStats": [
          {
            "name": "Google Shopping",
            "code": "SHOPPING",
            "impressions": {
              "lowerBound": null,
              "upperBound": "1000"
            }
          }
        ]
      },
      {
        "code": "MX",
        "name": "Mexico",
        "firstShownAt": "2025-09-19T00:00:00.000Z",
        "lastShownAt": "2026-03-03T00:00:00.000Z",
        "impressions": {
          "lowerBound": null,
          "upperBound": null
        },
        "platformStats": []
      },
      {
        "code": "PL",
        "name": "Poland",
        "firstShownAt": "2025-09-19T00:00:00.000Z",
        "lastShownAt": "2024-08-05T00:00:00.000Z",
        "impressions": {
          "lowerBound": null,
          "upperBound": "1000"
        },
        "platformStats": [
          {
            "name": "Google Shopping",
            "code": "SHOPPING",
            "impressions": {
              "lowerBound": null,
              "upperBound": "1000"
            }
          }
        ]
      }
    ],
    "targeting": [
      {
        "name": "Demographic info",
        "hasIncludedCriteria": true,
        "hasExcludedCriteria": false
      },
      {
        "name": "Geographic locations",
        "hasIncludedCriteria": true,
        "hasExcludedCriteria": false
      },
      {
        "name": "Contextual signals",
        "hasIncludedCriteria": false,
        "hasExcludedCriteria": false
      }
    ],
    "variants": [
      {
        "textContent": "Paris Saint-Germain 2025/26 Stadium Home Nike Men's Dri-FIT Soccer Replica Jersey in Blue -  Size: Large | HJ4593-411 - Nike",
        "images": [
          "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcT_YTifrzufiJAek1ZcSPHYvrAnnJnY3NSiFOOkd0ZHJxWO5Kkx"
        ]
      },
      {
        "textContent": "",
        "images": []
      },
      {
        "textContent": "",
        "images": []
      }
    ],
  }
```

When `downloadMedia` is enabled, `thumbnail.key` and `variants[].imageStoreKeys` will contain Key-Value Store keys pointing at the downloaded files.

***

### Using Cookies (Optional)

Some ad creatives — for example age-restricted content — are only visible to logged-in users. To scrape these:

1. Install the [Cookie-Editor](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) browser extension for Chrome or any Chromium-based browser.
2. Navigate to the [Google Ads Transparency Center](https://adstransparency.google.com) and make sure you are signed into your Google account.
3. Open the Cookie-Editor extension from your browser toolbar and click **Export → JSON** to copy the cookies to your clipboard.
4. Paste the copied JSON array directly into the `cookies` input field in the actor configuration.

[Watch How to export Cookies using Cookie Editor on Youtube](https://youtu.be/LK7EnP6YFPA)

***

### Notion Output (Optional)

Push every scraped ad creative into a Notion database as a new, fully-formed page — perfect for building a living competitor catalog, a research log your team actually opens, or a knowledge base your AI agents can query later (more on that below).

**Step-by-step setup guide:** [`Notion-connector-setup`](https://noble-water-eac.notion.site/Connect-Notion-to-the-Google-Ads-Scraper-3735e4da0b9680fa93afe0d3c907240e?pvs=73)

#### Turn it into an AI knowledge base

Notion's MCP server is **bidirectional** — the same workspace this actor writes to can be **read** by any AI agent that also connects to Notion via MCP (Claude Desktop, ChatGPT with the Notion connector, custom Anthropic API agents, etc.). That means once your scrape is running on a schedule, you can:

- Ask Claude: *"Which advertisers ran the most YouTube ads in Germany last week?"*
- Ask ChatGPT: *"Summarize the messaging trends across all video ads we've collected this month."*
- Have an agent triage: *"Tag any new ad mentioning crypto for compliance review."*

Your scraper becomes the data pipeline; Notion becomes the queryable memory; the AI becomes the analyst.

Notion writes are best-effort — if a page fails to create, the scrape keeps running and the issue is recorded in the run log so you can fix and re-run only the missing items.

***

### Airtable Output (Optional)

Push every scraped ad creative as a new record in an Airtable base — perfect for tracking competitor ads in a spreadsheet-style view with native filtering, grouping, and team sharing.

> **One-click base template:** [Duplicate this Airtable base into your workspace](https://airtable.com/appr7WMd1eNnFvUxi/shr5Pf1KkLcnJApIj/tbl3JipnEyUciX6NT/viwVlcTH5JxZMsMbW) — already wired with all the columns the actor populates.
>
> **Step-by-step setup guide:** [`Airtable-connector-setup`](https://noble-water-eac.notion.site/Connect-Airtable-to-the-Google-Ads-Scraper-3735e4da0b968034a333f388c6c07c9a?pvs=73)

#### How to enable

1. In your Apify account, open **Settings → API & Integrations** and connect Airtable.
2. In Airtable, open the base and table you want to use:
   - The **Base ID** starts with `app...` — it's the second path segment of the URL.
   - The **Table ID** starts with `tbl...` — it's the third path segment.
3. In this actor's input, select your connection under **Airtable Connector** and enter the IDs under **Airtable Base ID** and **Airtable Table ID**.
4. Run the actor — each ad creative becomes a new record with these fields:

   - **Name** — `<Advertiser> — <MediaType> (<AdId>)`
   - **Advertiser**, **Advertiser ID**, **Ad ID**, **Media Type**
   - **Regions**, **Impressions Range**, **First Shown**, **Last Shown**, **Days Active**
   - **Ad URL**, **Source URL**

   If your table doesn't yet have these columns, Airtable will skip the unknown ones. Add columns with these exact names to capture all data.

Records are written in batches at the end of the run, and the run log reports how many were saved vs. failed.

***

### Frequently Asked Questions (FAQ)

##### Where do I find an advertiser ID?

Open any advertiser page on [adstransparency.google.com](https://adstransparency.google.com/) — the URL contains it, e.g. `…/advertiser/AR10303883279069085697`. The string starting with `AR` is the advertiser ID.

##### Where do I find a creative ID?

Click into a specific ad creative on the transparency site — the URL becomes `…/advertiser/<advertiserId>/creative/<creativeId>`. The string starting with `CR` is the creative ID.

##### How do I scrape all ads from a brand or website?

Use the domain search URL format: `https://adstransparency.google.com/?region=anywhere&domain=<your-domain.com>`. This returns advertisers running ads for that domain across regions.

##### Why do some ads return no results or fail with "restricted"?

Certain creatives (for example age-restricted content) are only visible to signed-in users. Provide cookies via the `cookies` input to scrape them. See the [Using Cookies](#-using-cookies-optional) section above.

##### Why are impressions returned as ranges instead of exact numbers?

Google only publishes impression buckets (e.g. 9,000–10,000). The actor returns the upper bound on the top-level `impressionsRange` field, and the per-region lower/upper bounds inside `regionBreakdown[].impressions` — exact impression counts are not available from the source.

##### Do I need a proxy?

No, the actor works without proxies by default. If you experience rate limiting or want to scrape region-specific data from a particular country, enable Apify Proxy in the input.

##### Can I download the ad images and videos?

Yes — set `downloadMedia` to `true`. Thumbnails and variant media are saved to the run's Key-Value Store, and the storage keys are added to each output item under `thumbnail.key` and `variants[].imageStoreKeys`.

##### How many ads can I scrape per run?

Use `maxItems` to cap the number of creatives returned per advertiser search URL. There is no hard upper limit — the actor paginates until the limit or the end of results is reached.

##### Does `maxItems` apply globally or per URL?

Per **start URL**. If you pass three advertiser search URLs with `maxItems: 50`, you can get up to 150 creatives in total.

##### Can I filter by platform, format, or date range?

Yes — add query parameters directly to your start URL: `region`, `platform` (`YOUTUBE`, `SEARCH`, `DISPLAY`, `MAPS`, `SHOPPING`, `PLAY`), `format` (`IMAGE`, `VIDEO`, `TEXT`), `topic`, `start-date`, `end-date`.

##### Can I send the scraped ads directly into Notion?

Yes. Connect Notion in your Apify account settings, pick a database, and set `notionConnector` and `notionDatabaseId` in the input. Every scraped ad becomes a new page in that database. See [Notion Output](#-notion-output-optional) above for the full column contract and AI-agent integration tips.

##### Can my AI agent (Claude / ChatGPT) read the Notion database I'm filling?

Yes — Notion's MCP server exposes read tools (`notion-search`, `notion-fetch`) alongside the write tools this actor uses. Connect Claude Desktop or ChatGPT to the same Notion workspace via its MCP integration, and your agent can query your collected ad data in natural language. The scraper feeds the knowledge base; the agent does the analysis.

##### Can I push the ads into Airtable?

Yes. Duplicate the [pre-built Airtable base template](https://airtable.com/appr7WMd1eNnFvUxi/shr5Pf1KkLcnJApIj/tbl3JipnEyUciX6NT/viwVlcTH5JxZMsMbW), connect Airtable in your Apify account settings, then set `airtableConnector`, `airtableBaseId`, and `airtableTableId` in the input. Each ad creative is appended as a new record in the chosen table. See [Airtable Output](#-airtable-output-optional) above.

***

**Legal Notice**

This actor is an independent tool for collecting publicly available data from the Google Ads Transparency Center. It is not affiliated with, endorsed by, or in any way officially connected with Google LLC or its affiliates.

# Actor input Schema

## `startUrls` (type: `array`):

List of Google Ads Transparency Center URLs to scrape. Supported formats:

- Advertiser search: `https://adstransparency.google.com/advertiser/<advertiserId>?region=<region>`
- Creative detail: `https://adstransparency.google.com/advertiser/<advertiserId>/creative/<creativeId>?region=<region>`
- Domain search: `https://adstransparency.google.com/?region=anywhere&domain=<domain>`

## `maxItems` (type: `integer`):

Maximum number of ad creatives to scrape per advertiser search URL. Detail URLs always return a single item.

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

Proxy configuration. Defaults to no proxy. Enable Apify Proxy if you experience rate limiting or geo-restrictions.

## `cookies` (type: `array`):

Provide cookies to access additional data such as age-restricted ad creatives.

1. Install the Cookie-Editor Chrome extension.
2. Open https://adstransparency.google.com and log in to your Google account.
3. Open Cookie-Editor and export cookies as JSON.
4. Paste the exported JSON here.

## `notionConnector` (type: `string`):

Optional Notion connection. When set, every scraped ad creative is added as a new page in the selected Notion database.

## `notionDatabaseId` (type: `string`):

ID of the Notion database that will receive the new pages. The database must have a title property named `Name`. Required when a Notion Connector is selected.

## `airtableConnector` (type: `string`):

Optional Airtable connection. When set, every scraped ad creative is appended as a new record in the selected Airtable table.

## `airtableBaseId` (type: `string`):

ID of the target Airtable base (starts with `app...`). Open the base in Airtable — the ID is the second path segment of the URL. Required when an Airtable Connector is selected.

## `airtableTableId` (type: `string`):

ID of the target Airtable table (starts with `tbl...`). Open the table in Airtable — the ID is the third path segment of the URL. Required when an Airtable Connector is selected.

## `downloadMedia` (type: `boolean`):

If enabled, the actor downloads preview images and variant media (images/videos) into the Key-Value Store and adds the storage keys to the output.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
    },
    {
      "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321/creative/CR11104657906815991809?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
    },
    {
      "url": "https://adstransparency.google.com/?region=anywhere&domain=binance.com"
    }
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "cookies": [],
  "downloadMedia": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
        },
        {
            "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321/creative/CR11104657906815991809?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
        },
        {
            "url": "https://adstransparency.google.com/?region=anywhere&domain=binance.com"
        }
    ],
    "cookies": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("ayen-data/google-ads-scraper").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 = {
    "startUrls": [
        { "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE" },
        { "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321/creative/CR11104657906815991809?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE" },
        { "url": "https://adstransparency.google.com/?region=anywhere&domain=binance.com" },
    ],
    "cookies": [],
}

# Run the Actor and wait for it to finish
run = client.actor("ayen-data/google-ads-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
    },
    {
      "url": "https://adstransparency.google.com/advertiser/AR10852394170916536321/creative/CR11104657906815991809?region=anywhere&platform=YOUTUBE&start-date=2022-01-01&end-date=2024-12-31&format=IMAGE"
    },
    {
      "url": "https://adstransparency.google.com/?region=anywhere&domain=binance.com"
    }
  ],
  "cookies": []
}' |
apify call ayen-data/google-ads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ayen-data/google-ads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Ads Scraper",
        "description": "Scrape advertiser data, ad creatives, impressions, audience targeting, and ad media from the Google Ads Transparency Center.",
        "version": "1.0",
        "x-build-id": "Zu5A3vjevOOwJV08M"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ayen-data~google-ads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ayen-data-google-ads-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/ayen-data~google-ads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-ayen-data-google-ads-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/ayen-data~google-ads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-ayen-data-google-ads-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": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "List of Google Ads Transparency Center URLs to scrape. Supported formats:\n\n- Advertiser search: `https://adstransparency.google.com/advertiser/<advertiserId>?region=<region>`\n- Creative detail: `https://adstransparency.google.com/advertiser/<advertiserId>/creative/<creativeId>?region=<region>`\n- Domain search: `https://adstransparency.google.com/?region=anywhere&domain=<domain>`",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Max items per start URL",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of ad creatives to scrape per advertiser search URL. Detail URLs always return a single item.",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy configuration. Defaults to no proxy. Enable Apify Proxy if you experience rate limiting or geo-restrictions.",
                        "default": {
                            "useApifyProxy": false
                        }
                    },
                    "cookies": {
                        "title": "Cookies (optional)",
                        "type": "array",
                        "description": "Provide cookies to access additional data such as age-restricted ad creatives.\n\n1. Install the Cookie-Editor Chrome extension.\n2. Open https://adstransparency.google.com and log in to your Google account.\n3. Open Cookie-Editor and export cookies as JSON.\n4. Paste the exported JSON here.",
                        "default": []
                    },
                    "notionConnector": {
                        "title": "Notion Connector (optional)",
                        "type": "string",
                        "description": "Optional Notion connection. When set, every scraped ad creative is added as a new page in the selected Notion database."
                    },
                    "notionDatabaseId": {
                        "title": "Notion Database ID",
                        "type": "string",
                        "description": "ID of the Notion database that will receive the new pages. The database must have a title property named `Name`. Required when a Notion Connector is selected."
                    },
                    "airtableConnector": {
                        "title": "Airtable Connector (optional)",
                        "type": "string",
                        "description": "Optional Airtable connection. When set, every scraped ad creative is appended as a new record in the selected Airtable table."
                    },
                    "airtableBaseId": {
                        "title": "Airtable Base ID",
                        "type": "string",
                        "description": "ID of the target Airtable base (starts with `app...`). Open the base in Airtable — the ID is the second path segment of the URL. Required when an Airtable Connector is selected."
                    },
                    "airtableTableId": {
                        "title": "Airtable Table ID",
                        "type": "string",
                        "description": "ID of the target Airtable table (starts with `tbl...`). Open the table in Airtable — the ID is the third path segment of the URL. Required when an Airtable Connector is selected."
                    },
                    "downloadMedia": {
                        "title": "Save Ad media items to Key-Value-Store",
                        "type": "boolean",
                        "description": "If enabled, the actor downloads preview images and variant media (images/videos) into the Key-Value Store and adds the storage keys to the output.",
                        "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
