Skip to content

Competitor Audit

One-shot competitor snapshot. Pull profile data, recent posts, and live ad creative for a company across every channel they run. Outputs a single JSON report per competitor.

Steps

  1. Resolve handles on TikTok, Instagram, YouTube, X, LinkedIn, Facebook.
  2. Pull profile + recent posts from each platform.
  3. Hit the Facebook Ad Library, Google Ad Library, LinkedIn Ad Library, and Reddit Ad Library for active ads.
  4. Aggregate into a single JSON report keyed by platform.

Node Script

js
import fs from 'node:fs';

const SC_KEY = process.env.SCRAPECREATORS_API_KEY;

async function sc(path, params = {}) {
  const qs = new URLSearchParams(params).toString();
  const res = await fetch(`https://api.scrapecreators.com${path}${qs ? '?' + qs : ''}`, {
    headers: { 'x-api-key': SC_KEY },
  });
  if (!res.ok) return { error: res.status };
  return res.json();
}

async function auditCompetitor({ name, tiktok, instagram, youtube, twitter, linkedin, facebook }) {
  const [
    ttProfile, ttVideos,
    igProfile, igPosts,
    ytChannel, ytVideos,
    twProfile, twTweets,
    liCompany, liPosts,
    fbProfile, fbPosts,
    fbAdsCompanies, googleAds, linkedinAds, redditAds
  ] = await Promise.all([
    sc('/v1/tiktok/profile', { handle: tiktok }),
    sc('/v3/tiktok/profile/videos', { handle: tiktok }),
    sc('/v1/instagram/profile', { handle: instagram }),
    sc('/v2/instagram/user/posts', { handle: instagram }),
    sc('/v1/youtube/channel', { handle: youtube }),
    sc('/v1/youtube/channel-videos', { handle: youtube }),
    sc('/v1/twitter/profile', { handle: twitter }),
    sc('/v1/twitter/user-tweets', { handle: twitter }),
    sc('/v1/linkedin/company', { handle: linkedin }),
    sc('/v1/linkedin/company/posts', { handle: linkedin }),
    sc('/v1/facebook/profile', { handle: facebook }),
    sc('/v1/facebook/profile/posts', { handle: facebook }),
    sc('/v1/facebook/adLibrary/search/companies', { query: name }),
    sc('/v1/google/company/ads', { domain: `${name.replace(/\s+/g, '').toLowerCase()}.com` }),
    sc('/v1/linkedin/ads/search', { query: name }),
    sc('/v1/reddit/ads/search', { query: name }),
  ]);

  return {
    name,
    timestamp: new Date().toISOString(),
    tiktok: { profile: ttProfile, videos: ttVideos },
    instagram: { profile: igProfile, posts: igPosts },
    youtube: { channel: ytChannel, videos: ytVideos },
    twitter: { profile: twProfile, tweets: twTweets },
    linkedin: { company: liCompany, posts: liPosts },
    facebook: { profile: fbProfile, posts: fbPosts },
    ads: { facebook: fbAdsCompanies, google: googleAds, linkedin: linkedinAds, reddit: redditAds },
  };
}

const report = await auditCompetitor({
  name: 'Liquid Death',
  tiktok: 'liquiddeath',
  instagram: 'liquiddeath',
  youtube: '@liquiddeath',
  twitter: 'liquiddeath',
  linkedin: 'liquid-death',
  facebook: 'liquiddeath',
});

fs.writeFileSync('competitor-liquid-death.json', JSON.stringify(report, null, 2));
console.log('Audit complete.');

Notes

  • This pipeline burns 16 credits per competitor at minimum (one per endpoint call).
  • Use Promise.all so the whole audit runs in parallel and finishes in 5 to 15 seconds.
  • Pair with GET /v1/detect-age-gender on the profile photo if you want audience inference.
  • All profile and posts endpoints in the sidebar.
  • Every endpoint under Ad Libraries in the sidebar.