# Google Ads Transparency Scraper: Competitor Ads & Monitoring (`stratumics/google-ads-transparency-scraper`) Actor

Get the ads any advertiser runs on Google Search, YouTube, Shopping, Maps and Play, from the Ads Transparency Center: images, formats, dates, regions and EU reach. Search by name, domain or link.

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

## Pricing

from $0.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does Google Ads Transparency Scraper do?

**Google Ads Transparency Scraper** gets the ads any advertiser runs on **Google Search, YouTube, Google Shopping, Google Maps and Google Play** from the [Google Ads Transparency Center](https://adstransparency.google.com), as JSON, CSV or Excel. Search by **advertiser name**, **advertiser id**, **website domain** (such as `nike.com`) or a **Transparency Center link**, filter by country, platform, format and date, and get one row per ad: images, ad text, the YouTube video, the landing page, first and last shown dates, the countries it ran in and, for ads shown in the EU, how many times it was shown, on which platforms, its topic and the audience the advertiser chose.

Use it as a **Google Ads library API** for competitor research, or turn on **Only new ads**, put it on a schedule and get just the ads a competitor started showing since the last run. No Google account, no API key.

### Why use this Google Ads Transparency scraper?

- **Ad text, video and landing page in the same price.** Many ads in the Transparency Center are drawn by a preview script, so their words are not in Google's data. With details on (the default), the Actor reads each ad's preview for the headline, description, display URL, call to action, business or app name, the YouTube video of video ads and the landing page. In our test runs on Nike's most recent ads, 13 to 18 of every 20 came back with their words.
- **Details at no extra charge.** Every variation's image, the number of variations, the countries with dates, and for EU ads the times shown per country and platform, the topic and the audience selection. One price per ad.
- **Monitoring built in.** **Only new ads** remembers which ads each input returned before. Scheduled runs save and charge only the ads you have not seen; skipped ads are free.
- **Fast paging.** The Actor reads 100 ads per request: our test read 418 ads from three advertisers in 2 seconds (details off).
- **Keeps going when Google slows it down.** It connects directly while Google allows it, moves to Apify Proxy datacenter IPs when Google rate-limits, then to residential IPs (at no extra charge) if Google refuses those too, and if Google still blocks every connection for a while it saves the remaining ads without details instead of failing.
- **Takes what you have.** Brand names (matched to the advertiser with the most ads), advertiser ids (`AR...`), domains, and advertiser or single-ad links copied from your browser, with their filters.
- **Never charges an ad twice.** A restarted run skips ads it already saved, and the run stops exactly at the maximum cost you set.

Typical uses: competitor ad research, creative swipe files, watching a brand's new campaigns, agency pitches, checking who else advertises with your domain or brand, and EU reach research.

### What data can you get from the Google Ads Transparency Center?

| Field | Description |
| --- | --- |
| `advertiserName`, `advertiserId`, `advertiserCountry` | The advertiser as Google lists it, its id and where it is based |
| `advertiserVerified`, `advertiserLegalName` | Whether Google verified the advertiser, and its legal name |
| `creativeId`, `adUrl` | The ad's id and its page on the Transparency Center |
| `format` | `text`, `image` or `video` |
| `firstShown`, `lastShown`, `daysShown` | When the ad ran (ISO 8601, UTC) and for how many days |
| `headline`, `description`, `displayUrl`, `callToAction`, `sitelinks` | The ad's words, where Google shows them |
| `businessName`, `appName` | Store, merchant or app named on the ad |
| `landingUrl`, `landingDomain` | The page and website the ad sends people to |
| `imageUrl`, `imageUrls`, `previewUrl` | The ad image, the images of every variation, and Google's preview script |
| `youtubeVideoId`, `youtubeUrl` | The YouTube video of a video ad, when the preview shows it |
| `variationCount` | Number of variations |
| `regions` | Countries the ad ran in, with dates and, in the EU, times shown per platform |
| `impressionsMin`, `impressionsMax`, `platformImpressions`, `platforms` | EU ads: times shown in total and per platform |
| `topic`, `topicSource`, `audienceSelection` | EU ads: topic (labeled by Google or provided by the advertiser) and the audience criteria used |
| `paidBy` | Who paid for the ad |
| `searchInput`, `searchType`, `searchRegion`, `scrapedAt` | Which input found the ad, the region filter, and when it was saved |

### How to scrape the Google Ads Transparency Center

1. Open the Actor and type one or more **advertisers** (names or `AR...` ids), **domains**, or paste **Transparency Center links**.
2. Pick a **region** (anywhere, or a country), and optionally a **platform**, a **format** and a **date range**.
3. Set **Max ads per advertiser** (newest first; 0 reads up to 10,000).
4. Leave **Include ad details** on for text, videos, regions and EU data, or turn it off for the fastest and simplest list.
5. For monitoring, tick **Only new ads** and add a schedule.
6. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them through the API.

### How much does it cost to scrape Google ads?

The Actor uses pay per event pricing, so you pay for ads saved, not for server time:

- **Ad: $1.00 per 1,000 ads** on Apify's free plan, with details, ad text, video ids and landing pages included.
- Paid Apify plans pay less: **$0.90 per 1,000 on Starter, $0.70 on Scale and $0.50 on Business**.
- Each run also has a start fee of $0.002.

Example: **1,000 ads cost about $1.00.** Watching 10 competitors every day with Only new ads, at about 20 new ads per competitor per day, is about 6,000 ads a month, so about $6 plus $0.06 in start fees. Ads skipped by Only new ads are free, and you can set a maximum cost per run in the run options; the Actor stops cleanly when it reaches it. Apify's free plan includes $5 of monthly credit, enough for about 5,000 ads a month.

### Input

See the Input tab for every option. A typical input:

```json
{
    "advertisers": ["AR16735076323512287233", "AR05501100765344694273"],
    "domains": ["allbirds.com"],
    "region": "DE",
    "platform": "YOUTUBE",
    "format": "VIDEO",
    "dateRange": "last-30-days",
    "maxAdsPerAdvertiser": 100,
    "includeDetails": true
}
```

Links work too: paste an advertiser page (`https://adstransparency.google.com/advertiser/AR16735076323512287233?region=US&platform=SEARCH`), a domain search (`...?domain=nike.com`) or a single ad (`.../advertiser/AR.../creative/CR...`). A link keeps its own region, platform, format and dates.

For monitoring:

```json
{
    "advertisers": ["Glossier"],
    "maxAdsPerAdvertiser": 200,
    "onlyNewAds": true
}
```

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. Two real results, shortened: empty fields and preview links are left out, and the video ad's 44 countries are cut to one.

```json
[
    {
        "advertiserId": "AR16735076323512287233",
        "advertiserName": "Nike, Inc.",
        "advertiserCountry": "US",
        "advertiserLegalName": "Nike, Inc.",
        "advertiserVerified": true,
        "creativeId": "CR07144086868877901825",
        "adUrl": "https://adstransparency.google.com/advertiser/AR16735076323512287233/creative/CR07144086868877901825?region=anywhere",
        "format": "text",
        "firstShown": "2023-11-16T21:47:39.000Z",
        "lastShown": "2026-10-18T08:53:33.000Z",
        "daysShown": 900,
        "headline": "Nike® Official Site",
        "description": "Built on defiance, tradition, and a legacy larger than game. Women's Jordan shoes.",
        "displayUrl": "nike.com",
        "businessName": "Nike",
        "landingDomain": "nike.com",
        "imageUrl": "https://tpc.googlesyndication.com/archive/simgad/6484835414976825563",
        "imageWidth": 348,
        "imageHeight": 301,
        "imageIsRendering": true,
        "imageUrls": [
            "https://tpc.googlesyndication.com/archive/simgad/6484835414976825563",
            "https://tpc.googlesyndication.com/archive/simgad/14442065786807425665"
        ],
        "variationCount": 3,
        "regions": [
            { "regionCode": "US", "regionName": "United States", "firstShown": null, "firstShownOnOrBefore": null, "lastShown": "2026-09-01", "impressionsMin": null, "impressionsMax": null, "platforms": [] }
        ],
        "paidBy": "Nike, Inc.",
        "detailsIncluded": true,
        "searchInput": "AR16735076323512287233",
        "searchType": "advertiser",
        "searchRegion": null,
        "scrapedAt": "2026-10-18T09:11:58.132Z"
    },
    {
        "advertiserId": "AR05501100765344694273",
        "advertiserName": "Gymshark Ltd",
        "advertiserCountry": "GB",
        "advertiserLegalName": "Gymshark Ltd",
        "advertiserVerified": true,
        "creativeId": "CR15903349979587018753",
        "adUrl": "https://adstransparency.google.com/advertiser/AR05501100765344694273/creative/CR15903349979587018753?region=anywhere",
        "format": "video",
        "lastShown": "2026-10-18T02:54:59.000Z",
        "description": "The best of Gymshark anytime, anywhere. Download the app and join Gymshark Loyalty.",
        "callToAction": "Install",
        "appName": "Gymshark: Shop Gym Clothes",
        "landingDomain": "play.google.com",
        "landingUrl": "https://play.google.com/store/apps/details?id=com.gymshark.store",
        "youtubeVideoId": "De4QZa0s8tY",
        "youtubeUrl": "https://www.youtube.com/watch?v=De4QZa0s8tY",
        "variationCount": 3,
        "platforms": ["YouTube", "Google Search"],
        "regions": [
            {
                "regionCode": "IE",
                "regionName": "Ireland",
                "firstShown": "2025-05-20",
                "firstShownOnOrBefore": false,
                "lastShown": "2026-06-25",
                "impressionsMin": 0,
                "impressionsMax": 1000,
                "platforms": [
                    { "platform": "Google Search", "impressionsMin": 0, "impressionsMax": 1000 },
                    { "platform": "YouTube", "impressionsMin": 0, "impressionsMax": 1000 }
                ]
            }
        ],
        "impressionsMin": 20000,
        "impressionsMax": 25000,
        "platformImpressions": [
            { "platform": "YouTube", "impressionsMin": 0, "impressionsMax": 1000 },
            { "platform": "Google Search", "impressionsMin": 1000, "impressionsMax": 2000 }
        ],
        "topic": "Apparel",
        "topicSource": "google",
        "audienceSelection": {
            "demographicInfo": "included",
            "geographicLocations": "included",
            "contextualSignals": "included and excluded"
        },
        "paidBy": "Gymshark Ltd",
        "detailsIncluded": true,
        "searchInput": "https://adstransparency.google.com/advertiser/AR05501100765344694273/creative/CR15903349979587018753?region=anywhere",
        "searchType": "url",
        "scrapedAt": "2026-10-18T04:05:48.739Z"
    }
]
```

The **Ad text** view in the Output tab lists the words, landing pages and videos; **Region rows** gives one row per ad and country for spreadsheets (add `view=regions` to the dataset items URL in the API).

### How Only new ads works

With **Only new ads** on, the Actor keeps the ids of every ad it saved for an input in the key-value store `google-ads-transparency-monitor` in your account, and later runs with the same inputs and filters skip them. Each set of inputs gets its own list; give a **Monitor name** to keep separate lists for schedules with the same inputs. Google lists ads by when they were last shown, so an older ad that starts running again counts as new once. To be sure you catch every new ad, set **Max ads per advertiser** a little above the number of ads a competitor changes between runs; ads skipped as seen cost nothing.

### Tips for scraping Google ads

- **Ids match exactly; names match the biggest advertiser.** An advertiser id (`AR...`, in every Transparency Center link) always reads that account. A name like "Nike" is matched to the account with the most ads among Google's suggestions, in your region when you set one; if those miss the brand, the Actor checks who runs most of the ads on its .com website. When the pick still looks unlike the name (few ads, or a name that only starts like yours), the log and the status message say so. Raise **Advertisers per name** to read the next matches too.
- **Domains find everyone advertising a site.** A domain search returns every advertiser whose ads lead there: our `allbirds.com` test found 14 ads from Allbirds Inc and 1 from another company. That is useful for checking resellers and brand bidding.
- **EU ads carry the most data.** Times shown, platforms, topic and audience selection exist only for ads shown in the EU, because Google publishes them under EU rules (the Digital Services Act). Set the region to an EU country to see them on every ad. Google publishes times shown with a 90-day delay.
- **Dates.** `firstShown` and `lastShown` are exact times in UTC; the Transparency Center shows them as dates in US Pacific time, so a late-evening ad can show one day earlier there. For EU countries where Google says "First shown on or before March 1, 2023", the region's `firstShown` is `2023-03-01` with `firstShownOnOrBefore: true`.
- **Some text ads exist only as a picture.** Google keeps many search ads as an image of the ad; for those `imageIsRendering` is true and the words are in the picture, not in the text fields.
- **Large detail runs.** Each ad with details costs Google one or two extra requests, and Google limits requests per IP. When it blocks every connection the run tells you in the log and saves the remaining ads without details; a schedule spread over the day, fewer ads per run, or turning details off gets around it. Ad links (`/creative/CR...`) are always read with details.

### Integrations and API

- **API:** start runs and read results with the [Apify API](https://docs.apify.com/api/v2), for example `POST https://api.apify.com/v2/acts/stratumics~google-ads-transparency-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN` with the input as the JSON body.
- **JavaScript and Python:** use the official `apify-client` packages: `client.actor('stratumics/google-ads-transparency-scraper').call(input)`, then read `client.dataset(run.defaultDatasetId).listItems()`.
- **No-code:** connect the Actor to Zapier, Make, n8n, Google Sheets, Slack or webhooks from the Integrations tab, for example to post each new competitor ad to a Slack channel.
- **AI agents:** add the Apify MCP server (`https://mcp.apify.com?tools=stratumics/google-ads-transparency-scraper`) to any assistant that supports the Model Context Protocol, and it can look up a company's Google ads on its own.

### FAQ

#### Do I need a Google account or an API key?

No. The Actor reads the public Ads Transparency Center the way a logged-out visitor's browser does.

#### Why do some ads have no headline or description?

Google keeps many text ads only as a picture of the ad (see `imageUrl`), and image and video ads carry their words inside the creative. The Actor fills the text fields whenever Google's data or the ad's preview contains the words.

#### Why are times shown, platforms and audience empty for some ads?

Google publishes them only for ads shown in the EU. US-only ads have dates and countries, but no reach data.

#### Can I get the video file?

The Actor gives the YouTube id and link when the preview shows the YouTube video, which is common for app and YouTube campaigns, and Google's `previewUrl` for every other video ad. Direct video file links in Google's previews expire within hours and are tied to the viewer's IP, so they are not saved.

#### Is it legal to scrape the Google Ads Transparency Center?

Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

The Ads Transparency Center lists advertisers and their ads. Some advertisers are individuals who advertise under their own name; their names appear in the results the same way Google shows them.

#### Where do I report a problem?

Open an issue on the Issues tab with your run link and we will look at it. For programmatic access, see the API tab.

### Other tools from Stratum ICS

- [Airbnb Scraper](https://apify.com/stratumics/airbnb-scraper): Get every Airbnb listing in a city or from listing links: price per night, rating, reviews, guests, bedrooms, host and Superhost status.
- [App Store Reviews Scraper](https://apify.com/stratumics/app-store-reviews-scraper): Get Apple App Store reviews with star ratings, titles, text, app versions, helpful votes and developer replies, well past Apple's 500-review limit, for any country, plus app ratings.
- [Bilibili Scraper](https://apify.com/stratumics/bilibili-scraper): Scrape Bilibili videos by search, link or uploader without logging in: views, likes, coins, tags, uploader profiles, comments with replies and danmaku, in clean rows.
- [Facebook Ads Library Scraper](https://apify.com/stratumics/facebook-ads-library-scraper): Get ads from the Meta (Facebook) Ad Library by keyword, advertiser page or library link: texts, images, videos, dates, platforms and versions, plus spend for political ads.
- [Facebook Posts Scraper](https://apify.com/stratumics/facebook-posts-scraper): Get posts from public Facebook pages: text, reactions by type, comments, shares, views and media, plus page details with followers, contacts, rating and creation date.
- [Google Maps Reviews Scraper](https://apify.com/stratumics/google-maps-reviews-scraper): Get the Google Maps reviews of any place: rating, full text, exact date, photos, owner reply, reviewer details and food or service scores.
- [Google Maps Scraper](https://apify.com/stratumics/google-maps-scraper): Get the businesses on Google Maps for any search and area: name, address, phone, website, rating, review count, opening hours, plus emails and social profiles.
- [Google News Scraper](https://apify.com/stratumics/google-news-scraper): Get Google News articles with real publisher URLs (not Google redirects), source, date, image, author and optional full text.
- [Google Play Reviews Scraper](https://apify.com/stratumics/google-play-reviews-scraper): Get Google Play reviews with star ratings, text, app versions, thumbs-up counts, developer replies and feature ratings in any language, plus app details with installs and star histogram.
- [Google Trends Scraper](https://apify.com/stratumics/google-trends-scraper): Get Google Trends data as JSON, CSV or Excel: interest over time, interest by region and city, related queries, and trending searches by country.
- [Instagram Scraper](https://apify.com/stratumics/instagram-scraper): Scrape public Instagram profiles, posts, reels and comments without logging in: followers, bio, posts count, captions, likes, video views, media links, tags and music.
- [LinkedIn Jobs Scraper](https://apify.com/stratumics/linkedin-jobs-scraper): Scrape LinkedIn jobs with full descriptions, salary ranges, seniority, job type and applicant counts.
- [Reddit Scraper](https://apify.com/stratumics/reddit-scraper): Get Reddit posts and full comment threads from subreddits, searches, user profiles and post links: titles, text, scores, flair, media and replies.
- [Telegram Channel Scraper](https://apify.com/stratumics/telegram-channel-scraper): Get messages from public Telegram channels with views, dates, media, reactions, polls and forwards, plus channel info with exact subscriber counts.
- [Threads Scraper](https://apify.com/stratumics/threads-scraper): Scrape Threads profiles, posts, replies and keyword search: followers, bio, post text, likes, replies, reposts, quotes, media and links.
- [TikTok Comments Scraper](https://apify.com/stratumics/tiktok-comments-scraper): Export TikTok comments and replies from any video or photo post: text, date, likes, reply count, commenter, pinned and creator-liked flags, plus video stats.
- [TikTok Scraper](https://apify.com/stratumics/tiktok-scraper): Scrape TikTok profiles and videos: followers, likes, bio, the latest 10 to 12 videos of each profile, and full stats for any video link.
- [Website Contact Scraper](https://apify.com/stratumics/website-contact-scraper): Turn a list of websites into one row per company with verified emails, formatted phone numbers, social profiles (LinkedIn, Facebook, Instagram, X), address and contact page.
- [YouTube Scraper](https://apify.com/stratumics/youtube-scraper): Get YouTube videos from searches, channels, playlists and links with exact views, likes, comment counts, dates and tags, plus channel profiles and comments.
- [YouTube Transcript Scraper](https://apify.com/stratumics/youtube-transcript-scraper): Get YouTube transcripts and captions as plain text, timed segments, SRT or WebVTT, from video links, whole channels or playlists, in any language YouTube offers.

# Actor input Schema

## `advertisers` (type: `array`):

Advertiser ids from the Transparency Center (AR followed by digits, as in its links) for an exact match, or advertiser names (for example Nike). A name is matched to the account with the most ads among Google's suggestions (in the chosen region), or to the account behind the brand's .com website; a doubtful match is reported in the log. Raise "Advertisers per name" to take more matches.

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

Websites, for example nike.com. You get the ads that link to the site, from every advertiser account that runs them.

## `urls` (type: `array`):

Optional. Paste links copied from adstransparency.google.com: an advertiser page, a domain search or a single ad. The region, platform, format and dates in a link apply to it.

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

Only ads shown in this country. Anywhere returns ads from every region. A region filter is strict: an advertiser that targets other countries can return few or no ads.

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

Only ads shown on this Google service. Google applies this filter to ads shown since September 2023.

## `format` (type: `string`):

Only text, image or video ads.

## `dateRange` (type: `string`):

Only ads shown in this period (UTC). Choose Custom to set your own dates below.

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

First day of a custom date range (YYYY-MM-DD). Used only when Date range is Custom.

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

Last day of a custom date range (YYYY-MM-DD). Leave empty for today.

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

How many ads to read for each advertiser, domain or link, most recently shown first. 0 reads up to 10,000.

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

How many advertiser accounts a name may match, biggest first. Brands often run separate accounts per country.

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

Open each ad's detail page and preview for every variation, the regions it ran in with dates, the ad text (headline, description, display URL, call to action) and YouTube video where Google shows them, and for ads shown in the EU the times shown, platforms, topic and audience selection. Up to two extra requests per ad; when Google rate-limits every connection, the rest of the ads are saved without them. No extra charge.

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

Save only ads earlier runs with the same inputs have not returned. The Actor remembers creative ids in the key-value store google-ads-transparency-monitor in your account. Pair it with a schedule for competitor alerts.

## `monitorName` (type: `string`):

Optional. A name for the remembered list, so different schedules keep separate histories even with the same inputs. Leave empty to derive it from the inputs.

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

With Apify Proxy on (the default), the Actor starts with a direct connection, moves requests to Apify Proxy datacenter IPs when Google rate-limits it or a run needs many detail pages, and to residential IPs (at no extra charge to you) when Google refuses the datacenter ones too. Ad previews never use residential IPs. Turn it off to never use a proxy, or pick proxy groups or your own proxy URLs to send every request through them.

## Actor input object example

```json
{
  "advertisers": [
    "AR16735076323512287233"
  ],
  "domains": [],
  "urls": [],
  "region": "anywhere",
  "platform": "all",
  "format": "all",
  "dateRange": "anytime",
  "maxAdsPerAdvertiser": 20,
  "maxAdvertisersPerName": 1,
  "includeDetails": true,
  "onlyNewAds": false,
  "monitorName": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset with one row per ad.

## `regionRows` (type: `string`):

One row per ad and region, ready for spreadsheets (details on).

# 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 = {
    "advertisers": [
        "AR16735076323512287233"
    ],
    "maxAdsPerAdvertiser": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("stratumics/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 = {
    "advertisers": ["AR16735076323512287233"],
    "maxAdsPerAdvertiser": 20,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,stratumics/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/yJOud0njLOOaItvZs/builds/OoaVoyH5zrLepFmMW/openapi.json
