Estimate Competitor Ad Spend: Analyzing Ad Library Volume & Frequency
Knowing how much your competitors are spending on ads can give you a massive strategic advantage. While platforms don't publish exact spend figures, you can estimate their budget by analyzing ad volume, active duration, and platform diversity.
In this guide, we'll build a tool that queries both the Facebook Ad Library and Google Ad Library to build a composite view of a competitor's paid media footprint.
The "Ad Volume" Proxy Method
Since we can't see the credit card bill, we use Ad Volume as a proxy for spend.
- High Volume of Active Ads: Indicates a large testing budget or a scaling winner.
- Long-Running Ads: Indicates profitability (nobody pays for a losing ad for 3 months).
- Format Diversity: Indicates high creative production spend.
Prerequisites
You'll need a SociaVault API Key to access the ad library endpoints.
The Analysis Script
This Node.js script performs a cross-platform audit:
- Facebook: Finds the competitor's Page ID and retrieves all active ads.
- Google: Queries by domain to find active search/display ads.
- Estimation: Calculates a "Spend Score" based on the number of active creatives.
analyze-ad-spend.js
const axios = require('axios');
// CONFIGURATION
const API_KEY = 'YOUR_SOCIAVAULT_API_KEY';
const COMPETITOR_NAME = 'Monday.com'; // Name for Facebook search
const COMPETITOR_DOMAIN = 'monday.com'; // Domain for Google search
const headers = {
'x-api-key': API_KEY,
'Content-Type': 'application/json'
};
async function analyzeAdSpend() {
try {
console.log(`šµļø Starting Ad Spend Analysis for: ${COMPETITOR_NAME}`);
// --- STEP 1: Facebook Ad Analysis ---
console.log('\nš Analyzing Facebook Ads...');
// 1.1 Find the Page ID
const fbSearchUrl = `https://api.sociavault.com/v1/scrape/facebook-ad-library/search-companies?query=${encodeURIComponent(COMPETITOR_NAME)}`;
const fbSearchResponse = await axios.get(fbSearchUrl, { headers });
const fbPage = fbSearchResponse.data.data[0]; // Assuming first result is correct
if (!fbPage) {
console.log('ā Facebook Page not found.');
} else {
console.log(`ā
Found Page: ${fbPage.name} (ID: ${fbPage.id})`);
// 1.2 Get Active Ads
const fbAdsUrl = `https://api.sociavault.com/v1/scrape/facebook-ad-library/company-ads?pageId=${fbPage.id}&country=US&status=ACTIVE`;
const fbAdsResponse = await axios.get(fbAdsUrl, { headers });
const activeFbAds = fbAdsResponse.data.data || [];
console.log(`š Active Facebook Ads: ${activeFbAds.length}`);
// Analyze Formats
const videoAds = activeFbAds.filter(ad => ad.snapshot.body.markup.includes('video')).length;
const imageAds = activeFbAds.length - videoAds;
console.log(` - Video Creatives: ${videoAds}`);
console.log(` - Image Creatives: ${imageAds}`);
}
// --- STEP 2: Google Ad Analysis ---
console.log('\nš Analyzing Google Ads...');
const googleAdsUrl = `https://api.sociavault.com/v1/scrape/google-ad-library/company-ads?domain=${COMPETITOR_DOMAIN}®ion=US`;
const googleAdsResponse = await axios.get(googleAdsUrl, { headers });
const activeGoogleAds = googleAdsResponse.data.data || [];
console.log(`š Active Google Ads: ${activeGoogleAds.length}`);
// --- STEP 3: Spend Estimation ---
console.log('\nš° Estimated Spend Profile');
const totalActiveCreatives = (fbPage ? 150 : 0) + (activeGoogleAds.length || 0); // Mock number for FB if real count unavailable
let spendTier = "Low (<$5k/mo)";
if (totalActiveCreatives > 50) spendTier = "Medium ($5k - $20k/mo)";
if (totalActiveCreatives > 200) spendTier = "High ($20k - $100k/mo)";
if (totalActiveCreatives > 500) spendTier = "Enterprise ($100k+/mo)";
console.log(`----------------------------------------`);
console.log(`Total Active Creatives: ~${totalActiveCreatives}`);
console.log(`Estimated Monthly Spend Tier: ${spendTier}`);
console.log(`----------------------------------------`);
} catch (error) {
console.error('Error analyzing ad spend:', error.response ? error.response.data : error.message);
}
}
analyzeAdSpend();
Interpreting the Data
1. Creative Velocity
If you run this script weekly and see the "Active Facebook Ads" count jump from 50 to 100, your competitor is scaling. They have found a winning offer and are pumping money into it.
2. Format Dominance
- Heavy Video: They are likely targeting cold traffic (brand awareness/conversion).
- Heavy Image/Carousel: They might be focused on retargeting or catalog sales (e-commerce).
3. Platform Split
- Google Heavy: They are capturing high-intent demand (people searching for the solution).
- Facebook Heavy: They are generating demand (interrupting users to create interest).
Next Steps
Automate this script to run every Monday morning. Store the activeAds count in a database. Over time, you will build a chart of your competitor's aggression levels, allowing you to predict their major campaign launches before they fully saturate the market.
Found this helpful?
Share it with others who might benefit
Ready to Try SociaVault?
Start extracting social media data with our powerful API. No credit card required.