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

Extract text, image and video ads from Google Ads, scraped from the ad library provided by Google Ads Transparency Center. Gain access to ad details, ad copy, locations, and more. Dive deeper into the Google Ads Transparency Center for a competitive edge.

- **URL**: https://beta-securitybyobscurity.apify.com/silva95gustavo/google-ads-scraper.md
- **Developed by:** [Gustavo Silva (Coherent Paradox)](https://beta-securitybyobscurity.apify.com/silva95gustavo) (community)
- **Categories:** Social media, E-commerce, Other
- **Stats:** 2,187 total users, 183 monthly users, 100.0% runs succeeded, 106 bookmarks
- **User rating**: 4.77 out of 5 stars

## Pricing

$30.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.
You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

# README

## Google Ads Scraper

### 🔎 What is Google Ads Scraper?

It's a simple and powerful tool that allows you to extract data from Google Ads by reading data from its official public Ad Library named [Google Ads Transparency Center](https://adstransparency.google.com/).

To get that data, just insert the intended URL from [Google Ads Transparency Center](https://adstransparency.google.com/) and click "Save & Start" button.

### 📊 What Google ads data can I extract?

All ad formats are supported by this Google Ads API, meaning that it can extract text, image or video ads.
With this API, you will be able to extract the following data:

- Ad format
- Preview image URL
- Geo regions where the ad is displayed
- Ad variations
- Headline
- Description
- Call-to-action button
- Image URL for image ads
- Video URL for video ads
- Number of impressions (with breakdown by region and platform)

### 📖 How to use

#### ⬇️ Input

The input for the Google Ads Scraper should be a Google Ads Transparency Center URL after a specific advertiser is selected.
It is important to ensure that the input URL starts with `https://adstransparency.google.com/advertiser/AR<advertiser_id>/...`.
Example:

```json
{
    "startUrls": [
        {
            "url": "https://adstransparency.google.com/advertiser/AR08888592736429539329?authuser=0&region=ES&preset-date=Last+30+days"
        }
    ]
}
```

You can obtain an input start URL in one of two ways:

**Option 1 - searching for an advertiser or domain directly:**

1. Using the search feature of Google Ads Transparency Center, write the name of your advertiser.
2. From the search dropdown, choose a result that corresponds to a single advertiser or a domain name. **Do not select any entry mentioning that "multiple advertiser accounts have a similar name"**.
3. Copy the current browser URL and use it as input in this scraper.

![searching for an advertiser or domain directly](https://i.postimg.cc/RVWyrZ4S/searching-for-an-advertiser-or-domain-directly.png)

**Option 2 - selecting an advertiser from the list of ads:**

1. Search for ads from the advertiser you are interested in.
2. In the list view, click the intended advertiser name, which should be displayed at the bottom of the card corresponding to each ad.
3. Copy the current browser URL and use it as input in this scraper.

![selecting an advertiser from the list of ads](https://i.postimg.cc/MGf1xgXj/selecting-an-advertiser-from-the-list-of-ads.png)

#### ⬆️ Output

The extracted ad data is stored in a dataset, accessible in the **Storage** tab. It’s available in **JSON, JSONL, Excel, HTML, CSV, or XML** and allows seamless integration with tools like **Clay, ChatGPT, or your automation workflows**.

Each item will contain an ad, as shown in the following example:

```json
{
    "advertiserId": "AR09717407487665111041",
    "advertiserName": "Facebook Technologies, LLC",
    "creativeId": "CR12606781830503333889",
    "format": "IMAGE",
    "previewUrl": "https://tpc.googlesyndication.com/archive/simgad/17685446209999002958",
    "regionStats": [
        {
            "regionCode": "DE",
            "regionName": "Germany",
            "firstShown": "2023-07-04",
            "lastShown": "2024-05-17",
            "impressions": {
                "lowerBound": 1000,
                "upperBound": 2000
            },
            "surfaceServingStats": [
                {
                    "surfaceCode": "YOUTUBE",
                    "surfaceName": "YouTube",
                    "impressions": {
                        "lowerBound": 1000,
                        "upperBound": 2000
                    }
                },
                {
                    "surfaceCode": "SEARCH",
                    "surfaceName": "Google Search",
                    "impressions": {
                        "lowerBound": 0,
                        "upperBound": 1000
                    }
                }
            ]
        }
    ],
    "startUrl": "https://adstransparency.google.com/?authuser=0&region=DE&domain=facebook.com",
    "variations": [
        {
            "description": "Get the guide to\ndiscover how VR can\nhelp to bring your\nwildest ideas to life.",
            "headline": "Download Your\nFree Guide",
            "imageUrl": "https:/tpc.googlesyndication.com/archive/sadbundle/$csp%3Darchive$/7713083310730891859/2j0c2fr49kkzz.jpeg"
        },
        {
            "description": "Get the guide to\ndiscover how VR can\nhelp to bring your\nwildest ideas to life.",
            "headline": "5 Fresh Creative\nInsights",
            "imageUrl": "https:/tpc.googlesyndication.com/archive/sadbundle/$csp%3Darchive$/3729438442968006029/2j0c2fr49kkzz.jpeg"
        },
        {
            "description": "Solve your top 5 creative\nchallenges with VR",
            "headline": "Download Your\nFree Guide",
            "imageUrl": "https:/tpc.googlesyndication.com/archive/sadbundle/$csp%3Darchive$/10516008805262833060/24mluwkpkorv3.jpeg"
        }
    ]
}
```

### ❓ Frequently Asked Questions (FAQs)

#### How many ads can you scrape with Google Ads Scraper?

As many as you can imagine! This scraper has an unlimited appetite for ads, and it will automatically scroll down the list of results until it reaches the end.
Happy scraping and may your data flow freely! 🚀😄

#### Why am I missing some ads in the results?

If you notice that some ads are missing, try running a search in an incognito/private browsing window. If the missing ads are age-restricted, they won’t appear unless you’re logged in. Since the scraper runs without authentication by default, these ads won’t be included.

If the issue persists and isn’t related to age restrictions, please report it via the [Issues](https://apify.com/silva95gustavo/google-ads-scraper/issues) tab. Most issues are resolved within 24 hours.

#### What types of ads and data does the scraper extract?

Google Ads Scraper extracts all types of ads—text, image, and video ads—along with all relevant data, including ad copy, advertiser details, locations, and more. If you notice that something is missing, please report it via the [Issues](https://apify.com/silva95gustavo/google-ads-scraper/issues) tab, and we’ll look into it.

#### Can I integrate this scraper with Clay?

Yes! You can integrate Google Ads Scraper with Clay to automatically pull ad data into your Clay workflows. Clay users can connect the scraper via Apify’s API and retrieve ad insights directly into their automation.

To set up Google Ads Scraper with Clay, follow [this official Clay guide on integrating Apify](https://www.clay.com/university/guide/apify-integration-overview).

Watch our step-by-step video tutorial to learn how to:

- Connect Google Ads Scraper to your Clay workspace
- Set up automated data collection
- Transform and analyze your ad data in Clay
- Create powerful automations with your ad insights

https://youtu.be/b-O50P8UKW4

If you need help integrating Google Ads Scraper with Clay, feel free to open an issue via the [Issues](https://apify.com/silva95gustavo/google-ads-scraper/issues) tab, and we'll be happy to assist!

#### Is this the best Google Ads Scraper for you?

This is the fastest, most cost-effective, and most complete Google Ads Scraper available. It provides more data per ad at a lower cost per result than any alternative.

If you have any concerns or questions before subscribing, feel free to [reach out through any contact method listed in our profile](https://apify.com/silva95gustavo) — we’ll be happy to clarify anything! Most questions, issues, and feature requests are handled in less than 24 hours.

#### Is it legal to scrape Google Ads data?

Scraping Google Ads is legal as long as you adhere to regulations concerning scraping, copyright and personal data.

If you're unsure whether your reason is legitimate, consult your lawyers. You should not scrape data unless you have a legitimate reason to do so. You can also read [Apify's blog post on the legality of web scraping and ethical scraping](https://blog.apify.com/is-web-scraping-legal/).

### 👥 Scrape LinkedIn Ads

If you are also interested in scraping ads from LinkedIn, please check our [LinkedIn Ads Scraper](https://apify.com/silva95gustavo/linkedin-ad-library-scraper).

### 🎵 Scrape TikTok Ads

Looking to extract ads from TikTok as well? Try our [TikTok Ads Scraper](https://apify.com/silva95gustavo/tiktok-ads-scraper).

### 💬 Your feedback

Let us know if you have any feedback or feature requests through the [Issues](https://apify.com/silva95gustavo/google-ads-scraper/issues) tab. Your input helps drive future improvements.

# Actor input Schema

## `startUrls` (type: `array`):

A list of Google Ads Transparency Center URLs after a specific advertiser or domain is selected. Each URL must start with "https://adstransparency.google.com/..."

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

Select proxies to be used.

## `resultsLimit` (type: `integer`):

Maximum number of results per input URL. Due to the concurrent nature of the actor, the actual number of requests may exceed the configured maximum.

## `shouldDownloadAssets` (type: `boolean`):

Defines if the scraper should download creative assets (such as video ads) when the original URLs scraped have short expiry dates. This allows for more permanent storage of the files. Disclaimer: use this option with caution to avoid downloading excessive data from Google, which could be considered abusive.

## `shouldDownloadPreviews` (type: `boolean`):

Defines if the scraper should download creative previews as an HTML file, ensuring that the output field `previewUrl` is always populated. Enabling this option may slightly increase costs due to writes to a key-value store.

## `ocr` (type: `boolean`):

Enables OCR (Optical Character Recognition) using AI for text ads, allowing the scraper to extract text from images in text ads. This is useful for ads that do not have text content directly available as copyable text. Note: Enabling OCR will significantly slow down the scraping speed. OCR is not perfect and may miss or misread some text.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://adstransparency.google.com/advertiser/AR08888592736429539329?authuser=0&region=ES&preset-date=Last+30+days"
    }
  ],
  "proxyConfiguration": {
    "apifyProxyGroups": [],
    "useApifyProxy": true
  },
  "shouldDownloadAssets": false,
  "shouldDownloadPreviews": false,
  "ocr": false
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://adstransparency.google.com/advertiser/AR08888592736429539329?authuser=0&region=ES&preset-date=Last+30+days"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("silva95gustavo/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 = { "startUrls": [{ "url": "https://adstransparency.google.com/advertiser/AR08888592736429539329?authuser=0&region=ES&preset-date=Last+30+days" }] }

# Run the Actor and wait for it to finish
run = client.actor("silva95gustavo/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 '{
  "startUrls": [
    {
      "url": "https://adstransparency.google.com/advertiser/AR08888592736429539329?authuser=0&region=ES&preset-date=Last+30+days"
    }
  ]
}' |
apify call silva95gustavo/google-ads-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Ads Scraper",
        "description": "Extract text, image and video ads from Google Ads, scraped from the ad library provided by Google Ads Transparency Center. Gain access to ad details, ad copy, locations, and more. Dive deeper into the Google Ads Transparency Center for a competitive edge.",
        "version": "3.3",
        "x-build-id": "b46LvDBsXMHp0zrB7"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/silva95gustavo~google-ads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-silva95gustavo-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/silva95gustavo~google-ads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-silva95gustavo-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/silva95gustavo~google-ads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-silva95gustavo-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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "A list of Google Ads Transparency Center URLs after a specific advertiser or domain is selected. Each URL must start with \"https://adstransparency.google.com/...\"",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Select proxies to be used.",
                        "default": {
                            "apifyProxyGroups": [],
                            "useApifyProxy": true
                        }
                    },
                    "resultsLimit": {
                        "title": "Results limit",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of results per input URL. Due to the concurrent nature of the actor, the actual number of requests may exceed the configured maximum."
                    },
                    "shouldDownloadAssets": {
                        "title": "Should download assets?",
                        "type": "boolean",
                        "description": "Defines if the scraper should download creative assets (such as video ads) when the original URLs scraped have short expiry dates. This allows for more permanent storage of the files. Disclaimer: use this option with caution to avoid downloading excessive data from Google, which could be considered abusive.",
                        "default": false
                    },
                    "shouldDownloadPreviews": {
                        "title": "Should download previews?",
                        "type": "boolean",
                        "description": "Defines if the scraper should download creative previews as an HTML file, ensuring that the output field `previewUrl` is always populated. Enabling this option may slightly increase costs due to writes to a key-value store.",
                        "default": false
                    },
                    "ocr": {
                        "title": "Use OCR for text ads",
                        "type": "boolean",
                        "description": "Enables OCR (Optical Character Recognition) using AI for text ads, allowing the scraper to extract text from images in text ads. This is useful for ads that do not have text content directly available as copyable text. Note: Enabling OCR will significantly slow down the scraping speed. OCR is not perfect and may miss or misread some text.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
