# Google Ads Transparency Center Scraper · Competitor Ads (`instagram-data-api/google-ads-transparency-scraper`) Actor

Google Ads Transparency Center scraper, no login: 2,000 competitor ads in 24 s. By website, advertiser name or ID, 243 regions. Each row: advertiser, legal name, country, format, first / last shown, days shown. A tick adds regions, times shown, political spend; another the ad text. CSV, Excel, JSON.

- **URL**: https://apify.com/instagram-data-api/google-ads-transparency-scraper.md
- **Developed by:** [Instagram Data API](https://apify.com/instagram-data-api) (community)
- **Categories:** Marketing, Lead generation, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.45 / 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

### Google Ads Transparency Center scraper — competitor ads by website, name or ID

**Paste a website, an advertiser name or ID — get its ads from Google's Ads Transparency Center, one row per ad: advertiser, legal name, country, format, first and last shown, days shown, preview. No login, no cookies. $1.65 per 1,000 ads on the Starter plan; 2,000 ads in 24 seconds on Apify (17 Nov 2026).**

![Google Ads Transparency Center Scraper output: advertiser, country, format, first and last shown, days shown, regions, times shown and ad text for each ad](https://media.fypspy.com/instagram-data-api/google-ads-transparency-scraper/rows-v1.png)

**Real row, 17 Nov 2026:** `nike.com` → a text ad of Nike Retail BV (NL, verified): shown on 389 days, in 17 regions, 350,000–400,000 times in Poland.

- 🔎 **Any input in one list** — websites, names, `AR…` IDs, Transparency Center links.
- 🌍 **The site's filters** — 243 regions, dates, format, platform.
- 📊 **Ad details, one tick** (+$2.95 per 1,000) — variations, regions with dates, «times shown» ranges, political spend.
- 📝 **Ad text, one tick** (+$2.00 per 1,000 ads with text) — headline, description, sitelinks, product title, YouTube video. Charged only when found: 21% of 1,409 sampled ads, the rest are pictures.
- 🏢 **Advertisers mode** — who runs Google ads for a website or a name.
- 🔓 **Never charged:** duplicates, names and IDs the site does not know, targets Google did not answer.

**Try it:** press **Start** — the prefilled `nike.com` returns 50 ads and a summary row.

🆕 New in November 2026. Tried it? Tell us in a review.

### What data does the Google Ads Transparency scraper return?

An ad row has 57 fields. Unknown is `null`, never a fake 0, and every `null` field of a row is named in its `notCollected` list with the reason in `note`. Every target also gets a free summary row: how many ads the site has for it, how many you got, why the run stopped there.

| Group | Fields |
|---|---|
| Ad | `creativeId`, `format`, `firstShown`, `lastShown`, `daysShown`, `adUrl`, `domain`, `region` |
| Advertiser | `advertiserId`, `advertiserName`, `advertiserLegalName`, `advertiserCountry`, `advertiserVerified` |
| Creative | `previewType`, `imageUrl` with size, `previewUrl`, `googleCreativeId`, `googleCustomerId`, `adGroupId`, `versionId` |
| Political | `isPolitical`, `politicalRegions` |
| With «Include ad details» | `variations`, `variationCount`, `regions` (dates and «times shown» per region and platform), `regionCodes`, `regionCount`, `platforms`, `platformImpressions`, `impressionsMin`, `impressionsMax`, `audienceSelection`, `spendMin`, `spendMax`, `spendCurrency`, `geoTargetIds`, `geoExcludedIds` |
| With «Include ad text» | `adTextKind`, `adHeadline`, `adDescription`, `adDisplayUrl`, `adSitelinks`, `adBusinessName`, `adProductImageUrl`, `adDestinationUrl`, `youtubeVideoId`, `youtubeUrl`, `videoThumbnailUrl`, `adTextLines` |

`googleCustomerId` is the same for ads of one Google Ads account and `adGroupId` for ads of one campaign group — group by them to see how a competitor structures its ads. `daysShown` tells which ads a competitor keeps paying for.

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

Pay per result, per 1,000:

| Event | When it is charged | Free | Starter | Scale | Business |
|---|---|---|---|---|---|
| Actor start | once per run | $0.0005 | $0.0005 | $0.0005 | $0.0005 |
| Target checked | per website, advertiser or ad link read on the site, with ads or without | $1.00 | $1.00 | $1.00 | $1.00 |
| Ad | per ad delivered | $1.80 | $1.65 | $1.55 | $1.45 |
| Ad details | per ad, only with «Include ad details» | $2.95 | $2.95 | $2.95 | $2.95 |
| Ad text | per ad whose text was found, only with «Include ad text» | $2.00 | $2.00 | $2.00 | $2.00 |
| Advertiser | per advertiser row in «Advertisers» mode | $2.95 | $2.95 | $2.95 | $2.95 |

Prices are per 1,000 events, except the start, which is per run.

- 100 ads of one website on Starter: **$0.17**.
- The same 100 ads with details and ad text: at most **$0.66** (ad text is charged only for ads that have it).
- An ad-check of 1,000 websites in «Advertisers» mode with 1 account each: **$3.95**.

A run never goes over the «Maximum cost per run» you set: the Actor asks the site only for as many ads as that limit can pay for, stops, and says so in the run's status and in each unfinished target's summary row. Checked on Apify (17 Nov 2026): with a $0.05 limit, two websites and details on, the run delivered 10 ads for $0.049.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `targets` | array | — | One per line, any mix: a website (nike.com, or a link to any of its pages — only the domain is used) — the ads that lead to it, from any advertiser; an advertiser name (Nike, Inc.); an advertiser ID (AR16735076323512287233); or a link copied from adstransparency.google.com (an advertiser's page, one ad's page, a domain search). |
| `resultType` | string | "ads" | «Ads» — one row per ad. |
| `maxAdsPerTarget` | integer | 100 | The newest ads first, as the site lists them. |
| `region` | string | "ANYWHERE" | The site's own region filter: ads shown in this country. |
| `startDate` | string | — | Only ads shown inside the date window. |
| `endDate` | string | — | The end of the date window, YYYY-MM-DD. |
| `adFormat` | string | "ALL" | Text (Search ads), image (display and Shopping ads) or video (YouTube ads). |
| `platform` | string | "ALL" | Where Google showed the ad: Search, YouTube, Shopping, Maps or Play. |
| `includeAdDetails` | boolean | false | One more request per ad: every variation of the creative, every region it ran in with first and last dates, Google's «times shown» ranges per region and platform (ads shown in the EU and political ads), audience choices, and spend ranges of political ads. |
| `includeAdText` | boolean | false | Reads the ad's preview: headline, description, display URL and sitelinks of Search ads; product title, merchant and product image of Shopping ads; the YouTube video and headline of video ads. |
| `maxAdvertisersPerName` | integer | 3 | A name can match several advertiser accounts (a brand, its regional companies, namesakes). |
| `includeRawData` | boolean | false | Adds a «raw» field with the Transparency Center's own objects, for debugging. |
| `maxConcurrency` | integer | 12 | How many requests run in parallel, each on its own proxy session. |
| `proxyConfiguration` | object | {"useApifyProxy": true} | Nothing to set up: Apify Proxy is used by default and the Actor switches route by itself if Google stops answering. |

Through the API the Actor also accepts the field names of other Google Ads Transparency Actors — `queries`, `domains`, `advertiserIds`, `startUrls`, `searchQuery`, `searchTerms`, `maxAdsPerSearch`, `resultsLimit`, `maxResults`, `maxItems`, `maxAds`, `includeDetails`, `dateFrom` / `dateTo`, `shownAfter` / `shownBefore`, `format`, `platforms`, `regionCode` — so an existing integration can be pointed here as it is.

```json
{
  "targets": ["nike.com", "Nike, Inc.", "AR16735076323512287233"],
  "region": "US",
  "startDate": "2026-10-01",
  "adFormat": "VIDEO",
  "maxAdsPerTarget": 200,
  "includeAdDetails": true
}
```

### Output example

A real row of our own run on 17 Nov 2026 (`nike.com`, details and ad text on; long links are cut and `regions` shows 2 of 17):

```json
{
  "rowType": "ad",
  "target": "nike.com",
  "targetType": "domain",
  "creativeId": "CR04918732594763268097",
  "advertiserId": "AR18378488041124659201",
  "advertiserName": "Nike Retail BV",
  "advertiserLegalName": "Nike Retail BV",
  "advertiserCountry": "NL",
  "advertiserVerified": true,
  "domain": "nike.com",
  "format": "TEXT",
  "firstShown": "2025-10-24T10:57:39Z",
  "lastShown": "2026-11-17T14:24:12Z",
  "daysShown": 389,
  "adUrl": "https://adstransparency.google.com/advertiser/AR18378488041124659201/creative/CR04918732594763268097",
  "region": "ANYWHERE",
  "previewType": "script",
  "imageUrl": null,
  "imageWidth": null,
  "imageHeight": null,
  "previewUrl": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?client=ads-integrity-transparency&obfu…",
  "googleCreativeId": "780504189323",
  "googleCustomerId": "9751199197",
  "adGroupId": "188967147522",
  "versionId": "10",
  "isPolitical": null,
  "politicalRegions": null,
  "variationCount": 2,
  "variations": [
    {
      "previewType": "script",
      "previewUrl": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?client=ads-integrity-transparency&obfu…",
      "imageUrl": null,
      "imageWidth": null,
      "imageHeight": null,
      "googleCreativeId": "780504189323",
      "versionId": "10"
    },
    {
      "previewType": "script",
      "previewUrl": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?client=ads-integrity-transparency&obfu…",
      "imageUrl": null,
      "imageWidth": null,
      "imageHeight": null,
      "googleCreativeId": "780504189323",
      "versionId": "10"
    }
  ],
  "regionCount": 17,
  "regionCodes": [
    "GR",
    "DE",
    "PL",
    "HR",
    "ES",
    "NL",
    "SK",
    "BE",
    "DK",
    "AT",
    "IS",
    "CZ",
    "NO",
    "FR",
    "CY",
    "IT",
    "SE"
  ],
  "regions": [
    {
      "region": "DE",
      "regionName": "Germany",
      "firstShown": "2025-11-01",
      "lastShown": "2026-11-16",
      "impressionsMin": 0,
      "impressionsMax": 1000,
      "platforms": [
        {
          "platform": "SEARCH",
          "impressionsMin": 0,
          "impressionsMax": 1000
        }
      ]
    },
    {
      "region": "PL",
      "regionName": "Poland",
      "firstShown": "2025-10-24",
      "lastShown": "2026-11-17",
      "impressionsMin": 350000,
      "impressionsMax": 400000,
      "platforms": [
        {
          "platform": "MAPS",
          "impressionsMin": 0,
          "impressionsMax": 1000
        },
        {
          "platform": "SEARCH",
          "impressionsMin": 350000,
          "impressionsMax": 400000
        },
        {
          "platform": "SHOPPING",
          "impressionsMin": 0,
          "impressionsMax": 1000
        }
      ]
    }
  ],
  "platforms": [
    "SEARCH",
    "MAPS",
    "SHOPPING"
  ],
  "platformImpressions": [
    {
      "platform": "SHOPPING",
      "impressionsMin": 0,
      "impressionsMax": 1000
    },
    {
      "platform": "SEARCH",
      "impressionsMin": 350000,
      "impressionsMax": 400000
    },
    {
      "platform": "MAPS",
      "impressionsMin": 0,
      "impressionsMax": 1000
    }
  ],
  "impressionsMin": 350000,
  "impressionsMax": 400000,
  "spendMin": null,
  "spendMax": null,
  "spendCurrency": null,
  "audienceSelection": {
    "demographics": "included",
    "locations": "included",
    "contextualSignals": "included"
  },
  "geoTargetIds": null,
  "geoExcludedIds": null,
  "adTextKind": "search",
  "adHeadline": "Najnowsze produkty Nike - Nike Air Max 95",
  "adDescription": "Odkryj Nike air max 95 online na Nike.com. Przeglądaj oficjalną stronę Nike. Precyzja i funkcjonalność: najlepszy sprzęt sportowy Nike dla każdego. Click & Collect. Społeczności Nike.",
  "adDisplayUrl": "nike.com/Air_Max_95",
  "adSitelinks": null,
  "adBusinessName": null,
  "adProductImageUrl": null,
  "adDestinationUrl": null,
  "youtubeVideoId": null,
  "youtubeUrl": null,
  "videoThumbnailUrl": null,
  "adTextLines": [
    "Najnowsze produkty Nike - Nike Air Max 95",
    "nike.com/Air_Max_95",
    "Odkryj Nike air max 95 online na Nike.com. Przeglądaj oficjalną stronę Nike. Precyzja i funkcjonalność: najlepszy sprzęt sportowy Nike dla każdego. Click & Collect. Społeczności Nike."
  ],
  "notCollected": [
    "imageUrl",
    "imageWidth",
    "imageHeight",
    "isPolitical",
    "politicalRegions",
    "spendMin",
    "spendMax",
    "spendCurrency",
    "geoTargetIds",
    "geoExcludedIds",
    "adSitelinks",
    "adBusinessName",
    "adProductImageUrl",
    "adDestinationUrl",
    "youtubeVideoId",
    "youtubeUrl",
    "videoThumbnailUrl"
  ],
  "note": null,
  "scrapedAt": "2026-11-17T14:57:24Z"
}
```

The summary row of the same target:

```json
{
  "rowType": "summary",
  "target": "nike.com",
  "targetType": "domain",
  "status": "ok",
  "adsDelivered": 20,
  "advertisersDelivered": 0,
  "adsTotalMin": 50000,
  "adsTotalMax": 60000,
  "matchedAdvertisers": null,
  "duplicatesSkipped": 0,
  "stoppedBy": "max_ads",
  "charged": {
    "target-checked": 1,
    "ad": 20,
    "ad-details": 20,
    "ad-text": 4
  },
  "note": null,
  "scrapedAt": "2026-11-17T14:57:27Z"
}
```

### FAQ

**Do I need a Google account, cookies or a proxy?**
No. The Actor reads what the Transparency Center shows any visitor. Nothing to log in, nothing to set up: Apify Proxy is used by default.

**How much do 1,000 ads cost?**
$1.65 on Starter, $1.55 on Scale, $1.45 on Business, $1.80 on the Free plan — plus $1.00 per 1,000 targets read. Details add $2.95, ad text $2.00 per 1,000 ads that have it.

**Am I charged for a website with no ads?**
Only the checked-target fee ($0.001 for the website): the Actor read it and its summary row says «no ads». Free: duplicates, input it cannot read, names and IDs the site does not know, and anything Google did not answer.

**Can I try it for free?**
Yes. The Free plan's $5 monthly credit pays for about 2,700 ads at the Free-plan price ($1.80 per 1,000); there is no cap of ours on top. The Actor needs nothing a Free account lacks: it runs in 512 MB through Apify Proxy's datacenter IPs. Set «Maximum cost per run» to stay inside the credit — the run stops there and says so.

**How fast is it?**
Our own runs on Apify, 17 Nov 2026, default settings (512 MB, Apify Proxy):

| Job | Ads | Whole run |
|---|---|---|
| The prefilled `nike.com` | 50 | 8 s |
| One website | 2,000 | 24–28 s (two runs) |
| 20 websites, 100 ads each | 2,000 | 17–20 s |
| 10 websites with details and ad text | 909 | 61–73 s |

The site gives 100 ads per request; a website's pages come one after another, websites and the details of each ad are read in parallel. Rows appear page by page while the run goes.

**Does Google refuse requests?**
Rarely, and the Actor retries on another IP. In our 22 Apify runs of 17 Nov 2026 it sent 7,618 requests: 64 needed a second try (HTTP 429 at 12–20 requests at once over four proxy IPs) and all were answered on it — none was lost, no target failed. Since each request got its own proxy IP: 0 retries in 1,899 requests. A target Google does not answer after six tries on two proxy routes gets a free row that says so.

**Why is the ad text `null` for many text ads?**
Google publishes most ads as a picture, so their words are not in the data. Measured on 1,409 ads of 15 websites (17 Nov 2026, Apify): ad text or the video came for 293 (21%) —

| How Google publishes the ad | Share of ads | With ad text |
|---|---|---|
| A picture (`previewType: image`; the picture is in `imageUrl`) | 69% | 0% |
| A video ad | 15% | 92% (196 of 214) |
| A Search ad with a live preview | 6% | 79% (66 of 84) |
| An image or Shopping ad with a live preview | 10% | 22% (31 of 142) |

The Actor does not run OCR on pictures — and charges ad text only for ads that came with it.

**Why are `impressionsMin` / `impressionsMax` empty?**
Google publishes «times shown» only for ads shown in the EU and for political ads, as ranges, and spend only for political ads. In the same sample 427 of 1,409 ads had them (30%); among the ads shown in an EU country, 416 of 550. Elsewhere the fields are `null`.

**A name returned the wrong company. What now?**
The site matches names by their beginning («Nike» also finds «Nike Klara»). The Actor puts first the account whose name begins with your words and has the most ads; raise or lower «Max advertisers per name», or use the brand's website — it finds the ads that lead to it, whoever runs them.

**How do I monitor a competitor's new ads?**
Schedule the run with «Shown on or after» set to a period such as `7 days`: each run then reads the ads shown in that window.

**Can I use it through the API or with AI agents?**
Yes — the Apify API, webhooks, Make, Zapier, n8n and the Apify MCP server all start it with the same input.

### Limits

- Pace: a website's ads come 100 per request, one page after another — about 100 ads a second for one website without details. With details and ad text each ad costs two more requests: about 15 ads a second at the default 12 requests at once.
- More «Requests at once» help little without details: 20 instead of 6 saved 4 seconds on 2,000 ads of 20 websites (14 s against 18 s of work).
- A name is matched the way the site does it — by the beginning of its words. Names that share no word with what you typed are not taken: the target's free row lists the nearest names the site suggests.
- The Transparency Center gives an approximate ad count («50,000–60,000»); the summary row shows it as `adsTotalMin` / `adsTotalMax`.
- No OCR of ads published as pictures, no download of image or video files (the links are in the row), no landing-page scraping, no «only new since the last run» memory.
- Political ads come through the same targets (an advertiser, a website); browsing all political ads of a country is not built.
- A pasted ad link returns that ad without `domain` and `daysShown`: those come from search results.
- The platform and date filters work together: with both set, the site returns ads shown on that platform inside those dates.

### Related scrapers

Prices on the Starter plan.

**Ads intelligence**

- [Meta Ads Library Scraper](https://apify.com/instagram-data-api/meta-ads-library-scraper) — the ads Meta's Ad Library shows for a keyword, page or link: text, media, dates, platforms, advertiser; EU reach, targeting and payer with one tick; 2,000 ads of 20 keywords in 58 s on Apify. From $0.75 / 1,000 ads.
- [LinkedIn Ad Library Scraper](https://apify.com/instagram-data-api/linkedin-ad-library-scraper) — a company's LinkedIn ads with format, headline, text, images and video; payer, run dates, EU impressions and targeting with one tick; 2,000 ads of 20 keywords in 19–28 s on Apify. From $2.40 / 1,000 ads.

**News**

- [Google News Scraper](https://apify.com/instagram-data-api/google-news-scraper) — articles by keyword, topic, place or publisher with Google's operators, 83 editions and any dates; 1,994 articles from 20 searches in 22 s on Apify. From $3.10 / 1,000 articles.

# Changelog

This Actor's version history is a separate document: https://apify.com/instagram-data-api/google-ads-transparency-scraper/changelog.md

# Actor input Schema

## `targets` (type: `array`):

One per line, any mix: a website (nike.com, or a link to any of its pages — only the domain is used) — the ads that lead to it, from any advertiser; an advertiser name (Nike, Inc.); an advertiser ID (AR16735076323512287233); or a link copied from adstransparency.google.com (an advertiser's page, one ad's page, a domain search). Duplicates are dropped before anything is read.

## `resultType` (type: `string`):

«Ads» — one row per ad. «Advertisers» — one row per advertiser account behind a name or a website (who runs Google ads, from which country, about how many): an ad-check for lead lists.

## `maxAdsPerTarget` (type: `integer`):

The newest ads first, as the site lists them. A name that matches several advertisers gets this many for each of them. You pay for delivered ads only.

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

The site's own region filter: ads shown in this country. «Anywhere» reads all regions.

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

Only ads shown inside the date window. YYYY-MM-DD, or a period through the API: «30 days», «3 months». With a start alone the window ends today.

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

The end of the date window, YYYY-MM-DD.

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

Text (Search ads), image (display and Shopping ads) or video (YouTube ads).

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

Where Google showed the ad: Search, YouTube, Shopping, Maps or Play.

## `includeAdDetails` (type: `boolean`):

One more request per ad: every variation of the creative, every region it ran in with first and last dates, Google's «times shown» ranges per region and platform (ads shown in the EU and political ads), audience choices, and spend ranges of political ads. Charged per ad whose details were delivered.

## `includeAdText` (type: `boolean`):

Reads the ad's preview: headline, description, display URL and sitelinks of Search ads; product title, merchant and product image of Shopping ads; the YouTube video and headline of video ads. Charged only for ads whose preview gave words or a video. Ads Google publishes as a picture keep their words inside the image — no OCR, no charge.

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

A name can match several advertiser accounts (a brand, its regional companies, namesakes). Accounts whose name begins with what you typed go first, the one with the most ads on top. For the ads of a brand whoever runs them, use its website instead. In «Advertisers» mode this also caps the accounts returned per website.

## `includeRawData` (type: `boolean`):

Adds a «raw» field with the Transparency Center's own objects, for debugging.

## `maxConcurrency` (type: `integer`):

How many requests run in parallel, each on its own proxy session. 12 is the measured default (no refused requests in our runs of 17 Nov 2026); lower it if a run reports failed targets.

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

Nothing to set up: Apify Proxy is used by default and the Actor switches route by itself if Google stops answering. Choose a group or your own proxies only if you need to.

## Actor input object example

```json
{
  "targets": [
    "nike.com"
  ],
  "resultType": "ads",
  "maxAdsPerTarget": 50,
  "region": "ANYWHERE",
  "adFormat": "ALL",
  "platform": "ALL",
  "includeAdDetails": false,
  "includeAdText": false,
  "maxAdvertisersPerName": 3,
  "includeRawData": false,
  "maxConcurrency": 12,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All rows of this run (JSON, CSV, Excel).

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

// Run the Actor and wait for it to finish
const run = await client.actor("instagram-data-api/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 = {
    "targets": ["nike.com"],
    "maxAdsPerTarget": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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