# Google Ads Transparency Scraper + LinkedIn Ad Library API (`johnveds15/ad-library-competitor-ads`) Actor

Scrape any competitor's ads from the Google Ads Transparency Center (Search, Display, YouTube) and the LinkedIn Ad Library: advertiser, format, ad text, image/video, first and last shown, days running, regions. Search by name, domain or advertiser ID. No login, no browser. $1 per 1,000 ads.

- **URL**: https://apify.com/johnveds15/ad-library-competitor-ads.md
- **Developed by:** [John Vedovino II](https://apify.com/johnveds15) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 40.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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.

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

## Competitor Ad Library Scraper — Google Ads Transparency + LinkedIn

**Every ad your competitors run on Google (Search, Display, YouTube) and LinkedIn, pulled from the public ad-transparency libraries: advertiser, format, ad text, headline, image or video, first and last shown, days running, and the regions it ran in.** Search by company name, domain or Google advertiser id. Plain HTTP: no browser, no login, no API key. $1 per 1,000 ads.

### Why it is cheap

Google's Ads Transparency Center loads its results from its own JSON endpoints, and LinkedIn's Ad Library is server-rendered HTML. This Actor calls those directly, so it never starts a headless browser and never chains other Actors. One request returns up to 40 Google ads or about 24 LinkedIn ads.

### What you get

| Field | Source | Notes |
|---|---|---|
| `competitor` | both | The input line this row came from. |
| `source` | both | `google` or `linkedin`. |
| `advertiser`, `advertiserId` | both | Google's id looks like `AR…`. |
| `creativeId` / `adId` | google / linkedin | Stable ad id. |
| `format` | both | Google: `text` · `image` · `video`. LinkedIn: e.g. `Single Image Ad`, `Video Ad`. |
| `firstShown`, `lastShown`, `daysRunning` | google | `daysRunning` is the quickest signal of a winning ad: advertisers stop paying for ads that lose. |
| `regions[]` | google, with details on | Each region the ad ran in and the last date it ran there. |
| `adText`, `headline`, `adTextTruncated` | linkedin | `adTextFull` adds the untruncated text when details are on. |
| `imageUrl(s)`, `previewUrl` | both | Creative image, or the video preview. |
| `adUrl` | both | The ad's own page in the public library. |
| `advertiserUrl`, `paidBy` | linkedin, with details on | The advertiser's LinkedIn page and its "Paid for by" entity. |

### A real record

From a live run on 2026-10-04 (input `Salesforce`, LinkedIn):

```json
{
  "competitor": "Salesforce",
  "source": "linkedin",
  "adId": "1630842716",
  "advertiser": "Salesforce",
  "format": "Single Image Ad",
  "creativeType": "SPONSORED_STATUS_UPDATE",
  "headline": "「Salesforceの営業はチーム戦。だから成長できる」。IT未経験から常務執行役員になったリーダーのキャリア論",
  "adTextTruncated": true,
  "adUrl": "https://www.linkedin.com/ad-library/detail/1630842716"
}
```

And a Google row from the same day (input `hubspot.com`, region US, details on): format `text`, `firstShown 2026-07-31`, `lastShown 2026-10-04`, `daysRunning 66`, run in 6 regions.

### How to use it

- **Competitor swipe file:** list 5–20 competitors, run weekly, sort by `daysRunning` — the long-running ads are the ones that pay.
- **New-campaign alert:** schedule daily and diff `creativeId` / `adId` against yesterday's dataset.
- **Agency pitch deck:** one run per prospect's top three competitors, exported to CSV.
- **n8n / Make / Zapier:** call the run-sync endpoint and read the dataset.

### Inputs

| Input | Default | Notes |
|---|---|---|
| `competitors` | `["hubspot.com"]` | One per line: a domain (`hubspot.com`), a company name (`Salesforce`) or a Google advertiser id (`AR…`). Up to 50. |
| `sources` | google | Add `linkedin` together with a RESIDENTIAL proxy (see Limits). |
| `maxAdsPerSource` | 40 | Caps rows and cost per competitor per library. |
| `googleRegion` | anywhere | ISO country code such as `US` or `GB`. |
| `linkedinCountries`, `linkedinDateOption` | all, any | LinkedIn's own filters. |
| `linkedinExactAdvertiser` | true | Keeps only ads whose advertiser name contains the competitor's name. LinkedIn's search is loose without it. |
| `includeDetails` | false | One extra request per ad: Google regions, full LinkedIn text, paid-by. Slower. |
| `proxyConfiguration` | off | Needed for LinkedIn (RESIDENTIAL group); for Google only if the log says `blocked`. |

### Pricing (pay per event)

| Event | Price |
|---|---|
| Ad pushed to the dataset | $0.001 each — **$1 per 1,000 ads** |

No start fee. Searches that fail, are blocked or find nothing are not charged. Example: 10 competitors × 40 Google ads = 400 ads = **$0.40**.

### Limits, stated plainly

- **Meta (Facebook/Instagram) is not covered.** Meta's Ad Library API needs a token tied to an identity-verified Facebook account, and its web page is a JavaScript app. It is left out rather than done badly.
- **LinkedIn refuses Apify's datacenter IPs.** From the platform, LinkedIn answered HTTP 403 both with no proxy and with the datacenter proxy (tested 2026-10-04); from a home connection it answers normally. Use the RESIDENTIAL proxy group for LinkedIn; residential proxy traffic is billed by Apify on top of the per-ad price. A blocked LinkedIn search is logged and not charged.
- **Google rate-limits by IP.** Requests are paced at least 3 seconds apart per site and that cannot be changed, but Google still returns HTTP 429 to an address that has made many searches. When it does, that search is logged `blocked`, is not charged, and the Actor moves on. Turn on the proxy input for big runs.
- A domain search on Google returns ads that point at that domain, which can include resellers and affiliates. Search by company name or advertiser id to get only the brand's own ads.
- Both libraries can change their format without notice. Every field is read defensively (a change gives `null`, not a crash) and the parsers are tested against pinned fixtures from the 2026-10-04 live responses.
- These are public transparency libraries, but each platform has its own terms on reuse of the data. Check them before you resell it.

### More Actors by johnveds15

Same pay-per-result pricing, same JSON/CSV output, no login needed:

- [SEC Form D funding rounds](https://apify.com/johnveds15/sec-form-d-funding-rounds)
- [FMCSA new trucking carrier leads](https://apify.com/johnveds15/fmcsa-new-carrier-leads)
- [US building permit leads, 6 cities](https://apify.com/johnveds15/us-building-permit-leads)
- [Google Flights fares and price history](https://apify.com/johnveds15/google-flights-fares)

# Actor input Schema

## `competitors` (type: `array`):

One per line: a company name (HubSpot), a website domain (hubspot.com) or a Google advertiser id (AR13611357312189988865). Names and domains are searched on both libraries; an AR id is Google-only. Up to 50.

## `sources` (type: `array`):

Which public ad libraries to search. LinkedIn refuses Apify datacenter IPs (403, tested 2026-10-04): add LinkedIn only together with a RESIDENTIAL proxy group below.

## `maxAdsPerSource` (type: `integer`):

Caps rows and cost. Newest ads come first.

## `googleRegion` (type: `string`):

Only ads shown in this country: a 2-letter code (US, GB, DE, ...) or a Google geo id (2840). 'anywhere' = all regions.

## `linkedinCountries` (type: `array`):

2-letter codes (US, GB, ...). Empty = all countries.

## `linkedinDateOption` (type: `string`):

Only ads that ran in this window.

## `linkedinExactAdvertiser` (type: `boolean`):

LinkedIn's advertiser search is fuzzy (searching 'hubspot' also returns partners and people promoting their own posts). On = keep only ads whose advertiser name contains the competitor name. Off = keep everything LinkedIn returns.

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

One extra request per ad: Google adds the regions each ad ran in (with the last-shown date per region) and its variation count; LinkedIn adds the full ad text, the advertiser's company page and the 'Paid for by' entity. Slower; same price.

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

Off by default: Google answers plain requests. LinkedIn needs the RESIDENTIAL group (datacenter IPs get 403). Also turn on if Google reports 'blocked' on a large run.

## Actor input object example

```json
{
  "competitors": [
    "hubspot.com"
  ],
  "sources": [
    "google"
  ],
  "maxAdsPerSource": 40,
  "googleRegion": "anywhere",
  "linkedinCountries": [],
  "linkedinDateOption": "any",
  "linkedinExactAdvertiser": true,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per ad: source (google / linkedin), competitor, advertiser, format, text, headline, image, first/last shown, link to the ad in the public library.

## `summary` (type: `string`):

searches, outcomes (ok / no-results / blocked / error), ads pushed and the pay-per-event count charged this run.

# 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 = {
    "competitors": [
        "hubspot.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnveds15/ad-library-competitor-ads").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 = { "competitors": ["hubspot.com"] }

# Run the Actor and wait for it to finish
run = client.actor("johnveds15/ad-library-competitor-ads").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 '{
  "competitors": [
    "hubspot.com"
  ]
}' |
apify call johnveds15/ad-library-competitor-ads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,johnveds15/ad-library-competitor-ads"
        }
    }
}
```

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/bkcCqWC2U8eGrb0l6/builds/9WN9Z9oBUgWcAdkdh/openapi.json
