# Google Ads Transparency Scraper — Ad Spy & EU DSA Spend (`ttyan0111/google-ads-transparency-spy`) Actor

Hybrid Proxy/Direct RPC Google Ads Transparency Center & EU DSA ad spend scraper. Accepts domains, URLs, brand names, or AR advertiser IDs and extracts creative previews, active days, Winning Ads filter, EU impression stats, agentSummary, and RUN_SUMMARY for AI agents.

- **URL**: https://apify.com/ttyan0111/google-ads-transparency-spy.md
- **Developed by:** [Truong Truong Giang](https://apify.com/ttyan0111) (community)
- **Categories:** Lead generation, Automation, Agents
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 ad creative 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 Spy & EU Ad Spend API \[MCP Ready]

Smart **Hybrid Proxy/Direct RPC Google Ads Transparency Center** scraper engineered for **marketing agencies, Clay/n8n/Make workflows, and AI agents (via Apify MCP Server)**.

### Why Agencies & AI Agents Switch to This Actor

Most Google Ads Transparency scrapers fail silently (`{}`) when given brand names instead of `AR...` IDs, crash on `429` rate limits from tiny shared proxy pools, or drown LLM context windows in raw Google Protobuf keys. This Actor solves all three:

1. **Forgiving Smart Input Resolver:** Pass competitor domains (`shopify.com`), full URLs (`https://www.hubspot.com/pricing`), plain brand names (`Nike`), or Advertiser IDs (`AR01625195283841286145`). The 2-step resolver handles everything automatically.
2. **All-Inclusive Flat Pricing & EU DSA Spend Data:** Every ad automatically includes active duration (`daysActive`), `isWinningAd` flag (`30+` days active), preview image/render URLs, regional targeting breakdown, and EU DSA impression ranges when available.
3. **Token-Optimal Agent-First Output (`RUN_SUMMARY` + `agentSummary`):** Clean, flat JSON records ready for spreadsheets or LLM tool calls, plus an automatic `RUN_SUMMARY` file in the Key-Value Store summarizing format mix, top advertisers, and longest-running winning ads.
4. **Hybrid Dual-Path Transport (`Proxy <-> Direct IP Failover`):** Uses direct official JSON RPC endpoints (`SearchCreatives` + `GetCreativeById`, avoiding heavy 146KB `content.js` renders that rate-limit after 1–2 requests), rotates Apify Proxy when enabled, and fails over smoothly to Direct container IPs if Free-plan proxy limits or `429` spikes occur.

***

### Use with AI Agents (Claude Desktop, Cursor, Antigravity via MCP)

Connect Apify's hosted MCP server (`https://mcp.apify.com`) and call this Actor directly from your AI assistant with natural-language prompts:

> *"Find active winning Google and YouTube ads for shopify.com and Nike in Germany (`DE`) and summarize their formats and EU reach."*

***

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `queries` | `string[]` | `["shopify.com"]` | Domains, full URLs, brand names, or `AR...` Advertiser IDs |
| `countryCode` | `string` | `"US"` | `ALL`, `US`, `GB`, `DE`, `FR`, `CA`, `AU`, `SG`, `MY`, `VN`, etc. |
| `adFormat` | `string` | `"ALL"` | `ALL`, `TEXT`, `IMAGE`, or `VIDEO` |
| `minDaysActive` | `integer` | `0` | Filter to proven winning ads active at least `N` days |
| `includeDetails` | `boolean` | `true` | Fetch all ad variants, regions, and EU DSA impression ranges |
| `maxAdsPerQuery` | `integer` | `25` | Max unique ads returned per query (`1–5000`) |
| `proxyConfiguration` | `object` | `{"useApifyProxy": true}` | Recommended IP rotation with automatic Direct IP failover |

***

### Output Schema (Sample Record)

```json
{
  "query": "shopify.com",
  "resolvedType": "domain",
  "advertiserId": "AR01625195283841286145",
  "advertiserName": "Shopify Inc.",
  "advertiserDomain": "shopify.com",
  "creativeId": "CR16824520013883899905",
  "format": "TEXT",
  "firstShownAt": "2023-01-02T08:00:00.000Z",
  "lastShownAt": "2026-11-26T12:27:15.000Z",
  "daysActive": 1424,
  "isWinningAd": true,
  "variantsCount": 3,
  "previewImageUrl": "https://tpc.googlesyndication.com/archive/simgad/14519626597608049423",
  "previewImageUrls": ["https://tpc.googlesyndication.com/archive/simgad/14519626597608049423"],
  "previewRenderUrls": [],
  "euImpressionsMin": 1000,
  "euImpressionsMax": 2000,
  "euImpressionsRange": "1,000 - 2,000",
  "countryCodeFilter": "US",
  "transparencyUrl": "https://adstransparency.google.com/advertiser/AR01625195283841286145/creative/CR16824520013883899905?region=US",
  "agentSummary": "Shopify Inc. (shopify.com) · TEXT ad CR16824520013883899905 · active 1424d · EU reach 1,000 - 2,000"
}
```

### Pricing & Notes

- Transparent **Pay-per-Event** pricing (`apify-actor-start` + `ad-scraped` per ad + `ad-detail-enriched` when extracting variants & EU DSA impression stats).
- Note on Text Ads: Google Ads Transparency renders many Search/Text creatives as static `simgad` PNG previews or binary `content.js` render bundles rather than raw copyable text strings; direct preview URLs are returned cleanly for visual inspection or downstream OCR.

# Actor input Schema

## `queries` (type: `array`):

List of competitor domains (e.g. 'shopify.com'), full URLs, brand names (e.g. 'Nike'), or Advertiser IDs ('AR...'). Smart resolver handles all formats automatically.

## `countryCode` (type: `string`):

Filter ads shown in a specific country (ISO 2-letter code, or ALL for worldwide).

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

Filter by creative format returned by Google Ads Transparency Center.

## `minDaysActive` (type: `integer`):

Keep only proven winning ads that have remained active for at least N days (0 = include all).

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

Enrich every ad via LookupService/GetCreativeById to include all variants, preview URLs, regional targeting, and EU DSA impression ranges.

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

Maximum number of ads to extract per query item.

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

Automatically rotates Apify Proxy IPs against Google 429 rate limits and fails over seamlessly to direct container connections if Free-plan proxy access is unavailable or rate-limited.

## Actor input object example

```json
{
  "queries": [
    "shopify.com"
  ],
  "countryCode": "US",
  "adFormat": "ALL",
  "minDaysActive": 0,
  "includeDetails": true,
  "maxAdsPerQuery": 25,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Structured advertiser creatives with format, active days, Winning Ad flags, preview URLs, and EU DSA reach stats.

## `runSummary` (type: `string`):

Aggregate ad format breakdown, query resolution summary, and top winning ads in Key-Value Store.

# 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 = {
    "queries": [
        "shopify.com"
    ],
    "maxAdsPerQuery": 25,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ttyan0111/google-ads-transparency-spy").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 = {
    "queries": ["shopify.com"],
    "maxAdsPerQuery": 25,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("ttyan0111/google-ads-transparency-spy").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 '{
  "queries": [
    "shopify.com"
  ],
  "maxAdsPerQuery": 25,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call ttyan0111/google-ads-transparency-spy --silent --output-dataset

```

## MCP server setup

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

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/f8e3sTjXNbBejthf6/builds/kFxYalKgS7k7117sW/openapi.json
