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

Monitor competitor Google Ads in real-time. Extract ad copy, headlines, descriptions, landing pages, keywords & creatives across industries. Perfect for competitive intelligence, ad benchmarking, keyword research & market analysis. Structured JSON output, ready to integrate.

- **URL**: https://apify.com/shahidirfan/google-ads-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** E-commerce, SEO tools, Other
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

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

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

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

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

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

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

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

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

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

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


# README

## Google Ads Transparency Scraper

Extract Google Ads Transparency Center creatives in a clean, structured dataset. Collect advertiser identifiers, creative formats, shown dates, media preview URLs, and source links for advertiser pages or domain searches. Useful for competitor monitoring, compliance review, and ad-library research.

### Features

- **Advertiser lookups** — Collect creatives for a specific advertiser ID
- **Domain searches** — Gather creatives tied to a brand or website domain
- **Filtered start URLs** — Reuse a working Transparency Center URL as your input
- **Clean datasets** — Duplicate records, null values, and empty fields are handled automatically
- **Media extraction** — Capture preview image or video URLs when available
- **Extended collection** — Large domain searches are expanded with date-window queries to go beyond a single `100`-result window

### Use Cases

#### Competitive Monitoring
Track which creatives a competitor is running and how long they stay active. Use the dataset to compare messaging, formats, and launch timing across advertisers.

#### Brand Safety Review
Inspect ads associated with a domain or advertiser before partnership, placement, or compliance decisions. Review public creative assets without manual browsing.

#### Market Research
Build a dataset of active ad creatives for category analysis. Compare how brands vary their formats and refresh campaigns over time.

#### Creative Audits
Export preview assets and shown dates for internal review. This is useful when you need a structured archive of ads instead of screenshots and manual notes.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | String | No | — | Full Transparency Center URL. Useful for advertiser pages or domain searches with built-in filters. |
| `advertiserId` | String | No | — | Google advertiser ID such as `AR03056092225806008321`. |
| `domain` | String | No | — | Domain search such as `nike.com`. |
| `results_wanted` | Integer | No | `20` | Maximum number of records to collect for the run. Domain searches can extend beyond `100` by querying additional date windows. |
| `max_pages` | Integer | No | `5` | Retained for compatibility. It is ignored by the current implementation. |
| `proxyConfiguration` | Object | No | Residential | Optional proxy settings for network routing. |

---

### Output Data

Each item in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `creative_id` | String | Unique identifier for the ad creative |
| `advertiser_id` | String | Google advertiser ID |
| `advertiser_name` | String | Advertiser name when available in the source data |
| `format` | String | Creative format such as Text, Image, Video, or HTML5 |
| `first_shown_date` | String | First observed shown date in `YYYY-MM-DD` format |
| `last_shown_date` | String | Most recent shown date in `YYYY-MM-DD` format |
| `landing_domain` | String | Destination domain associated with the creative when available |
| `image_url` | String | Preview image URL when the creative exposes one |
| `video_url` | String | Preview video URL when the creative exposes one |
| `details_link` | String | Direct link to the creative details page |
| `region_filter` | String | Region code used for the query when applicable |
| `source_url` | String | Transparency Center URL used as the source for the result |

---

### Usage Examples

#### Advertiser Run

Collect creatives for one advertiser:

