# Google Ads Transparency Scraper (`rjmacarthy/google-ads-transparency-scraper`) Actor

Scrape ads from the Google Ads Transparency Center by advertiser domain, ID or name: format, first/last shown dates, regions, preview, ad copy, images, YouTube links and political ad spend. Filter by region, date, format and platform; monitor only new ads. No login or browser.

- **URL**: https://apify.com/rjmacarthy/google-ads-transparency-scraper.md
- **Developed by:** [rj](https://apify.com/rjmacarthy) (community)
- **Categories:** SEO tools, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 ad scrapeds

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

## Google Ads Transparency Scraper: Extract Competitor Ads from the Google Ads Transparency Center

**Google Ads Transparency Scraper** collects the ads any advertiser runs on Google Search, YouTube, Shopping, Maps, Play and the Display network, as published in the **[Google Ads Transparency Center](https://adstransparency.google.com/)**. Search by **advertiser domain** (e.g. `nike.com`), **advertiser ID** or **advertiser name**. You get one clean record per ad: advertiser, format, first and last shown dates, regions, preview, ad copy and images where available, landing domain and a link to the ad.

It reads the same JSON data that the Transparency Center website loads, so there is **no login and no browser**. You **only pay for the ads you get**, and the optional details cost extra only when you turn them on.

Typical uses: competitor ad research, tracking when a brand launches new creatives, collecting ad copy and YouTube ads for a market, and monitoring political ad spend.

### What can this Google Ads Transparency scraper do?

- **Search three ways.** By domain (every advertiser account whose ads point to `nike.com`), by advertiser ID (`AR16735076323512287233`) or by advertiser name (resolved to an ID through Google's own search suggestions).
- **Filter on Google's side.** Region (any of 244 countries and territories, or anywhere), date range, ad format (text, image, video) and platform (Search, YouTube, Shopping, Maps, Play). You only pay for ads that match.
- **Get the dates and a preview of every ad.** First shown, last shown and number of days shown, plus Google's preview: an archived image or the preview script that renders the ad.
- **Ad details (optional).** All regions where the ad ran with per-region first and last shown dates, impression ranges for EU countries, who paid for the ad, which targeting types were used, ad headline and text, image URLs, YouTube link and the advertiser's country.
- **Political ads.** Search Google's political ads report for a region and get spend and impression ranges for every political ad, or list all political ads in a country.
- **Incremental monitoring.** Turn on **Only new ads** and schedule the Actor. Each run outputs, and charges for, only ads that weren't seen before.
- **Built to be polite and to fail clearly.** Requests are sent one at a time with a pause between them. If Google rate-limits or CAPTCHA-checks the IP, the run stops with a message that says so, instead of crashing or returning an empty dataset without explanation.
- **Pay per ad.** No subscription. Details are a separate, optional charge.

### What you get per ad

| | Without details | With details |
|---|---|---|
| Advertiser ID and name, creative ID | Yes | Yes |
| Format, first shown, last shown, days shown | Yes | Yes |
| Preview URL (archived image or preview script) | Yes | Yes |
| Link to the ad on adstransparency.google.com | Yes | Yes |
| Landing domain | For domain searches and some ads | More often (from the ad's display URL) |
| YouTube link | For some video ads | For most video ads |
| Headline and ad text | Rarely | For many text and Shopping ads |
| Image URLs | For archived image ads | Also Shopping and YouTube thumbnails |
| Regions where the ad ran | Only the region you searched | Full list, with first/last shown per region |
| Impressions per region | No | EU countries (Google publishes these under the DSA) |
| Paid by, targeting types, advertiser country | No | Yes |
| Spend and impressions | Political ads | Political ads |

Google decides what it publishes for each ad, so some fields stay empty for some ads. Empty fields are `null`, never guessed.

### How to find an advertiser's domain or ID

1. Open [adstransparency.google.com](https://adstransparency.google.com/) and type the brand or website in the search box.
2. Pick the advertiser. The address bar then shows a URL like `https://adstransparency.google.com/advertiser/AR16735076323512287233?region=GB`. The part starting with `AR` is the advertiser ID. You can paste the whole URL into **Advertiser IDs**.
3. Or just use the brand's website domain, such as `nike.com`. Domain search returns every advertiser account whose ads point to that domain, which for big brands means several accounts (one per country, plus agencies and resellers).

### How to scrape the Google Ads Transparency Center

1. Click **Try for free** or **Start**.
2. Enter one or more **advertiser domains**, **advertiser IDs** or **advertiser names**.
3. Optionally choose a region, a date range, a format, a platform and a limit per advertiser. Turn on **Fetch ad details** if you need regions, ad copy and payer information.
4. Click **Start**. Then download the ads as JSON, CSV, Excel or HTML, or get them through the API.

### Input example

```json
{
    "domains": ["nike.com"],
    "advertiserIds": ["AR16735076323512287233"],
    "advertiserNames": ["Nike, Inc."],
    "region": "GB",
    "dateFrom": "2026-10-01",
    "dateTo": "2026-11-02",
    "adFormat": "video",
    "platform": "youtube",
    "maxAdsPerAdvertiser": 100,
    "fetchDetails": false,
    "politicalAdsOnly": false,
    "onlyNewAds": false
}
```

| Field | Description |
|---|---|
| `domains` | Advertiser websites, e.g. `nike.com`. URLs are reduced to the domain. |
| `advertiserIds` | Advertiser IDs (`AR...`) or advertiser page URLs. |
| `advertiserNames` | Advertiser names. Each is resolved to the exact-name match with the most ads, otherwise the closest match with the most ads. The log and `RUN_SUMMARY` list the other candidates with their IDs. |
| `region` | 2-letter country code such as `GB`, `US` or `DE`, or `anywhere` (default). |
| `dateFrom`, `dateTo` | Only ads shown at some point in this range. `YYYY-MM-DD` or a relative value such as `30 days`. |
| `adFormat` | `all` (default), `text`, `image` or `video`. |
| `platform` | `all` (default), `search`, `youtube`, `shopping`, `maps` or `play`. |
| `maxAdsPerAdvertiser` | Limit per domain, ID or name you entered, most recently shown ads first. `0` = no limit. Default `100`. |
| `fetchDetails` | Fetch each ad's details and preview (default `false`). Charged per ad as a separate event. |
| `politicalAdsOnly` | Search the political ads report. Needs a region. With no domains, IDs or names, returns all political ads in the region. |
| `onlyNewAds` | Incremental mode: only output ads not seen in previous runs. |
| `stateKey` | Name of the monitor. Separate monitors keep separate memories. |
| `proxyConfiguration` | Apify datacenter proxy, on by default. Google blocks Apify's servers when they connect directly. See [Troubleshooting](#troubleshooting). |
| `requestDelayMs` | Pause between requests to Google, default `1000` ms. |

If the same ad is found by two of your searches (for example by domain and by advertiser ID), it is output and charged only once.

### Output example

Every ad is one dataset item. This one was fetched with details on. It is shortened: the real item lists 33 regions, and `regionStats` has one entry per region.

```json
{
    "advertiserId": "AR16735076323512287233",
    "advertiserName": "Nike, Inc.",
    "creativeId": "CR01003845904182018049",
    "format": "image",
    "firstShown": "2021-10-25T07:00:00.000Z",
    "lastShown": "2026-11-01T15:42:10.000Z",
    "daysShown": 1834,
    "regions": ["VN", "IN", "KR", "SE", "ES", "IE", "FR", "US", "DE", "GB", "JP"],
    "previewUrl": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?client=ads-integrity-transparency&...",
    "imageUrls": ["https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcTloVQt6GPLNB8OEvQHHH8czmffelSozIop0ozpJv0GWQ4OWe-x"],
    "videoUrl": null,
    "headline": "FC Barcelona 2026/27 Stadium Home Nike Men's Dri-FIT Soccer Replica Jersey in Red, Size: Large | II1872-683",
    "adText": null,
    "landingDomain": null,
    "landingUrl": null,
    "adUrl": "https://adstransparency.google.com/advertiser/AR16735076323512287233/creative/CR01003845904182018049?region=GB",
    "advertiserUrl": "https://adstransparency.google.com/advertiser/AR16735076323512287233?region=GB",
    "isPolitical": false,
    "impressionsMin": null,
    "impressionsMax": null,
    "spendMin": null,
    "spendMax": null,
    "spendCurrency": null,
    "regionStats": [
        { "region": "SE", "regionName": "Sweden", "firstShown": "2023-04-26", "lastShown": "2024-08-22", "impressionsMin": 0, "impressionsMax": 1000, "platforms": [{ "platform": "shopping", "impressionsMin": 0, "impressionsMax": 1000 }] }
    ],
    "eeaImpressionsMin": 3000,
    "eeaImpressionsMax": 4000,
    "targeting": {
        "demographics": { "included": true, "excluded": false },
        "location": { "included": true, "excluded": false },
        "contextualSignals": { "included": false, "excluded": false }
    },
    "paidBy": "Nike, Inc.",
    "category": "Clothing & Accessories",
    "containsSyntheticMedia": null,
    "advertiserCountry": "US",
    "advertiserVerified": true,
    "detailsFetched": true,
    "detailsError": null,
    "searchType": "advertiserId",
    "searchValue": "AR16735076323512287233",
    "searchRegion": "GB",
    "matchedDomain": null,
    "scrapedAt": "2026-11-02T11:13:51.555Z"
}
```

More real examples, including political ads and video ads, are in [`samples/sample-output.json`](samples/sample-output.json).

Notes on the fields:

- `creativeId` is stable across runs. Use it to de-duplicate.
- `format` is Google's own label. Shopping product ads are labelled `image`. Text ads are often archived as an image of the rendered ad: then `previewUrl` is that image and `imageUrls` stays empty, because the image shows text rather than an image asset.
- `regions` without details only repeats the region you searched (or the political region). The full list needs details.
- `impressionsMin` of `0` means "under `impressionsMax`". `impressionsMax` of `null` with a value in `impressionsMin` means open-ended, for example "10M+".
- `advertiserName` is the name Google discloses for that account, so one brand can appear under several names (`Nike, Inc.`, `Nike Retail BV`, ...).
- `headline` and `adText` may contain keyword-insertion placeholders exactly as Google stores them, for example `{KeyWord:Nike Shoes}`.

A `RUN_SUMMARY` record in the run's key-value store lists, for every search: status, ads output, ads listed, ads skipped (already seen or duplicate), how many ads Google says match (exact or a range such as `50000-60000`), how a name was resolved and the other candidates, request counts and errors.

### How much does it cost to scrape Google Ads Transparency data?

This Actor uses **pay-per-event** pricing:

- **$1.50 per 1,000 ads** ($0.0015 per ad) for ads in your dataset.
- **$2.00 per 1,000 ad details** ($0.002 per ad), only when **Fetch ad details** is on and the details were fetched.

| Ads | Without details | With details |
|---|---|---|
| 100 | $0.15 | $0.35 |
| 1,000 | $1.50 | $3.50 |
| 10,000 | $15.00 | $35.00 |

Ads removed by your filters, already-seen ads in incremental mode, duplicates and failed searches cost nothing. Your Apify plan's free monthly credit applies. To cap spending, set **Maximum cost per run** in the run options. The scraper checks the budget before fetching details and before saving each batch, then stops cleanly and tells you so in the status message.

### Scheduling and incremental monitoring of new ads

Use this to get **alerts when a competitor launches new ads**:

1. Turn on **Only new ads** and give the monitor a name in **Monitor name** (e.g. `competitors-uk`).
2. Save the configuration as a **Task** and add a **Schedule** (e.g. every morning).
3. The first run outputs all matching ads (up to your limit) and saves them as the baseline.
4. Every later run outputs **only ads that weren't output before**. To keep repeat runs fast, later runs only look at ads shown since the previous run, with a 2-day overlap. Ads that stopped running before the previous run are not "new" and are not revisited.

The memory is kept per domain or advertiser in a named key-value store (`google-ads-transparency-state` by default), under the monitor name you choose. Different monitor names are fully independent. Don't run two runs with the same monitor name at the same time.

If you also set **Max ads per advertiser**, each run delivers up to that many unseen ads and the rest arrive in later runs. To start with only genuinely new ads, do the first run without a limit, or with a narrow region and date range.

### Political ads

Google publishes a political ads report for Argentina, Australia, Brazil, Chile, EU countries, India, Israel, Mexico, New Zealand, South Africa, Taiwan, the United Kingdom and the United States. Turn on **Political ads only** and pick one of these regions:

- With domains, IDs or names, you get those advertisers' political ads.
- With no domains, IDs or names, you get **all political ads in the region**, most recently shown first. In the United States that is close to a million ads, so set **Max ads per advertiser**.

Each political ad includes `impressionsMin`/`impressionsMax` and `spendMin`/`spendMax` with `spendCurrency`, as ranges exactly as Google publishes them (for example 450,000–500,000 impressions and $5,000–$6,000). Google does not publish exact figures. With details on, targeting criteria (age, gender, location) are included when Google publishes them.

### Integrations and API

- **API.** Start runs and fetch results with the [Apify API](https://docs.apify.com/api/v2), or the JavaScript and Python clients:

  ```bash
  curl -X POST "https://api.apify.com/v2/acts/rjmacarthy~google-ads-transparency-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"domains":["nike.com"],"region":"GB","maxAdsPerAdvertiser":50}'
  ```

- **Webhooks.** Get notified (or trigger your pipeline) when a run finishes.

- **Zapier, Make, n8n.** Send new ads to Google Sheets, Airtable, Slack or email with no code.

- **Google Sheets, Slack, Airbyte, Keboola and more** through Apify integrations.

- **AI agents.** Use the Actor as a tool through the Apify MCP server.

### FAQ

**Do I need a Google account, cookies or an API key?**
No. The Transparency Center is public and the scraper reads the same data the website loads.

**Are there limits on the free plan?**
No. Free-plan users get the same features. You pay only per ad, and your Apify free monthly credit covers it.

**How fast is it?**
Without details, Google returns up to 100 ads per request and the scraper sends at most one request per second, so large advertisers are listed quickly. A test run listed 5 ads in under half a second. With details, each ad needs up to 2 more requests. In testing, 3 ads with details took 9 seconds at a 2-second delay; at the default 1-second delay that works out to roughly 40–60 ads per minute (an estimate, not yet measured on large runs).

**Why does a domain return ads from several advertisers?**
Google matches ads by the domain they point to. Big brands run ads from several accounts (per country, agencies, resellers). Use advertiser IDs to target one account.

**Why did my advertiser name pick the wrong advertiser?**
Names are not unique, and Google's suggestions only return the first 10 matches for what you type. For example, `Nike` resolves to a small account literally named "Nike", while `Nike, Inc.` resolves to the main US account. Check the log or `RUN_SUMMARY` for the other candidates, then use their advertiser IDs.

**Can I get the exact number of impressions or the exact spend?**
No. Google only publishes ranges, and only for political ads and (impressions) for ads shown in the EU.

**Can I get the ad's landing page?**
Partly. `landingDomain` is filled for domain searches and from the ad's display URL when details are on. Google rarely exposes the full landing URL.

**Is scraping the Google Ads Transparency Center legal?**
The scraper only collects information Google publishes for transparency. It doesn't collect personal data. Always check that your use complies with the applicable terms and laws.

### Troubleshooting

- **"Google is rate-limiting or CAPTCHA-checking this run's IP address".** Google limits how many requests one IP address can make, and it blocks cloud servers that connect directly. That's why **Proxy configuration** is on by default, using Apify's datacenter proxy, which works in testing. If you still see this message, set the proxy group to **RESIDENTIAL** and run again. The run stops with a clear status message instead of returning partial data silently, and ads already saved stay in the dataset.
- **"Google rejected the request format".** The Transparency Center's private API has changed. Please report it on the Issues tab; fixes are usually quick.
- **A search returns 0 ads.** The advertiser may not run ads in that region, or your filters (dates, format, platform) excluded everything. Try region `anywhere` and no date range. Political searches need a region with a political ads report.
- **Some fields are empty.** Google doesn't publish every field for every ad type. Turn on details for regions, ad copy and payer information.

### Limits

- This Actor uses the private JSON API behind adstransparency.google.com. Google can change it without notice. The request format is covered by tests, and the run fails with a clear message if Google rejects it.
- Ad copy, images and landing domains come from Google's ad previews, which differ by ad type. Extraction is best-effort: some ad types (for example rich display ads) may have no text.
- Google returns ads most recently shown first. There is no sort by first shown date.
- Impressions and spend are ranges, never exact numbers.
- Incremental state lives in a named key-value store in your account, created by the Actor itself. Deleting that store resets the monitor.

### Ready-to-run examples

- [See every Google ad a competitor is running](https://apify.com/rjmacarthy/google-ads-transparency-scraper/examples/competitor-google-ads-by-domain)
- [Scrape UK political ads on Google and YouTube](https://apify.com/rjmacarthy/google-ads-transparency-scraper/examples/uk-political-ads-on-google)

### More scrapers by the same developer

- [AI Visibility Tracker: ChatGPT, Perplexity, Gemini, Claude](https://apify.com/rjmacarthy/ai-search-visibility-tracker)
- [Substack Scraper](https://apify.com/rjmacarthy/substack-scraper)
- [Telegram Channel Scraper](https://apify.com/rjmacarthy/telegram-channel-scraper)
- [ATS Jobs Scraper: Greenhouse, Lever, Ashby & Workday](https://apify.com/rjmacarthy/ats-jobs-scraper)
- [Dice Jobs Scraper](https://apify.com/rjmacarthy/dice-jobs-scraper)
- [SEEK Jobs Scraper](https://apify.com/rjmacarthy/seek-jobs-scraper)

Browse all my Actors on [my Apify Store profile](https://apify.com/rjmacarthy).

### Support

Found an advertiser that doesn't work, or need an extra field? Open an issue on the **Issues** tab with your input. Fixes are usually quick.

# Actor input Schema

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

Websites whose ads you want, e.g. nike.com. Google returns every advertiser account whose ads point to the domain (a brand often has several, for example one per country). URLs are accepted and reduced to the domain.

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

Advertiser IDs such as AR16735076323512287233. Copy them from an adstransparency.google.com/advertiser/AR... URL (pasting the whole URL also works). The most precise way to target one advertiser.

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

Advertiser names as shown in the Ads Transparency Center, e.g. "Nike, Inc.". Each name is looked up with Google's search suggestions and resolved to one advertiser: the exact name match with the most ads, otherwise the closest match with the most ads. The log lists the other candidates with their IDs. Names are ambiguous, so prefer IDs or domains when you can.

## `region` (type: `string`):

Only ads shown in this country. "Anywhere" searches all regions.

## `dateFrom` (type: `string`):

Only ads shown on or after this date (YYYY-MM-DD), or a relative value such as "30 days". An ad matches if it ran at any point in the date range.

## `dateTo` (type: `string`):

Only ads shown on or before this date (YYYY-MM-DD). Leave empty for today.

## `adFormat` (type: `string`):

Text, image or video ads only. Google's own format label is used, so Shopping product ads are counted as image ads.

## `platform` (type: `string`):

Only ads shown on this Google platform.

## `maxAdsPerAdvertiser` (type: `integer`):

Stop after this many ads for each domain, advertiser ID or name you entered, most recently shown first. 0 = no limit. For a domain the limit covers all advertiser accounts found for that domain together.

## `fetchDetails` (type: `boolean`):

For every ad, also fetch its detail page and preview: the list of regions where it ran with per-region first/last shown dates (and impression ranges for EU countries), who paid for it, targeting types, ad copy, image and YouTube URLs where available, and the advertiser's country. Costs up to 2 extra requests per ad and is charged as a separate "ad details" event. Much slower: about 1 ad per second.

## `politicalAdsOnly` (type: `boolean`):

Search Google's political ads report instead of all ads. Adds spend and impression ranges to each ad. Requires a region where Google publishes political ads: Argentina, Australia, Brazil, Chile, EU countries, India, Israel, Mexico, New Zealand, South Africa, Taiwan, the United Kingdom or the United States. With no domains, IDs or names, the run returns all political ads in that region.

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

Remember which ads were already output and only output (and charge for) ads that are new since the previous run. The first run outputs all matching ads and saves them as the baseline. Ideal for scheduled competitor monitoring.

## `stateKey` (type: `string`):

Name of this monitor's memory. Runs with the same name share the list of already-seen ads (per domain or advertiser). Use different names for independent monitors, e.g. one per region.

## `stateStoreName` (type: `string`):

Named key-value store in your account where incremental state is kept (letters, digits and dashes).

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

On by default (Apify datacenter proxy). Google blocks Apify's servers when they connect directly, so leave this on. If the log still says Google is rate-limiting or CAPTCHA-checking the run, switch to the RESIDENTIAL proxy group.

## `requestDelayMs` (type: `integer`):

Minimum pause between requests to adstransparency.google.com. Google rate-limits this endpoint per IP address, so the default of 1 second is deliberately polite. Lower it only when using rotating proxies.

## Actor input object example

```json
{
  "domains": [
    "nike.com"
  ],
  "region": "anywhere",
  "adFormat": "all",
  "platform": "all",
  "maxAdsPerAdvertiser": 20,
  "fetchDetails": false,
  "politicalAdsOnly": false,
  "onlyNewAds": false,
  "stateKey": "default",
  "stateStoreName": "google-ads-transparency-state",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "requestDelayMs": 1000
}
```

# Actor output Schema

## `ads` (type: `string`):

One item per ad: advertiser, format, first/last shown, regions, preview, headline, landing domain and link.

## `adsFull` (type: `string`):

Every field for each ad, including details and political spend when available.

## `summary` (type: `string`):

Per-search status, counts, resolved advertiser names, request statistics and any errors.

# 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 = {
    "domains": [
        "nike.com"
    ],
    "maxAdsPerAdvertiser": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rjmacarthy/google-ads-transparency-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 = {
    "domains": ["nike.com"],
    "maxAdsPerAdvertiser": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rjmacarthy/google-ads-transparency-scraper").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 '{
  "domains": [
    "nike.com"
  ],
  "maxAdsPerAdvertiser": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rjmacarthy/google-ads-transparency-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rjmacarthy/google-ads-transparency-scraper"
        }
    }
}
```

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/CEubO97agIb11Dw2Z/builds/Pf6cjgi3ZA24AAdjV/openapi.json
