cd /news/ai-agents/how-to-give-an-ai-agent-a-live-view-… · home › topics › ai-agents › article
[ARTICLE · art-174953] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

How to give an AI agent a live view of competitor ads on Google

A developer built the Google Ads Transparency Center Scraper, an Apify Actor that returns live competitor ad data—advertiser name, country, format, firstShown and lastShown dates, daysShown, targetDomain and adUrl—as one row per creative, queryable by advertiser name, domain or ID. The tool can be registered as an agent tool or added to Apify's MCP server so a language model can pull current ads instead of relying on stale training data, and it charges $1.49 per 1,000 ads.

key takeaway

Registering the scraper as an agent tool that returns one row per ad creative with creativeId, firstShown and daysShown lets a model write competitor briefs from live Ads Transparency Center data instead of stale training memory, at $1.49 per 1,000 ads.

by read3 min views4 publishedNov 23, 2026

Ask a language model what ads a competitor is running this week and it can only guess. Its training data is months old, and without a tool it has no way to read Google's Ads Transparency Center. If you want an agent to write a competitor brief, the agent needs a tool that returns current ads as data.

Google publishes ads from verified advertisers in the Ads Transparency Center. I built the Google Ads Transparency Center Scraper so that an agent or a script can ask for an advertiser name, a domain or an advertiser ID and get one row per ad creative back.

firstShown date can mark a new campaign. Treat it as a lead and open the ad before you call it a launch.daysShown have been kept in rotation for months. Treat them as candidates for "what this advertiser keeps paying for", then open them and judge for yourself. This is the input of a successful run (d7fi4heCuflrccCu1, build 0.3.1, November 22, 2026). It is deliberately tiny:

{
  "advertisers": ["nike.com"],
  "maxAdsPerAdvertiser": 2,
  "maxItems": 2,
  "includeRegions": false,
  "region": "anywhere",
  "format": "all"
}

It returned two ads and one summary row. Here are the fields an agent actually needs, copied from the output:

[
  {
    "advertiserName": "Nike Retail BV",
    "advertiserCountry": "NL",
    "format": "text",
    "firstShown": "2025-10-24T05:30:16.000Z",
    "lastShown": "2026-11-22T14:39:31.000Z",
    "daysShown": 396,
    "targetDomain": "nike.com"
  },
  {
    "advertiserName": "INITIATIVE MEDIA B.V.",
    "advertiserCountry": "NL",
    "format": "video",
    "firstShown": "2026-11-18T12:27:48.000Z",
    "lastShown": "2026-11-22T14:38:46.000Z",
    "daysShown": 5,
    "targetDomain": "nike.com"
  }
]

Two details are worth noticing. The second ad for nike.com sits under the advertiser account of INITIATIVE MEDIA B.V., a media agency, so a domain search catches ads that a search for the brand name could miss. And each row carries adUrl, a link to the creative in the Transparency Center, so a person can check what the model is talking about.

The third row is a summary for the input ("notFoundAnalysis": "ok", "ads": 2). Filter rows without creativeId before you hand the list to a model.

Any agent that can make an HTTP call can use it. This Python function runs the Actor synchronously through the Apify API, asks for ads shown since a given date and keeps the ones first shown in that window:

import os
from datetime import date, timedelta

import requests

URL = ("https://api.apify.com/v2/acts/zinin~google-ads-transparency-scraper"
       "/run-sync-get-dataset-items")

def new_competitor_ads(domains, days=7):
    since = (date.today() - timedelta(days=days)).isoformat()
    payload = {
        "advertisers": domains,           # names, domains or AR... IDs, up to 20
        "dateFrom": since,                # ads shown on or after this date
        "maxAdsPerAdvertiser": 50,
        "includeRegions": False,          # True adds one request per ad
    }
    resp = requests.post(
        URL,
        json=payload,
        headers={"Authorization": f"Bearer {os.environ['APIFY_TOKEN']}"},
        timeout=300,
    )
    resp.raise_for_status()               # a refused run comes back as an HTTP error
    ads = [r for r in resp.json() if r.get("creativeId")]
    return [r for r in ads if (r.get("firstShown") or "")[:10] >= since]

Register the function as a tool in your agent framework and describe it in one sentence: "Returns Google ads that these advertisers first showed in the last N days." The model then decides when to call it and writes the brief from rows instead of memory. You can also add the Actor to Apify's MCP server if your client speaks MCP.

The Actor charges $1.49 per 1,000 ads ($0.00149 per ad), with no start fee. A run that finds nothing costs nothing in Actor charges.

The limits are real, so plan around them:

previewImageUrl: null and a previewScriptUrl, which renders the ad only in a browser. includeRegions is on, and that makes the run slower. Try the Google Ads Transparency Center Scraper on one competitor first. If the rows are useful, put the function behind your agent and let it run weekly.

Disclosure: I maintain this Actor. Drafted with AI assistance using the cited successful run. This article contains Apify affiliate links; I may earn a commission if you sign up for a paid plan through them.

── more in #ai-agents 4 stories · sorted by recency
── more on @google ads transparency center 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-give-an-ai-ag…] indexed:0 read:3min 2026-11-23 · —