```json
{
    "advertiserId": "AR03056092225806008321",
    "results_wanted": 20
}
````

#### Domain Run

Collect creatives associated with a domain:

```json
{
    "domain": "nike.com",
    "results_wanted": 50
}
```

#### Start URL Run

Reuse a working Transparency Center URL directly:

```json
{
    "startUrl": "https://adstransparency.google.com/advertiser/AR03056092225806008321?region=anywhere",
    "results_wanted": 20
}
```

***

### Sample Output

```json
{
    "creative_id": "CR17653238703880929281",
    "advertiser_id": "AR03056092225806008321",
    "advertiser_name": "SoftwareOne",
    "format": "Video",
    "first_shown_date": "2026-05-17",
    "last_shown_date": "2026-06-25",
    "video_url": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?client=ads-integrity-transparency",
    "details_link": "https://adstransparency.google.com/advertiser/AR03056092225806008321/creative/CR17653238703880929281",
    "source_url": "https://adstransparency.google.com/advertiser/AR03056092225806008321?region=anywhere"
}
```

***

### Tips for Best Results

#### Start With Working Inputs

- Use a confirmed advertiser page or domain search first
- Keep `results_wanted` at `20` while validating a new target

#### Increase Coverage Carefully

- Raise `results_wanted` only after confirming data quality
- Large domain searches may require multiple internal date windows to reach the requested count

#### Expect Field Variation

- Some creatives only expose `image_url`
- Some creatives only expose `video_url`
- Text-heavy creatives may not provide preview media

***

### Integrations

Connect your data with:

- **Google Sheets** — Review creatives in a spreadsheet
- **Airtable** — Build a searchable ad archive
- **Make** — Automate monitoring workflows
- **Zapier** — Trigger alerts when new data appears
- **Webhooks** — Send results into your own systems

#### Export Formats

- **JSON** — For APIs and structured pipelines
- **CSV** — For spreadsheet analysis
- **Excel** — For reporting
- **XML** — For broader system integration

***

### Frequently Asked Questions

#### What inputs are supported?

You can run the actor with a full Transparency Center URL, an advertiser ID, or a domain.

#### How many records can I collect?

The currently verified response window returns up to `100` records per query.

#### Why is `image_url` or `video_url` missing on some items?

Preview media depends on the creative type. Some records expose only one media format, and some expose neither.

#### Does the actor remove duplicates?

Yes. Records are deduplicated by `creative_id` before they are written.

#### Why are some fields missing from certain records?

The Transparency Center does not expose the same fields for every creative. Empty and null values are omitted from output.

***

### Support

For issues or feature requests, use the Apify Console issue tracker or contact support.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/schedules)

***

### Legal Notice

This actor is intended for legitimate research, monitoring, and compliance use cases. Users are responsible for ensuring their use complies with platform terms and applicable law.

# Actor input Schema

## `startUrl` (type: `string`):

Full adstransparency.google.com URL to scrape. Examples: advertiser page, domain search, or keyword search. Overrides all other fields if provided.

## `advertiserId` (type: `string`):

Google Advertiser ID (e.g. AR03056092225806008321). Used if no Start URL is provided.

## `domain` (type: `string`):

Search by advertiser domain (e.g. 'nike.com'). Used if no Start URL or Advertiser ID provided.

## `results_wanted` (type: `integer`):

Maximum number of ads to collect.

## `max_pages` (type: `integer`):

Safety cap on the number of pages to visit.

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

Use Apify Proxy for reliable scraping. Residential proxies recommended.

## Actor input object example

```json
{
  "startUrl": "https://adstransparency.google.com/advertiser/AR03056092225806008321?region=anywhere",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrl": "https://adstransparency.google.com/advertiser/AR03056092225806008321?region=anywhere",
    "results_wanted": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/google-ads-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrl": "https://adstransparency.google.com/advertiser/AR03056092225806008321?region=anywhere",
    "results_wanted": 20,
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrl": "https://adstransparency.google.com/advertiser/AR03056092225806008321?region=anywhere",
  "results_wanted": 20
}' |
apify call shahidirfan/google-ads-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Ads Scraper",
        "description": "Monitor competitor Google Ads in real-time. Extract ad copy, headlines, descriptions, landing pages, keywords & creatives across industries. Perfect for competitive intelligence, ad benchmarking, keyword research & market analysis. Structured JSON output, ready to integrate.",
        "version": "0.0",
        "x-build-id": "heR3fdfxpwte8go3z"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~google-ads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-google-ads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~google-ads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-google-ads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~google-ads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-google-ads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrl": {
                        "title": "Start URL",
                        "type": "string",
                        "description": "Full adstransparency.google.com URL to scrape. Examples: advertiser page, domain search, or keyword search. Overrides all other fields if provided."
                    },
                    "advertiserId": {
                        "title": "Advertiser ID",
                        "type": "string",
                        "description": "Google Advertiser ID (e.g. AR03056092225806008321). Used if no Start URL is provided."
                    },
                    "domain": {
                        "title": "Domain",
                        "type": "string",
                        "description": "Search by advertiser domain (e.g. 'nike.com'). Used if no Start URL or Advertiser ID provided."
                    },
                    "results_wanted": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of ads to collect.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Max pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Safety cap on the number of pages to visit.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for reliable scraping. Residential proxies recommended.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
