How to Bulk Check Google Ads Spend & Verify B2B Leads using Python and n8n
If you run outbound sales, marketing consultancy, or lead generation workflows, you know that pitching paid media services to a business that doesn't run ads (or pitching organic SEO to someone with a \$50k/month paid ads budget) ruins your conversion rates.
The key to hyper-targeted cold outreach is prospect qualification via advertising transparency data.
In this guide, we'll break down:
- Why Google Ads Transparency Center is a goldmine for B2B intelligence.
- How to extract active ad counts and verified advertiser credentials programmatically.
- How to automate the entire lead enrichment pipeline using n8n and Python.
1. The Challenge with Manual Ad Research
Google launched the Ads Transparency Center to provide public visibility into all active ad creatives across Search, YouTube, and Display.
However, agencies face two major bottlenecks:
- No Native Bulk Export: The official UI only supports looking up one single advertiser domain at a time.
- Enterprise Software Costs: Tools like Semrush or SpyFu charge \$150 to \$300/month for ad intelligence subscriptions.
By directly querying the underlying gRPC/JSON endpoints, you can evaluate 1,000+ prospect domains in under 2 minutes.
2. The Core Architecture
Here is the data pipeline:
[ Domain List / CSV / CRM ]
│
▼
[ Google Ads Transparency Scraper ]
│
├──> Resolves Verified Advertiser Name & Country
├──> Counts Active Search, YouTube & Display Creatives
└──> Computes adSpendTier (Enterprise / Growth / Testing / None)
│
▼
[ n8n Automation Engine ]
│
├──> Enriches with Emails & WhatsApp (wa.me)
└──> Generates Personalized Cold Pitch Hook
Categorization Rules for High-Conversion Outbound:
| Ad Count | adSpendTier | Outreach Angle / Pitch Hook |
|---|---|---|
| 50+ Ads | Enterprise |
Creative fatigue testing, video ad scaling, landing page CRO. |
| 10 - 49 Ads | Growth |
Multi-channel retargeting (Meta/TikTok pixel parity). |
| 1 - 9 Ads | Testing |
Ad copy optimization, negative keyword audits. |
| 0 Ads | None |
Competitor conquesting, high-intent Google Search setup. |
3. Implementing with Python
Here is a lightweight Python snippet demonstrating how to query Google Ads Transparency:
import urllib.request
import json
def check_domain_ads(domain: str):
url = "https://adstransparency.google.com/anji/_/rpc/SearchService/SearchSuggestions"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"Content-Type": "application/x-www-form-urlencoded"
}
# Form data request with domain query
payload = f"f.req=%5B%22{domain}%22%2Cnull%2Cnull%2Cnull%5D"
req = urllib.request.Request(url, data=payload.encode("utf-8"), headers=headers, method="POST")
with urllib.request.urlopen(req, timeout=10) as resp:
content = resp.read().decode("utf-8")
# Google prefixes RPC responses with ')]}\' to prevent JSON hijacking
clean_json = content.split('\n', 1)[-1]
data = json.loads(clean_json)
return data
# Example usage
# res = check_domain_ads("shopify.com")
# print(res)
4. Plug-and-Play Cloud Solution & Free n8n Template
If you don't want to maintain proxies, headless browsers, or session cookies on your own infrastructure, we've packaged the complete production-grade pipeline:
-
Production Cloud Actor on Apify Store:
- Run in the cloud or integrate via REST API: Google Ads Transparency Scraper on Apify
- Handles automatic retry, pagination, and multi-country geographic targeting.
- Apify provides \$5 free monthly credits, which is more than enough to test 5,000+ domain lookups.
-
Open-Source GitHub Repository:
- Full Python source code, Dockerfile, and CLI tools: github.com/mamangwarkop/google-ads-transparency-scraper
-
Free n8n Workflow Blueprint:
- Pre-configured webhook and enrichment nodes: Download the JSON file from mamangwarkop.github.io.
Conclusion & Next Steps
Targeting leads based on verified ad spend transforms outbound response rates from the standard 1-2% up to 8-12%. Prospects appreciate outreach that references their actual live campaigns and creative choices rather than generic cookie-cutter templates.
Feel free to clone the repository or fork the actor. Happy automating!
Top comments (0)