# Brand Ads Spy — Google + LinkedIn Ads in One Feed (`tactful_anvil/brand-ads-cross-network-spy`) Actor

Search a brand once, get its ads from Google Ads Transparency AND the LinkedIn Ad Library in one normalized feed: creatives, ad copy, formats, run dates, isNew flag, monitor mode. HTTP-only, no login. $1.20/1,000 ads.

- **URL**: https://apify.com/tactful\_anvil/brand-ads-cross-network-spy.md
- **Developed by:** [Mr Zack](https://apify.com/tactful_anvil) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 ad results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Brand Ads Spy — Google + LinkedIn Ads in One Feed

Every other ad-spy actor covers **one** network. Real competitor research doesn't work that way: you open Google's Ads Transparency Center, then the LinkedIn Ad Library, search the same brand twice and stitch the results together by hand.

This Actor does that stitching for you. **One query — e.g. `hubspot` — returns that brand's ads from both networks in one normalized feed**: same columns, same `isNew` logic, same monitor mode. **$1.20 per 1,000 ads**, HTTP-only, no login, no API key, no browser, no proxies.

### Who this is for

- **Media buyers & growth marketers** — see a competitor's whole cross-network presence in one run: what they push on Google Search/Display vs what they run for B2B on LinkedIn.
- **B2B marketing agencies** — pitch decks with a prospect's real ad footprint across networks, generated in one scheduled job.
- **Creative strategists** — track when a brand launches a new campaign wave (`isNew=true` rows land on both networks within days of each other).
- **AI agents (MCP)** — *"what ads is brand X currently running, on which networks?"* becomes one tool call.

### Output (one row per ad)

| Field | Description |
|---|---|
| `network` | `google` or `linkedin` |
| `adId` | Creative ID (Google `CR…`, LinkedIn numeric) |
| `advertiserName` / `advertiserId` | Advertiser (ID on Google side) |
| `format` | `text` / `image` / `video` / `carousel` / `document` |
| `adText` | Full ad copy (LinkedIn) |
| `firstShown` / `lastShown` / `daysActive` | Run dates (Google always; LinkedIn EU ads via enrichment) |
| `isNew` | First shown within your window (default 7 days) |
| `imageUrl` / `videoUrl` / `previewUrl` | Creative media |
| `adUrl` | Destination URL (best effort) |
| `libraryUrl` | Deep link to the ad in its network's library |
| `payer` | "Paid for by" entity (LinkedIn detail enrichment) |
| `sourceQuery` | Which of your queries produced the row |

Fields a network doesn't publish come back `null` — never a fabricated value.

A free `RUN_SUMMARY` record (key-value store) rolls up each query: ads per network, which advertisers were matched on Google, and `networksActive` — instantly see whether a brand advertises on one network or both.

### Input example

```json
{
  "queries": ["hubspot", "monday.com"],
  "region": "US",
  "maxAdsPerNetwork": 50,
  "onlyNew": false,
  "enrichLinkedInDetails": true
}
```

- Each query resolves to up to 3 matching advertisers on Google Ads Transparency and one advertiser/keyword search on the LinkedIn Ad Library.
- `maxAdsPerNetwork` caps cost per query per network.
- `enrichLinkedInDetails` adds payer, exact format, run dates and impressions (EU ads) for one extra request per LinkedIn ad — same price.

### Pricing that can't surprise you

- **$1.20 / 1,000 ad rows** + $0.001 per run start — cheaper than running one Google actor plus one LinkedIn actor, and one schedule instead of two.
- Duplicate ads (page-boundary repeats, cross-run repeats in monitor mode) are **never charged**.
- A failed network leg never blocks the other: you still get (and only pay for) what was scraped.

### How to schedule this Actor (recommended)

Ad libraries are feeds, not archives — creatives rotate weekly and new campaign waves are the whole signal.

1. Run once with your competitor list in `queries`, check the output.
2. Actor page → **⋯ menu → Schedule Actor**, cron `0 7 * * *` (daily) or `0 7 * * 1` (weekly digest).
3. Turn on **`onlyNew`** — every scheduled run then only charges for creatives that didn't exist last time. A daily run on a stable competitor set typically costs **less than a cent**.
4. Add a Slack / Google Sheets / webhook integration on *Run succeeded* and filter on `isNew = true`: new competitor campaigns arrive on their own.

### FAQ

**Why not Meta ads too?** Meta's Ad Library requires heavy anti-bot workarounds (residential proxies) that would triple the price for everyone. Google + LinkedIn both publish their libraries over plain HTTP — this Actor stays fast and cheap by staying inside that boundary. If we crack a clean Meta source, it ships as a separate leg.

**Is this legal?** The Actor reads the same public transparency pages both networks are legally required to publish, without login or bypassing access controls. Review each network's terms for your use case.

**LinkedIn rows have no dates?** LinkedIn only publishes run dates and impressions for ads shown in the EU, and only on the detail page — enable `enrichLinkedInDetails` to fetch them. Non-EU ads honestly come back `null`.

**A query returned Google ads but zero LinkedIn ads (or vice versa)?** That's signal, not an error — check `networksActive` in `RUN_SUMMARY`. Plenty of brands only advertise on one network.

**Found a bug or want a field?** Open a ticket on the **Issues** tab — parser fixes and field requests routinely ship within days.

### Related Actors

- **[Google Ads Transparency Scraper](https://apify.com/tactful_anvil/google-ads-transparency-scraper)** — the Google leg as a standalone, at $0.64/1,000, with advertiser-ID mode and format filters. Use it when you only care about Google.

### Changelog

- **0.1** — Initial release: Google Ads Transparency + LinkedIn Ad Library legs, normalized schema, cross-run monitor mode (`onlyNew`), LinkedIn detail enrichment (payer, dates, impressions), per-network caps, typed output schema.

### Was this Actor useful?

If it replaced your two-tab morning ritual, a short review on the Store page genuinely helps an indie builder compete. Something broken instead? Open an issue — it gets fixed.

# Actor input Schema

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

Each query is searched on BOTH networks: resolved to up to 3 advertisers on Google Ads Transparency, and run as an advertiser/keyword search on the LinkedIn Ad Library.

## `networks` (type: `array`):

Subset of: google, linkedin. Default both.

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

ISO alpha-2 country code (US, GB, DE, ID…) filtering where Google ads were shown, or "anywhere". LinkedIn search is global.

## `maxAdsPerNetwork` (type: `integer`):

Hard cost cap: at most this many ads per network for each query ($1.20 per 1,000 ads).

## `newWithinDays` (type: `integer`):

Ads first shown within this many days get isNew=true.

## `onlyNew` (type: `boolean`):

Skip ads already output by previous runs (state kept in the key-value store). Schedule daily and only pay for genuinely new creatives.

## `enrichLinkedInDetails` (type: `boolean`):

One extra request per LinkedIn ad: paying entity, exact format, run dates and impressions (EU ads). Slower; same price per ad.

## Actor input object example

```json
{
  "queries": [
    "hubspot"
  ],
  "networks": [
    "google",
    "linkedin"
  ],
  "region": "anywhere",
  "maxAdsPerNetwork": 50,
  "newWithinDays": 7,
  "onlyNew": false,
  "enrichLinkedInDetails": false
}
```

# Actor output Schema

## `ads` (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 = {
    "queries": [
        "hubspot"
    ],
    "networks": [
        "google",
        "linkedin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tactful_anvil/brand-ads-cross-network-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": ["hubspot"],
    "networks": [
        "google",
        "linkedin",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("tactful_anvil/brand-ads-cross-network-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": [
    "hubspot"
  ],
  "networks": [
    "google",
    "linkedin"
  ]
}' |
apify call tactful_anvil/brand-ads-cross-network-spy --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tactful_anvil/brand-ads-cross-network-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/G8hEhP62omqE7alAG/builds/qdnw1meJON5yxItLJ/openapi.json
