Stop Guessing Your Competitor’s Strategy. Just Download It.
Why spend thousands on A/B testing when your competitors have already done it for you?
In the world of paid ads, creativity is expensive. Testing is expensive.
But do you know what’s free? Looking at what is working for everyone else.
Meta (Facebook/Instagram) and Google maintain public “Ad Libraries” for transparency. Most marketers know this. But clicking through a web interface is slow and manual.
The smart way to do competitor research is to scrape it.
If you can download every ad your top 5 competitors have run in the last 6 months, you can see:
1. Which hooks they use.
2. Which creatives they keep running (winners).
3. Which ads they turned off after 2 days (losers).
Here is how to automate this using JavaScript and SociaVault.
The “Ad Spy” Script
We are going to build a script that monitors a competitor’s Facebook Page and alerts us when they launch new ads.
Prerequisites
You’ll need a SociaVault API Key. You can get it here
The Code (Node.js)
const axios = require('axios');
const API_KEY = 'YOUR_SOCIAVAULT_KEY';
const COMPETITOR_PAGE_ID = '123456789'; // Find this on their FB page
async function spyOnCompetitor() {
console.log(`🕵️ Spying on Page ID: ${COMPETITOR_PAGE_ID}...`);
try {
const response = await axios.get('https://api.sociavault.com/v1/scrape/facebook/ads', {
headers: { 'x-api-key': API_KEY },
params: {
page_id: COMPETITOR_PAGE_ID,
country: 'US',
active_status: 'active' // Only show ads currently running
}
});
const ads = response.data.data.ads;
console.log(`✅ Found ${ads.length} active ads.`);
// Analyze the ads
ads.forEach((ad, index) => {
console.log(`\n--- Ad #${index + 1} ---`);
console.log(`Started: ${ad.startDate}`);
console.log(`Platforms: ${ad.platforms.join(', ')}`);
console.log(`Copy: ${ad.adBody.substring(0, 50)}...`); // First 50 chars
console.log(`Creative URL: ${ad.image_url || ad.video_url}`);
});
} catch (error) {
console.error("Failed to fetch ads:", error.message);
}
}
spyOnCompetitor();What to Look For
Get Olamide Olaniyan’s stories in your inbox
Join Medium for free to get updates from this writer.
Once you have this data, don’t just copy it. Analyse it.
1. Longevity: If an ad has been active for >30 days, it is profitable. Study that creativity.
2. Platform Mix: Are they spending heavily on Instagram Reels but ignoring Facebook Feed? That tells you where their audience is.
3. Copy Patterns: Are they using long-form storytelling or short, punchy hooks?
I cover this in detail in my Facebook Ad Library Scraper Guide
Beyond Facebook
You shouldn’t stop at Facebook.
Google Ads: See what keywords they are bidding on. Read Guide
LinkedIn Ads: See their B2B messaging.
Automate Your Intelligence
Imagine a dashboard that updates every Monday morning with a PDF report of “New Competitor Ads.”
You can build that with SociaVault.
Stop flying blind. Use the data that is hiding in plain sight.
👉 Get access to the Ad Library API



